/* styles.css — simple, clean, mobile-friendly styling */

:root {
  --green: #1e8e3e;
  --green-dark: #166a2d;
  --red: #d93025;
  --bg: #f4f6f5;
  --card-bg: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --border: #dcdfe1;

  /* Single accent color: a football-pitch green, used only for the page
     title and the main action buttons (Start / New round / Give up). */
  --accent: #2ecc71;
  --accent-hover: #27ae60;
  --accent-text: #0e2a1a; /* dark text keeps good contrast on the bright green */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

#app {
  width: 100%;
  max-width: 480px;
}

h1 {
  text-align: center;
  margin-bottom: 4px;
  color: var(--accent);
}

.subtitle {
  text-align: center;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 24px;
}

.hidden {
  display: none !important;
}

.rules-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.rules-box p {
  margin: 0 0 10px;
}

.rules-box ul {
  margin: 0;
  padding-left: 20px;
}

.rules-box li {
  margin-bottom: 6px;
}

.rules-box li:last-child {
  margin-bottom: 0;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

select,
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
}

.field-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

#name-inputs input {
  margin-bottom: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' width='16' height='16'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

button {
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  cursor: pointer;
  width: 100%;
}

.primary-btn {
  background: var(--green);
  color: white;
  margin-top: 8px;
}

.primary-btn:hover {
  background: var(--green-dark);
}

.secondary-btn {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 12px;
}

.secondary-btn:hover {
  background: var(--bg);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  margin-top: 40px;
}

.pass-prompt {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.role-display {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

#role-text {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.starter-text {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hint {
  color: var(--muted);
  margin-bottom: 20px;
}

.answer-display {
  margin: 20px 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--bg);
}

#answer-text {
  font-weight: 600;
  white-space: pre-line;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --card-bg: #232527;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --border: #3c4043;
  }
}

/* ---------------------------------------------------------------------
   Career Paths game additions (new page, career-paths.html)
--------------------------------------------------------------------- */

.back-link {
  display: block;
  margin-bottom: 16px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

.nav-highlight-link {
  display: block;
  margin-bottom: 16px;
  text-align: center;
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.nav-highlight-link:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.photo-toggle-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.player-photo {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  filter: blur(0);
  transition: filter 0.3s ease;
}

.player-photo.blurred {
  filter: blur(20px);
}

.career-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  text-align: left;
}

.career-list li {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-weight: 600;
}

.guess-wrap {
  position: relative;
  margin-bottom: 8px;
}

.guess-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 10;
  text-align: left;
}

.dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg);
}

.guesses-left {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 16px;
}

.feedback-message {
  font-weight: 600;
  min-height: 20px;
  margin: 4px 0 16px;
}

.start-message {
  color: var(--red);
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
}

/* Accent-green main buttons: Start (both pages), New round (both pages),
   Give up (Career Paths). Targeted by ID so other buttons (e.g. "Hide and
   pass", "Reveal impostor(s)") keep their current look. */
#start-game-btn,
#start-round-btn,
#new-round-btn,
#give-up-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
}

#start-game-btn:hover,
#start-round-btn:hover,
#new-round-btn:hover,
#give-up-btn:hover {
  background: var(--accent-hover);
}

/* Makes an <a> look and behave like the existing <button> styles (which are
   tied to the `button` tag selector) -- used for the home page's "Play"
   links, which need to be real links, not buttons. */
.link-btn {
  display: block;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  padding: 14px 20px;
  cursor: pointer;
}
