/* ============================================================
   SPOTLE ACTOR — Attribute Guessing Game — Dark Theme
   ============================================================ */

/* ===================== RESET & BASE ===================== */
* {
  box-sizing: border-box;
}

html,
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

:root {
  --bg: #0b0f19;
  --bg-dark: #2f3247;
  --card-bg: #101828;
  --card-bg-2: #131c2e;
  --box-bg: #2f3247;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --text-primary: #f2f5fa;
  --text-secondary: #8a96a8;
  --text-muted: #5b6577;
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.18);
  --yellow: #facb1c;
  --yellow-text: #1a1305;
  --pill-bg: #1c2942;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font: 'Montserrat', sans-serif;
  --navbar-height: 50px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  margin: 0;
}

.page-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem 1rem;
}

.hidden {
  display: none !important;
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-dark);
  border-radius: 3px;
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-dark) transparent;
}

/* ===================== HEADER / NAVBAR ===================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
  background: var(--bg-dark);
  padding: 0;
  height: var(--navbar-height);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.top-header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 0.5rem;
  height: 100%;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  height: 100%;
}
.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; gap: 0.1rem; }
.header-center {
  flex: 0 0 auto;
  text-align: center;
}
.header-center span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-link {
  display: flex;
  align-items: center;
  line-height: 0;
  height: 100%;
}
.brand-logo {
  border-radius: 5px;
  height: 32px;
  width: auto;
  display: block;
}

/* Icon Buttons */
.icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 40px;
  height: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  border-radius: 0;
  position: relative;
}
.icon-btn i {
  font-weight: 900 !important;
  font-size: 1.3rem;
}
.icon-btn:hover {
  background: #3f4365;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.menu-button {
  background: transparent;
  border: none;
  color: #17140a;
  cursor: pointer;
  padding: 0 8px;
  height: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: background 0.2s ease;
  font-size: 1.2rem;
}
.menu-button i {
  font-weight: 900 !important;
  font-size: 1.15rem;
}
.menu-button:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #000;
}

/* Dropdown */
.dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  min-width: 180px;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 4px 0;
}
.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}
.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.dropdown.open .dropdown-content {
  display: block;
}

/* ===== Mode Selector & New Game Button ===== */
.mode-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.2rem 0.4rem;
  margin-left: 10px;
  background: #3f4365;
  border: 2px solid #3f4365;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.mode-selector:hover {
  background: #575b80;
  border-color: #575b80;
  transform: translateY(-1px);
}
.mode-selector i {
  transition: transform 0.2s ease;
}
.mode-selector.active i {
  transform: rotate(180deg);
}

.new-game-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 0.1rem 0.1rem;
  background: #3f4365;
  border: 1px solid var(--text-primary);
  border-radius: 50%;
  color: var(--text-primary);
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 2rem;
  height: 2rem;
  position: relative;
}
.new-game-btn:hover {
  background: #575b80;
  transform: translateY(-1px);
}
.new-game-btn::after {
  content: attr(data-title);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
  pointer-events: none;
}
.new-game-btn:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ===================== GAME META BAR ===================== */
.game-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.4rem 0.1rem 0.8rem 0.1rem;
  letter-spacing: 0.03em;
  gap: 0.5rem;
}
#guesses-remaining-label {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.hint-btn,
.give-up-btn {
  flex: 0 0 auto;
  padding: 0.4rem 1rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.hint-btn:hover,
.give-up-btn:hover {
  border-color: #f87171;
  color: #f87171;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(248, 113, 113, 0.2);
}

.give-up-btn:disabled,
.hint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  animation: none;
}

/* ===================== INPUT SECTION ===================== */
.input-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.search-wrap {
  display: flex;
  gap: 0.5rem;
  position: relative;
}

#guessInput {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg);
  border: 0.1px solid var(--text-secondary);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#guessInput::placeholder {
  color: var(--text-muted);
}
#guessInput:focus {
  border: 1px solid var(--text-primary);
  box-shadow: 0 0 0 3px rgba(250, 203, 28, 0.15), 0 4px 16px rgba(0, 0, 0, 0.25);
}
#guessInput[disabled] {
  background: #0e1522;
  color: var(--text-muted);
  opacity: 0.6;
  cursor: not-allowed;
}
#guessInput[disabled]::placeholder {
  color: var(--text-primary);
  font-weight: 600;
  opacity: 0.9;
}

#guessInput.game-over {
  border: 2px solid rgba(34, 197, 94, 0.6);
}

/* Suggestions Dropdown */
.movie-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.movie-suggestion-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.movie-suggestion-item:last-child {
  border-bottom: none;
}
.movie-suggestion-item.selected,
.movie-suggestion-item:hover {
  background: #1c2942;
  color: var(--text-primary);
}

.movie-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.suggestion-poster {
  width: 32px;
  height: 46px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--box-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.suggestion-poster-placeholder {
  width: 32px;
  height: 46px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--box-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.suggestion-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Loader */
.loader-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.2rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.loader-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: blink 1.2s infinite ease-in-out;
}
.loader-row .dot:nth-child(2) { animation-delay: 0.2s; }
.loader-row .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

.inline-warning {
  color: #f87171;
  font-size: 0.85rem;
  margin: 0.1rem 0.2rem;
}

/* ===================== GUESS CARDS ===================== */
.guess-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.guess-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  animation: cardIn 0.28s ease;
  backdrop-filter: blur(6px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.28);
}

.guess-card.correct-card {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35), 0 0 32px rgba(34, 197, 94, 0.18), 0 12px 30px rgba(0, 0, 0, 0.3);
  animation: correctGlow 2.4s ease-in-out infinite;
}

@keyframes correctGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35), 0 0 26px rgba(34, 197, 94, 0.16), 0 12px 30px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.55), 0 0 42px rgba(34, 197, 94, 0.3), 0 12px 30px rgba(0, 0, 0, 0.3); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Guess Top */
.guess-top {
  display: flex;
  gap: 1.1rem;
}
.guess-top .poster {
  width: 96px;
  height: 144px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: #1a2436;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}
.guess-card:hover .poster {
  transform: scale(1.03);
}
.guess-info {
  flex: 1;
  min-width: 0;
}
.guess-info h3 {
  margin: 0 0 0.6rem 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Pills */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.pill {
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--pill-bg);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.pill.green {
  background: var(--green);
  color: #06240f;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

/* Attribute Grid */
.attr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  perspective: 800px;
}

.attr-box {
  background: linear-gradient(160deg, var(--box-bg), rgba(0, 0, 0, 0.06));
  border-radius: var(--radius-md);
  padding: 0.5rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.18s ease;
  transform-style: preserve-3d;
}
.attr-box:hover {
  transform: translateY(-1px);
}

.attr-box.studio-box {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 120px;
  background: linear-gradient(160deg, var(--box-bg), rgba(0, 0, 0, 0.1));
}
.attr-box .label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.attr-box .value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.attr-box.studio-box > .value {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: wrap;
}

/* Attribute Status Colors */
.attr-box.status-green,
.attr-box.match-green {
  background: linear-gradient(160deg, var(--green), #16a34a);
}
.attr-box.status-green .label,
.attr-box.status-green .value,
.attr-box.match-green .label,
.attr-box.match-green .value {
  color: #062b12;
}
.attr-box.status-yellow {
  background: linear-gradient(160deg, var(--yellow), #d99a06);
}
.attr-box.status-yellow .label,
.attr-box.status-yellow .value {
  color: var(--yellow-text);
}
.attr-box.status-none {
  background: var(--box-bg);
}

/* Studio Logo */
.attr-box img.studio-logo {
  max-width: 90%;
  max-height: 40px;
  object-fit: contain;
  filter: invert(1);
}
.attr-box.match-green img.studio-logo {
  filter: none;
}

/* People Row */
.people-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 0.5rem;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: nowrap;
  perspective: 800px;
}

.person-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 60px;
}
.person-group .role-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.person-img-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: #1a2436;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex; 
  align-items: center;
  justify-content: center; 
}

.person-icon::before {
  font-size: 1.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.person-img-wrap.match .person-icon {
  color: var(--green);
}

.person-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.person-img-wrap.match {
  border-color: var(--green);
}
.person-group .person-name {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-group.match .person-name {
  color: var(--green);
  font-weight: 600;
}

.people-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border-subtle);
  margin: 0 0.2rem;
}

.supporting-cast-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 140px;
}
.supporting-cast-group .role-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
}
.supporting-cast-list {
  display: flex;
  gap: 1.3rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Flip Reveal Animation */
.flip-in .attr-box,
.flip-in .person-group {
  opacity: 0;
  transform: rotateX(90deg);
  animation: flipReveal 0.45s ease forwards;
  animation-delay: var(--flip-delay, 0s);
}
@keyframes flipReveal {
  0% { transform: rotateX(90deg); opacity: 0; }
  60% { transform: rotateX(-12deg); opacity: 1; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

/* ===================== HOW TO PLAY ===================== */
.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.28);
}
.how-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.help-icon {
  color: var(--text-primary);
  font-size: 1.2rem;
}
.how-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}
.how-intro {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.how-section {
  background: var(--box-bg);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.28);
}
.how-section:last-child {
  margin-bottom: 0;
}
.how-section-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
}
.color-guide-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}
.color-swatch.green { background: var(--green); }
.color-swatch.yellow { background: var(--yellow); }
.color-swatch.gray { background: var(--card-bg-2); border: 1px solid var(--border-subtle); }

.arrow-guide-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.arrow-guide-row i {
  width: 22px;
  text-align: center;
  color: var(--text-primary);
}

.attr-info-box {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.attr-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}
.attr-info-row:last-child {
  border-bottom: none;
}
.attr-info-key {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.attr-info-detail {
  color: var(--text-secondary);
  text-align: right;
  line-height: 1.45;
}

/* ===================== MODALS ===================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 6vh;
  padding-bottom: 2rem;
  overflow-y: auto;
  z-index: 9999;
}
.modal.hidden {
  display: none;
}
body:has(.modal:not(.hidden)) {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.modal-content {
  background: linear-gradient(180deg, #131c30 0%, #101828 100%);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
  padding: 0;
}
.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
}

.modal-header {
  flex: 0 0 auto;
  padding: 1.5rem 1.5rem 0.9rem 1.5rem;
}
.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0rem 1.5rem 1.5rem 1.5rem;
}
.close-btn {
  position: absolute;
  top: 0.6rem;
  right: 1rem;
  font-size: 1.6rem;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}
.close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Win / Give-Up Modal */
.win-modal-content {
  max-width: 460px;
  background: linear-gradient(180deg, #16203a 0%, #0d1420 100%);
  border-color: rgba(197, 163, 74, 0.25);
  box-shadow: 0 0 0 1px rgba(197, 163, 74, 0.12), 0 30px 70px rgba(0, 0, 0, 0.6);
}
.win-modal-content .modal-header {
  border-bottom: none;
  padding-bottom: 0.5rem;
}
.win-card {
  text-align: center;
}
.win-card h2 {
  font-size: 1.5rem;
  margin: 0 0 0.6rem 0;
  background: linear-gradient(135deg, #f7d154, #c5a34a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.win-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.share-results {
  padding: 0.5rem;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}
.share-text {
  margin: 0 0 0.6rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.share-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(197, 163, 74, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(197, 163, 74, 0.1);
  color: var(--yellow);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.share-btn:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1a1305;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(250, 203, 28, 0.28);
}
.next-game-timer {
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.timer-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.timer-display {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: #4ecdc4;
  letter-spacing: 2px;
}
.wins-previous-games {
  margin-top: 0.5rem;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(197, 163, 74, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(197, 163, 74, 0.1);
  color: var(--yellow);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.wins-previous-games:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1a1305;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(250, 203, 28, 0.28);
}
.win-trailer-wrap {
  margin-top: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(197, 163, 74, 0.25), 0 12px 30px rgba(0, 0, 0, 0.4);
}
.win-trailer-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.win-trailer-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.trailer-fallback-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.7rem;
  background: var(--box-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: border-color 0.15s ease;
}
.trailer-fallback-link:hover {
  border-color: #ff0000;
}
.trailer-fallback-link i {
  color: #ff0000;
  font-size: 1.1rem;
}

/* Giveup Confirm Modal */
.giveup-btn {
  padding: 0.55rem 1.3rem;
  margin: 0 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#giveup-yes-btn.giveup-btn {
  background: linear-gradient(135deg, #f87171, #dc2626);
  border-color: transparent;
  color: #fff;
}
#giveup-yes-btn.giveup-btn:hover {
  filter: brightness(1.1);
}
#giveup-no-btn.giveup-btn:hover {
  background: #b28f0a;
}

/* ===== Mode Modal ===== */
.mode-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  padding-bottom: 2rem;
  overflow-y: auto;
}
.mode-modal.hidden {
  display: none;
}
body:has(.mode-modal:not(.hidden)) {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.mode-modal-content {
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 18px;
  max-width: 520px;
  width: 92%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mode-modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
}
.mode-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font);
}
.mode-close-btn {
  position: absolute;
  top: 50%;
  right: 1.2rem;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}
.mode-close-btn:hover {
  color: var(--text-primary);
}
.mode-options {
  display: flex;
  flex-direction: row;
  padding: 1.5rem;
  gap: 14px;
}
.mode-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.7rem 0.7rem;
  background: var(--box-bg);
  border: 2px solid transparent;
  border-radius: 16px;
  color: var(--text-primary);
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.mode-option:hover {
  border-color: rgba(250, 203, 28, 0.4);
}
.mode-option i {
  font-size: 26px;
  margin-bottom: 4px;
}
.mode-option-title {
  font-weight: 800;
  font-size: 1.15rem;
}
.mode-option-sub {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-secondary);
  opacity: 0.85;
}
.mode-option.active {
  background: linear-gradient(135deg, #f7d154, #e6b706);
  border-color: #e6b706;
  color: #17140a;
  box-shadow: 0 0 24px rgba(230, 183, 6, 0.35);
}
.mode-option.active .mode-option-sub {
  color: #3d3106;
  opacity: 1;
}
.mode-option.active:hover {
  border-color: #e6b706;
}

/* ===== Stats Modal ===== */
.stats-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.5rem 0 1.4rem 0;
}
.stat-box {
  background: linear-gradient(160deg, var(--box-bg), rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-md);
  padding: 1rem 0.8rem;
  text-align: center;
  transition: transform 0.15s ease;
  /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.28); */
}
.stat-box:hover {
  transform: translateY(-2px);
}
.stat-box .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}
.stat-box .stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.dist-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}
.dist-chart {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.dist-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.dist-label {
  flex: 0 0 28px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: right;
}
.dist-bar-track {
  flex: 1;
  background: var(--box-bg);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.dist-bar-fill {
  height: 100%;
  min-width: 0;
  width: 0;
  background: var(--yellow);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  transition: width 0.4s ease;
  box-sizing: border-box;
  box-shadow: 0 0 10px rgba(250, 203, 28, 0.4);
}
.dist-bar-fill:empty {
  padding-right: 0;
}
.dist-bar-fill.zero {
  display: none;
}
.dist-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: #17140a;
}
.dist-pct {
  flex: 0 0 40px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
}

/* ===== Create Game Modal ===== */
.create-game-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
}
.create-game-title {
  margin: 0;
  font-size: 1.15rem;
}
.create-game-description {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
}
.create-game-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--box-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s ease;
}
.create-game-input:focus {
  border-color: #3b82f6;
}
.create-game-actions {
  margin-top: 1rem;
}
.create-game-submit-btn {
  padding: 0.55rem 1.4rem;
  background: #3b82f6;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease;
}
.create-game-submit-btn:hover {
  background: #2563eb;
}
.create-game-message {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
}
.create-game-message.error {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}
.create-game-message.success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}
.game-link-section {
  margin-top: 1rem;
}
.game-link-container {
  display: flex;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.game-link-input {
  flex: 1;
  border: none;
  background: var(--box-bg);
  color: var(--text-primary);
  padding: 0.5rem 0.8rem;
  outline: none;
  font-family: var(--font);
}
.copy-link-btn {
  border: none;
  background: #3b82f6;
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s ease;
}
.copy-link-btn:hover {
  background: #2563eb;
}

/* ===== Archive Calendar ===== */
.archive-modal-content {
  max-width: 420px;
}
.archive-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 2rem 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.archive-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: archiveSpin 0.8s linear infinite;
}
@keyframes archiveSpin {
  to { transform: rotate(360deg); }
}
.archive-error {
  padding: 1.5rem 0;
  text-align: center;
  color: #f87171;
  font-size: 0.9rem;
}
.archive-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.archive-calendar-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.archive-nav-btn {
  background: var(--box-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.archive-nav-btn:hover:not(:disabled) {
  border-color: var(--text-primary);
}
.archive-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.archive-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
}
.archive-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.archive-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--box-bg);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.archive-day.empty {
  background: transparent;
  cursor: default;
}
.archive-day.disabled {
  background: transparent;
  color: var(--text-muted);
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.archive-day.completed {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green);
}
.archive-day.in-progress {
  background: rgba(250, 203, 28, 0.18);
  color: var(--yellow);
  border: 1px solid var(--yellow);
}
.archive-day.available {
  background: var(--box-bg);
  color: var(--text-secondary);
}
.archive-day.available:hover {
  border: 1px solid var(--text-secondary);
}
.archive-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.archive-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
}
.archive-dot.completed { background: var(--green); }
.archive-dot.in-progress { background: var(--yellow); }
.archive-dot.available { background: var(--text-muted); }

/* ===== Feedback Modal ===== */
.feedback-intro {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}
.feedback-options {
  background: var(--box-bg);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1.1rem;
}
.feedback-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.feedback-option:last-child {
  border-bottom: none;
}
.feedback-option i {
  color: var(--yellow);
  font-size: 1.05rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.feedback-option p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.feedback-option strong {
  color: var(--text-primary);
}
.feedback-actions {
  display: flex;
  justify-content: center;
}
.feedback-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.6rem;
  background: linear-gradient(135deg, #f7d154, #c5a34a);
  border: none;
  border-radius: var(--radius-sm);
  color: #1a1305;
  font-weight: 700;
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(197, 163, 74, 0.3);
}
.feedback-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(197, 163, 74, 0.4);
}

/* ===================== GAMES SHOWCASE ===================== */
.games-showcase {
  width: 100%;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.games-showcase-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.games-showcase-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 0.4rem 0;
  color: var(--text-primary);
}

.games-showcase-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 1.4rem 0;
}

.games-showcase .games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

@media (max-width: 640px) {
  .games-showcase .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 203, 28, 0.4);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.game-card-logo {
  width: 60px;
  height: 60px;
  border-radius: 10%;
  background: var(--box-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.game-card-logo.no-bg {
  background: transparent;
  border-radius: 0;
}

.game-card-logo i {
  font-size: 1.5rem;
  color: var(--yellow);
}

.game-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.game-card-tagline {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.game-card-current {
  border-color: var(--yellow);
  cursor: default;
}

.game-card-current:hover {
  transform: none;
  box-shadow: none;
}

.game-card-current .game-card-tagline {
  color: var(--yellow);
  font-weight: 600;
}

/* ===================== INFO BLOCK ===================== */
.info-block {
  width: 100%;
  background: var(--box-bg);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2rem 1rem;
  margin-top: 1rem;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.info-block::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(250, 203, 28, 0.08), transparent 70%);
  pointer-events: none;
}
.info-block-content {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.info-block-header {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.8rem 0;
  color: var(--text-primary);
}
.info-block-rules {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
.info-block-rules strong {
  color: var(--yellow);
}

/* ===================== RATING SECTION ===================== */
.rating-section {
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
}
.logo-section {
  margin-bottom: 0.5rem;
}
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer-logo {
  max-width: 140px;
  border-radius: 10px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 16px rgba(250, 203, 28, 0.25));
}
.rating-title {
  margin: 0.5rem 0 0.8rem 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}
.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.rating-stars .star {
  font-size: 2.2rem;
  color: var(--box-bg);
  transition: color 0.15s ease, transform 0.1s ease;
  user-select: none;
  line-height: 1;
}
.rating-stars .star.selected,
.rating-stars .star.hovered {
  color: var(--yellow);
  filter: drop-shadow(0 0 10px rgba(250, 203, 28, 0.55));
}
.rating-stars .star:active {
  transform: scale(1.15);
}
.rating-average {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.3rem 0;
}
.rating-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 0.2rem 0;
}
.rating-thankyou {
  display: none;
  color: var(--green);
  font-weight: 700;
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

/* ===================== FOOTER ===================== */
.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}
.footer p {
  margin: 0.2rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.footer-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--yellow);
  text-decoration: underline;
}
.footer-links span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.social-links span {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.social-links a {
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0.2rem;
  transition: color 0.2s ease, transform 0.2s ease;
}
.social-links a:hover {
  transform: scale(1.12);
}
.social-links a[aria-label="Follow us on Instagram"]:hover { color: #E4405F; }
.social-links a[aria-label="Follow us on Facebook"]:hover { color: #1877F2; }
.social-links a[aria-label="Follow us on Twitter"]:hover { color: #1DA1F2; }
.social-links .fab {
  font-size: 1.05rem;
}

/* ===================== FAQ ===================== */
.faq-section {
  width: 100%;
  padding: 2rem 1rem;
  box-sizing: border-box;
}
.faq-content {
  max-width: 640px;
  margin: 0 auto;
}
.faq-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  text-align: center;
}
.faq-item {
  margin-bottom: 0.6rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--card-bg);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.28);
}
.faq-item:has(.faq-question:hover) {
  transform: translateY(-1px);
  border-color: rgba(250, 203, 28, 0.3);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.92rem;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 0.8rem;
  transition: transform 0.2s ease;
}
.faq-question.active::after {
  transform: rotate(45deg);
}
.faq-question:hover {
  background: var(--box-bg);
}
.faq-question.active {
  background: var(--box-bg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-answer p {
  margin: 0;
}
.faq-answer p + p {
  margin-top: 0.6rem;
}
.faq-answer.open {
  padding: 0.5rem 1rem 0.9rem 1rem;
  max-height: 400px;
}
.faq-answer strong {
  color: var(--text-primary);
}

/* ===================== GAME LOADER ===================== */
#game-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  z-index: 9999;
  color: var(--text-secondary);
}

.empty-placeholder {
  height: 300px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .mode-modal-content {
    max-height: 70vh;
  }
  .mode-selector {
    margin-left: 5px;
    font-size: 14px;
  }
  .new-game-btn {
    margin-left: 6px;
    padding: 0.15rem 0.4rem;
    font-size: 14px;
    width: 1.7rem;
    height: 1.7rem;
  }
  .new-game-btn::after {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --navbar-height: 50px;
  }

  .top-header-inner {
    padding: 0 0.5rem 0 1rem;
  }
  .header-center span {
    font-size: 0.82rem;
  }
  .brand-logo {
    height: 26px;
  }
  .header-right .icon-btn svg {
    width: 34px;
    height: 38px;
    stroke-width: 2.5;
  }
  .icon-btn {
    width: 34px;
    min-height: 34px;
  }
  .icon-btn i,
  .menu-button i {
    font-size: 1rem;
  }
  .menu-button {
    min-height: 36px;
    font-size: 1rem;
  }

  .page-wrap {
    padding: 0.75rem 0.6rem 1.5rem 0.6rem;
  }
  .game-meta-bar {
    font-size: 0.72rem;
  }
  .hint-btn,
  .give-up-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
  }

  #guessInput {
    font-size: 0.9rem;
  }

  .guess-feed {
    gap: 0.6rem;
  }
  .guess-card {
    padding: 0.65rem;
    border-radius: var(--radius-md);
  }
  .guess-top {
    gap: 0.6rem;
  }
  .guess-top .poster {
    width: 72px;
    height: 106px;
    border-radius: var(--radius-sm);
  }
  .guess-info h3 {
    font-size: 1rem;
    margin: 0 0 0.35rem 0;
    line-height: 1.2;
  }
  .pills {
    gap: 0.25rem;
    margin-bottom: 0.4rem;
  }
  .pill {
    padding: 0.18rem 0.55rem;
    font-size: 0.64rem;
  }

  .attr-grid {
    gap: 0.3rem;
    margin-bottom: 0;
  }
  .attr-box {
    padding: 0.3rem 0.2rem;
    border-radius: var(--radius-sm);
    gap: 0.08rem;
  }
  .attr-box .label {
    font-size: 0.55rem;
  }
  .attr-box .value {
    font-size: 0.65rem;
  }
  .studio-box .value {
    font-size: 0.55rem;
  }
  .attr-box.studio-box {
    width: 62px;
  }
  .attr-box img.studio-logo {
    max-height: 24px;
  }

  .people-row {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    gap: 0.3rem;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .people-row::-webkit-scrollbar {
    display: none;
  }
  .person-group {
    min-width: 45px;
    flex-shrink: 0;
    gap: 0.18rem;
  }
  .person-group .role-label {
    font-size: 0.5rem;
  }
  .person-img-wrap {
    width: 36px;
    height: 36px;
  }
  .person-group .person-name,
  .supporting-cast-group .person-name {
    max-width: 40px;
    font-size: 0.55rem;
  }
  .people-divider {
    margin: 0 0.05rem;
    flex-shrink: 0;
  }
  .supporting-cast-group {
    min-width: auto;
    flex: 1;
    gap: 0.18rem;
  }
  .supporting-cast-group .role-label {
    font-size: 0.5rem;
  }
  .supporting-cast-list {
    gap: 0.6rem;
    flex-wrap: nowrap;
  }

  .attr-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .attr-info-detail {
    text-align: left;
  }
  .social-links {
    gap: 0.35rem;
  }
  .info-block-header {
    font-size: 1.2rem;
  }
  .rating-stars .star {
    font-size: 1.9rem;
  }
  .footer-logo {
    max-width: 110px;
  }
  .faq-title {
    font-size: 1.15rem;
  }
  .faq-question {
    font-size: 0.85rem;
    padding: 0.75rem 0.9rem;
  }
  .faq-answer.open {
    padding: 0.5rem 0.9rem 0.8rem 0.9rem;
  }
}

/* ===================== HINT MODAL ===================== */
.hint-modal-content {
  max-width: 460px;
  background:
    radial-gradient(circle at 50% -10%, rgba(250, 203, 28, 0.16), transparent 55%),
    linear-gradient(180deg, #16203a 0%, #0d1420 100%);
  border-color: rgba(250, 203, 28, 0.22);
  box-shadow:
    0 0 0 1px rgba(250, 203, 28, 0.1),
    0 30px 70px rgba(0, 0, 0, 0.6);
}

.hint-modal-content .modal-header {
  text-align: center;
  padding-top: 1.8rem;
  padding-bottom: 0.6rem;
}

.hint-modal-content .modal-header::before {
  content: "\f0eb";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 0.7rem auto;
  border-radius: 50%;
  font-size: 1.35rem;
  color: var(--yellow);
  background: radial-gradient(circle, rgba(250, 203, 28, 0.22), rgba(250, 203, 28, 0.04));
  box-shadow: 0 0 0 1px rgba(250, 203, 28, 0.25), 0 0 24px rgba(250, 203, 28, 0.2);
  animation: hintIconGlow 2.4s ease-in-out infinite;
}

@keyframes hintIconGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(250, 203, 28, 0.25), 0 0 18px rgba(250, 203, 28, 0.16); }
  50% { box-shadow: 0 0 0 1px rgba(250, 203, 28, 0.4), 0 0 30px rgba(250, 203, 28, 0.3); }
}

.hint-modal-content .how-title {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #d8dbe4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hint-modal-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.55rem 0 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Two little "uses remaining" pips rendered via ::before/::after so no HTML change is needed */
.hint-modal-subtitle::before,
.hint-modal-subtitle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(250, 203, 28, 0.85);
  box-shadow: 0 0 8px rgba(250, 203, 28, 0.6);
}

.hint-modal-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 1.1rem 0;
  padding: 0.6rem 0.9rem;
  background: rgba(250, 203, 28, 0.06);
  border: 1px dashed rgba(250, 203, 28, 0.28);
  border-radius: var(--radius-md);
}

.hint-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.hint-option-card-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1.15rem 0.7rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)), var(--box-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1.3), border-color 0.2s ease, box-shadow 0.25s ease;
}

/* subtle animated sheen sweeping across clickable cards */
.hint-option-card-btn:not(.locked):not(.revealed)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(250, 203, 28, 0.14) 50%, transparent 70%);
  background-size: 220% 220%;
  background-position: -120% -120%;
  transition: background-position 0.6s ease;
  pointer-events: none;
}

.hint-option-card-btn:hover:not(.locked):not(.revealed) {
  border-color: rgba(250, 203, 28, 0.55);
  box-shadow: 0 14px 30px rgba(250, 203, 28, 0.18), 0 0 0 1px rgba(250, 203, 28, 0.25);
}

.hint-option-card-btn:hover:not(.locked):not(.revealed)::before {
  background-position: 120% 120%;
}

.hint-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.15rem;
  color: var(--yellow);
  background: radial-gradient(circle, rgba(250, 203, 28, 0.18), rgba(250, 203, 28, 0.02));
  box-shadow: 0 0 0 1px rgba(250, 203, 28, 0.18);
  transition: transform 0.25s ease;
}

.hint-option-card-btn:hover:not(.locked):not(.revealed) .hint-option-icon {
  transform: scale(1.12) rotate(-4deg);
}

.hint-option-title {
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hint-option-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Locked state — frosted / muted, with a soft pulse on the lock icon */
.hint-option-card-btn.locked {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  border-color: var(--border-subtle);
}

.hint-option-card-btn.locked .hint-option-icon {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
  filter: grayscale(1);
  opacity: 0.6;
}

.hint-option-card-btn.locked .hint-option-title {
  color: var(--text-muted);
}

.hint-lock-icon {
  color: var(--text-muted);
  font-size: 1rem;
  animation: lockPulse 2.6s ease-in-out infinite;
}

@keyframes lockPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.12); }
}

/* Revealed state — success glow with a check badge */
.hint-option-card-btn.revealed {
  cursor: default;
  border-color: rgba(34, 197, 94, 0.4);
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.02));
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.22), 0 10px 26px rgba(34, 197, 94, 0.12);
}

.hint-option-card-btn.revealed .hint-option-icon {
  color: var(--green);
  background: radial-gradient(circle, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.03));
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.hint-revealed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, #34d399, #16a34a);
  color: #052e16;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.hint-revealed-badge::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.55rem;
}

/* Footer actions */
.hint-keep-guessing-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(250, 203, 28, 0.14), rgba(250, 203, 28, 0.05));
  border: 1px solid rgba(250, 203, 28, 0.35);
  border-radius: var(--radius-md);
  color: var(--yellow);
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hint-keep-guessing-btn:hover {
  background: linear-gradient(135deg, rgba(250, 203, 28, 0.22), rgba(250, 203, 28, 0.08));
  box-shadow: 0 8px 20px rgba(250, 203, 28, 0.18);
  transform: translateY(-1px);
}

.hint-dont-show-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0.8rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.hint-dont-show-btn:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* Light theme adjustments */
body.light-theme .hint-modal-content {
  background:
    radial-gradient(circle at 50% -10%, rgba(227, 160, 8, 0.14), transparent 55%),
    var(--bg);
  border-color: rgba(227, 160, 8, 0.25);
}
body.light-theme .hint-modal-content .modal-header::before {
  background: radial-gradient(circle, rgba(227, 160, 8, 0.2), rgba(227, 160, 8, 0.04));
  color: #B8790A;
}
body.light-theme .hint-modal-content .how-title {
  background: linear-gradient(135deg, #241F10, #4a3f22);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-theme .hint-modal-note {
  background: rgba(227, 160, 8, 0.08);
  border-color: rgba(227, 160, 8, 0.3);
}
body.light-theme .hint-option-card-btn.revealed {
  background: linear-gradient(160deg, rgba(21, 128, 61, 0.1), rgba(21, 128, 61, 0.02));
}
body.light-theme .hint-keep-guessing-btn {
  color: #B8790A;
  border-color: rgba(227, 160, 8, 0.4);
  background: linear-gradient(135deg, rgba(227, 160, 8, 0.14), rgba(227, 160, 8, 0.05));
}

/* ===================== HINT CARD (in feed) ===================== */
.hint-card {
  background: var(--card-bg);
  border: 1.5px solid var(--yellow);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: 0 0 24px rgba(250, 203, 28, 0.12), 0 8px 24px rgba(0, 0, 0, 0.28);
}

.hint-card-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--yellow);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 0.7rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hint-card-intro {
  margin: 0 0 0.7rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hint-card-value-big {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.hint-movie-ref {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.hint-movie-ref img {
  width: 48px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.hint-movie-ref span {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* Hint button state */
.hint-btn.hint-available {
  border-color: var(--yellow);
  color: var(--yellow);
  animation: hintPulse 1.6s ease-in-out infinite;
}

.hint-btn.hint-locked-visual {
  opacity: 0.55;
}

@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(250, 203, 28, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(250, 203, 28, 0); }
}

@media (max-width: 480px) {
  .hint-option-title {
    font-weight: 800;
    font-size: 0.56rem;
  }
  .hint-option-desc {
    font-size: 0.52rem;
  } 
  .hint-revealed-badge{
    font-size: 0.55rem;
  }
}

/* ===================== LIGHT THEME ===================== */
body.light-theme {
  --bg: #FBF7EC;
  --bg-dark: #2B2410;
  --card-bg: #FFFFFF;
  --card-bg-2: #F7F1E1;
  --box-bg: #F3ECD8;
  --border-subtle: rgba(43, 36, 16, 0.12);
  --text-primary: #241F10;
  --text-secondary: #6E6450;
  --text-muted: #A99E82;
  --green: #22c55e;
  --green-soft: rgba(21, 128, 61, 0.14);
  --yellow: #facb1c;
  --yellow-text: #241F10;
  --pill-bg: #F5E7BE;
}

/* ---- Header ---- */
body.light-theme .top-header {
  background: var(--yellow);
  box-shadow: 0 4px 20px rgba(217, 154, 6, 0.28);
}
body.light-theme .header-center span,
body.light-theme .top-header .icon-btn,
body.light-theme .top-header .menu-button {
  color: #241F10;
}
body.light-theme .top-header .icon-btn:hover {
  background: rgba(36, 31, 16, 0.12);
}
body.light-theme .mode-selector,
body.light-theme .new-game-btn {
  background: #e6b706;
  border-color: #e6b706;
  color: var(--text-primary);
}
body.light-theme .mode-selector:hover,
body.light-theme .new-game-btn:hover {
  background: #ecbd0f;
  border-color: #ecbd0f;
}

/* ---- Cards & Shadows ---- */
body.light-theme .guess-card.correct-card {
  border-color: rgba(21, 128, 61, 0.45);
  /* box-shadow: 0 0 0 1px rgba(21, 128, 61, 0.2), 0 8px 22px rgba(21, 128, 61, 0.1); */
}
body.light-theme .guess-top .poster,
body.light-theme .person-img-wrap {
  background: #EFE6CC;
}

body.light-theme .person-icon {
  color: var(--text-secondary);
}

body.light-theme .attr-box img.studio-logo {
  filter: none;
  opacity: 0.85;
}

/* ---- Input ---- */
body.light-theme #guessInput {
  background: #FFFFFF;
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
body.light-theme #guessInput:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(250, 203, 28, 0.25), 0 4px 16px rgba(217, 154, 6, 0.15);
}
body.light-theme #guessInput[disabled] {
  background: #F1E9D3;
  color: var(--text-muted);
}
body.light-theme #guessInput[disabled]::placeholder {
  color: var(--text-primary);
  font-weight: 600;
  opacity: 0.85;
}

body.light-theme #guessInput.game-over {
  border: 2px solid rgba(34, 197, 94, 0.6);
}

body.light-theme .movie-suggestion-item.selected,
body.light-theme .movie-suggestion-item:hover {
  background: #F7E6AE;
  color: var(--text-primary);
}

/* ---- Buttons ---- */
body.light-theme .share-btn,
body.light-theme .giveup-btn,
body.light-theme .wins-previous-games,
body.light-theme .copy-link-btn,
body.light-theme .create-game-submit-btn {
  background: #E3A008;
  color: #241F10;
  border-color: #E3A008;
}
body.light-theme .share-btn:hover,
body.light-theme .giveup-btn:hover,
body.light-theme .wins-previous-games:hover,
body.light-theme .copy-link-btn:hover,
body.light-theme .create-game-submit-btn:hover {
  background: #C08600;
  border-color: #C08600;
  color: #fff;
}
body.light-theme .hint-btn:hover,
body.light-theme .give-up-btn:hover {
  border-color: #DC2626;
  color: #DC2626;
}

/* ---- Modals ---- */
body.light-theme .modal {
  background: rgba(43, 36, 16, 0.55);
}
body.light-theme .modal-content,
body.light-theme .mode-modal-content {
  background: var(--bg);
}
body.light-theme .modal-content::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}
body.light-theme .timer-display {
  color: #B8790A;
}

/* ---- Archive ---- */
body.light-theme .archive-day.completed {
  background: rgba(21, 128, 61, 0.12);
  color: #15803D;
  border-color: #15803D;
}
body.light-theme .archive-day.in-progress {
  background: #fbd858;
  color: var(--text-secondary);
  border-color: #B8790A;
}
body.light-theme .archive-spinner {
  border-color: var(--border-subtle);
  border-top-color: #D99A06;
}
body.light-theme .dist-bar-fill {
  background: #D99A06;
}
body.light-theme .rating-stars .star.selected,
body.light-theme .rating-stars .star.hovered {
  color: #E3A008;
  filter: drop-shadow(0 0 10px rgba(227, 160, 8, 0.4));
}
body.light-theme .footer-links a:hover {
  color: #C08600;
}
body.light-theme .feedback-option i {
  color: #E3A008;
}
body.light-theme .feedback-btn {
  background: #E3A008;
  color: #241F10;
}
body.light-theme .feedback-btn:hover {
  background: #C08600;
  color: #fff;
}
body.light-theme ::-webkit-scrollbar-thumb {
  background: #D9CBA3;
}
body.light-theme ::-webkit-scrollbar-thumb:hover {
  background: #C4B384;
}
body.light-theme * {
  scrollbar-color: #D9CBA3 transparent;
}


/* ============================================================
   SPOTLE ACTOR — additions on top of the shared game layout
   ============================================================ */

/* Moviexto uses --yellow as its accent; alias it for the additions below */
:root { --accent: var(--yellow); }

/* Logo variants: light text for dark surfaces, dark text for light ones */
.logo-on-light { display: none; }
body.light-theme .logo-on-dark { display: none; }
body.light-theme .logo-on-light { display: block; }
.footer-logo.logo-on-light { margin: 0 auto; }

/* Brand logo is a wide wordmark, not a square icon */
.brand-logo { border-radius: 0; }
.footer-logo { max-width: 210px; border-radius: 0; }
@media (max-width: 480px) { .footer-logo { max-width: 170px; } }

/* 6 attribute boxes: gender / age / country, then industry / debut / movies */
.attr-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
}
.attr-box .value {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}
.attr-box .value .fa-solid { margin-left: 0.2rem; }

/* Actor portraits are 2:3 like posters; keep faces in frame */
.guess-top .poster { object-position: center top; }

/* Active-decades pills sit under the genre pills, a bit quieter */
.pills.decade-pills { margin-bottom: 0.7rem; }
.pills.decade-pills .pill { font-size: 0.7rem; padding: 0.2rem 0.65rem; opacity: 0.92; }
.pills.decade-pills .pill.green { opacity: 1; }

/* Co-stars row spans the whole card */
.people-row .supporting-cast-group { min-width: 0; }
.supporting-cast-list { gap: 1rem; }
.person-group .person-name { max-width: 76px; }

/* Autocomplete rows: portrait + name + small subtitle */
.suggestion-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.suggestion-text .suggestion-title { flex: none; }
.suggestion-sub { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-poster { border-radius: 50%; width: 38px; height: 38px; }
.suggestion-poster-placeholder { border-radius: 50%; width: 38px; height: 38px; }

/* Win / give-up modal: reveal card for the secret actor */
.win-actor-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0.4rem 0;
  padding: 0.8rem;
  text-align: left;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(250, 203, 28, 0.14), rgba(250, 203, 28, 0.04));
  border: 1px solid rgba(250, 203, 28, 0.35);
}
.win-actor-photo {
  width: 84px;
  height: 126px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-sm);
  background: var(--box-bg);
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.win-actor-info { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.win-actor-name { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--text-primary); }
.win-actor-line { font-size: 0.78rem; color: var(--text-secondary); }
.win-actor-link {
  align-self: flex-start;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.win-actor-link:hover { text-decoration: underline; }

/* Hint cards */
.hint-card-value-big small { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-left: 0.4rem; }
.hint-person-ref { display: flex; align-items: center; gap: 0.8rem; }
.hint-person-ref img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center top;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); flex-shrink: 0;
}
.hint-person-ref span { font-weight: 800; font-size: 0.95rem; color: var(--text-primary); }
.hint-initials { font-size: 1.9rem; font-weight: 900; letter-spacing: 0.18em; color: var(--accent); }

#feedbackModal .feedback-btn { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }

@media (max-width: 480px) {
  .suggestion-poster, .suggestion-poster-placeholder { width: 32px; height: 32px; }
  .win-actor-photo { width: 64px; height: 96px; }
  .pills.decade-pills .pill { font-size: 0.55rem; padding: 0.12rem 0.45rem; }
  .person-group .person-name { max-width: 44px; }
  .supporting-cast-list { gap: 0.5rem; }
}

/* ===================== HOW TO PLAY PAGE ===================== */
/* Same width as the centered guess cards (.page-wrap) */
.how-page-inner { max-width: 640px; margin: 0 auto; padding: 1rem 1rem 2.5rem; }
.how-back-btn {
  background: var(--card-bg); color: var(--text-secondary); border: 1px solid var(--border-subtle);
  border-radius: 999px; padding: 0.45rem 1rem; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.how-back-btn:hover { color: var(--text-primary); }
.how-page-title { margin: 1.1rem 0 0.4rem; font-size: 1.5rem; font-weight: 800; color: var(--text-primary); text-align: center; }
.how-page-lead { text-align: center; color: var(--text-secondary); line-height: 1.6; margin: 0 0 1rem; font-size: 0.92rem; }
.how-divider { display: flex; align-items: center; gap: 1rem; margin: 1.6rem 0 1rem; }
.how-divider::before, .how-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
.how-divider span { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-primary); }
.how-step {
  display: flex; gap: 1rem; background: var(--card-bg); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1rem 1.1rem; margin-bottom: 0.9rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.24), 0 8px 24px rgba(0,0,0,.28);
}
.how-step-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--accent); }
.how-step-body { flex: 1; min-width: 0; }
.how-step-body h2 { margin: 0 0 0.35rem; font-size: 1.05rem; color: var(--text-primary); }
.how-step-body p { margin: 0 0 0.6rem; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; }
.how-demo-search {
  display: flex; align-items: center; gap: 0.6rem; background: var(--box-bg); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; color: var(--text-primary); font-weight: 600; font-size: 0.9rem;
}
.how-demo-search i { color: var(--text-secondary); }
.how-caret { width: 2px; height: 1.1em; background: var(--accent); animation: howBlink 1s steps(1) infinite; }
@keyframes howBlink { 50% { opacity: 0; } }
.how-tag { padding: 0.1rem 0.5rem; border-radius: 6px; font-weight: 700; font-size: 0.82rem; }
.how-tag.green { background: var(--green); color: #062b12; }
.how-tag.yellow { background: var(--yellow); color: var(--yellow-text); }
.how-tag.gray { background: var(--box-bg); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.how-legend { line-height: 2 !important; }
.how-example { margin-top: 1.2rem; }
.how-example-poster { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text-secondary); }
.how-example-note { margin: 0.8rem 0 0; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; text-align: center; }
.how-attr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.how-attr-card {
  position: relative; background: var(--card-bg); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 0.8rem 0.9rem; transition: border-color .2s, transform .2s;
}
.how-attr-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.how-attr-card h3 { margin: 0 0 0.3rem; font-size: 0.95rem; color: var(--accent); }
.how-attr-card p { margin: 0; font-size: 0.82rem; line-height: 1.5; color: var(--text-secondary); }
.how-attr-card .n { position: absolute; top: 0.6rem; right: 0.8rem; font-size: 0.68rem; color: var(--text-muted); }
.how-play-btn {
  display: block; margin: 1.8rem auto 0; background: var(--accent); color: var(--yellow-text); border: 0;
  border-radius: 999px; padding: 0.75rem 2.2rem; font: inherit; font-weight: 700; cursor: pointer;
}
.how-play-btn:hover { filter: brightness(1.08); }
@media (max-width: 480px) {
  .how-step { flex-direction: column; gap: 0.4rem; }
  .how-attr-grid { grid-template-columns: 1fr; }
}
.how-example-intro { margin: 1.2rem 0 0.7rem; font-size: 0.88rem; color: var(--text-secondary); text-align: center; }
.how-example-intro strong { color: var(--text-primary); }
.how-example + .how-example-note { margin-bottom: 0; }
.how-play-btn { display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.how-play-btn i { font-size: 0.85em; }

/* Nav bar: left icons flush to the screen's left edge, right icons flush to the
   right edge, and only the actor number sits in the exact center. */
.top-header-inner {
  max-width: none;
  position: relative;
}
.header-left,
.header-right { flex: 0 0 auto; }
.header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ===================== PROFILE PANEL ===================== */
.profile-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(4, 6, 12, 0.45); }
.profile-panel {
  position: fixed; top: 14px; right: 14px; z-index: 950; width: 440px; max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px); overflow-y: auto; box-sizing: border-box;
  background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 28px;
  padding: 1rem 1.3rem 1.3rem; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.profile-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--yellow-text); font-size: 1.3rem; font-weight: 800;
}
.profile-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profile-name { margin: 0; font-size: 1.5rem; font-weight: 800; text-transform: uppercase; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }
.profile-email { font-size: 0.78rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; }
.profile-close {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-subtle); background: var(--box-bg);
  color: var(--text-primary); cursor: pointer; font-size: 1rem; flex-shrink: 0;
}
.profile-close:hover { filter: brightness(1.2); }
.profile-promo { background: #f0e7d0; color: #3a3220; border-radius: 18px; padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; }
.profile-promo p { margin: 0 0 0.9rem; line-height: 1.5; font-size: 0.95rem; }
.profile-signin-btn {
  display: inline-block; background: var(--yellow); color: #241F10; font-weight: 700; text-decoration: none;
  border-radius: 999px; padding: 0.7rem 1.3rem; font-size: 0.95rem;
}
.profile-signin-btn:hover { filter: brightness(1.06); }
.profile-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); }

.profile-streak { border-top: 1px solid var(--border-subtle); padding: 1rem 0 0.4rem; }
.profile-streak-top { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.profile-streak-num { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--text-primary); }
.profile-streak-text { display: flex; flex-direction: column; color: var(--text-secondary); font-size: 0.9rem; }
.profile-streak-text small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.profile-days { display: flex; justify-content: space-between; gap: 0.3rem; margin-top: 0.6rem; }
.profile-day {
  position: relative; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--box-bg); color: var(--text-secondary); font-size: 0.8rem; font-weight: 700; box-sizing: border-box;
}
.profile-day b { font-weight: 700; }
.profile-day i { font-size: 0.8rem; }
.profile-day.won { background: var(--green); color: #062b12; }
.profile-day.lost { background: rgba(239, 68, 68, 0.22); color: #f87171; }
.profile-day.won b, .profile-day.lost b { display: none; }
.profile-day.today { box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--accent); }

.profile-section { border-top: 1px solid var(--border-subtle); margin-top: 0.9rem; padding-top: 0.8rem; }
.profile-section-head {
  display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; cursor: pointer;
  padding: 0.2rem 0 0.8rem; font: inherit; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-secondary);
}
.profile-section-head i { color: var(--accent); font-size: 0.95rem; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.1rem; }
.profile-stat { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.8rem; border-top: 2px solid var(--accent); }
.profile-stat.s2 { border-top-color: #3b6fe0; }
.profile-stat-val { font-size: 2.1rem; font-weight: 800; line-height: 1; color: var(--text-primary); }

.profile-link-row {
  display: flex; align-items: center; gap: 0.8rem; width: 100%; box-sizing: border-box; margin-top: 0.9rem;
  background: var(--box-bg); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 0.9rem 1rem;
  font: inherit; font-size: 0.95rem; font-weight: 700; color: var(--text-primary); text-decoration: none; cursor: pointer; text-align: left;
}
.profile-link-row span { flex: 1; }
.profile-link-row i:first-child { color: var(--accent); width: 1.2rem; text-align: center; }
.profile-link-row i:last-child:not(:first-child) { color: var(--accent); }
.profile-link-row:hover { border-color: var(--accent); }
body.light-theme .profile-day.lost { color: #b91c1c; }
@media (max-width: 480px) { .profile-day { width: 34px; height: 34px; } .profile-panel { top: 8px; right: 8px; max-width: calc(100vw - 16px); } }

/* Profile panel: compact, no scrolling */
.profile-panel { width: 380px; max-height: none; overflow: visible; padding: 0.8rem 1rem 1rem; border-radius: 22px; }
.profile-head { gap: 0.7rem; margin-bottom: 0.7rem; }
.profile-avatar { width: 42px; height: 42px; font-size: 1.05rem; }
.profile-name { font-size: 1.2rem; }
.profile-close { width: 34px; height: 34px; font-size: 0.85rem; }
.profile-promo { padding: 0.8rem 0.95rem; margin-bottom: 0.7rem; border-radius: 14px; }
.profile-promo p { margin-bottom: 0.65rem; font-size: 0.85rem; line-height: 1.4; }
.profile-signin-btn { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.profile-streak { padding: 0.7rem 0 0.2rem; }
.profile-streak-top { margin-bottom: 0.5rem; gap: 0.55rem; }
.profile-streak-num { font-size: 2rem; }
.profile-streak-text { font-size: 0.82rem; }
.profile-days { margin-top: 0.45rem; }
.profile-day { width: 34px; height: 34px; font-size: 0.74rem; }
.profile-section { margin-top: 0.6rem; padding-top: 0.5rem; }
.profile-section-head { padding-bottom: 0.5rem; font-size: 0.68rem; }
.profile-stats { gap: 0.7rem 0.9rem; }
.profile-stat { gap: 0.35rem; padding-top: 0.5rem; }
.profile-stat-val { font-size: 1.6rem; }
.profile-link-row { margin-top: 0.6rem; padding: 0.65rem 0.85rem; font-size: 0.88rem; border-radius: 13px; }
@media (max-height: 640px) {
  .profile-promo p { display: none; }
  .profile-link-row { padding: 0.5rem 0.8rem; }
}
@media (max-width: 480px) { .profile-day { width: 31px; height: 31px; } }

/* Stats modal: four headline numbers */
.stats-top-row.stats-four { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.stats-four .stat-box { padding: 0.8rem 0.3rem; }
.stats-four .stat-box .stat-value { font-size: 1.5rem; }
.stats-four .stat-box .stat-label { font-size: 0.68rem; }
@media (max-width: 380px) { .stats-top-row.stats-four { grid-template-columns: 1fr 1fr; } }

/* Past 7 days: letters always visible; a played day gets a colored border; days are links */
a.profile-day { text-decoration: none; cursor: pointer; transition: transform .15s; }
a.profile-day:hover { transform: translateY(-2px); }
.profile-day { border: 2px solid transparent; }
.profile-day.won { background: var(--box-bg); color: var(--text-primary); border-color: var(--green); }
.profile-day.lost { background: var(--box-bg); color: var(--text-primary); border-color: #ef4444; }
.profile-day.won b, .profile-day.lost b { display: inline; }
.profile-day.disabled { opacity: 0.45; cursor: default; }
.profile-day.today { box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--accent); }
body.light-theme .profile-day.lost { color: var(--text-primary); }

/* "Detailed rules" link at the end of the quick how-to-play content */
.how-detail-link {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; font-size: 0.88rem; font-weight: 700;
  color: var(--accent); text-decoration: none;
}
.how-detail-link:hover { text-decoration: underline; }
.how-detail-link i { font-size: 0.8rem; }

/* ===================== MOBILE HEADER ===================== */
.more-wrap { display: none; position: relative; height: 100%; align-items: center; }
.more-menu {
  position: absolute; top: calc(100% - 2px); right: 0; z-index: 700; min-width: 190px; padding: 0.4rem;
  background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.more-item {
  display: flex; align-items: center; gap: 0.8rem; width: 100%; background: none; border: 0; cursor: pointer;
  padding: 0.7rem 0.8rem; border-radius: 10px; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text-primary); text-align: left;
}
.more-item:hover { background: var(--box-bg); }
.more-ico { width: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.more-ico i { font-size: 1.05rem; }
.more-ico svg { width: 22px; height: 22px; }

@media (max-width: 560px) {
  .header-right > .icon-btn { display: none; }
  .more-wrap { display: flex; }
  .top-header-inner { padding: 0 0.4rem 0 0.7rem; gap: 0.3rem; }
  .header-left { gap: 0.1rem; min-width: 0; }
  .header-left, .header-right { flex: 0 0 auto; }
  .brand-logo { height: 22px; }
  /* the actor number sits in the free space between the two groups */
  .header-center { position: static; transform: none; flex: 1; min-width: 0; text-align: center; pointer-events: auto; }
  .header-center span { font-size: 0.8rem; }
}
@media (max-width: 400px) {
  .brand-logo { height: 18px; }
  .mode-selector { padding-left: 0.5rem; padding-right: 0.5rem; font-size: 0.78rem; }
}

/* Brand mark: icon only (no wordmark in the navbar) */
.brand-link { padding: 0 0.3rem; }
.brand-logo { height: 34px; width: 34px; border-radius: 9px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
@media (max-width: 560px) {
  .brand-logo { height: 32px; width: 32px; }
  .header-left #previous-games { display: none; }   /* Archive moves into the menu on phones */
}
@media (max-width: 400px) { .brand-logo { height: 30px; width: 30px; } }

/* Phone: keep "Actor #N" in the exact center of the navbar */
@media (max-width: 560px) {
  .header-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); flex: none; pointer-events: none; }
  .header-center span { font-size: 0.85rem; }
}
@media (max-width: 345px) {
  .mode-selector i { display: none; }
  .header-center span { font-size: 0.78rem; }
}

/* Profile panel: a little more breathing room */
.profile-panel { width: 400px; padding: 1.1rem 1.4rem 1.4rem; }
.profile-head { margin-bottom: 0.9rem; }
.profile-promo { padding: 0.95rem 1.1rem; margin-bottom: 0.9rem; }
.profile-streak { padding-top: 0.9rem; }
.profile-section { margin-top: 0.8rem; padding-top: 0.7rem; }
.profile-stats { gap: 0.9rem 1.1rem; }
.profile-stat { padding-top: 0.6rem; }
.profile-link-row { margin-top: 0.8rem; padding: 0.75rem 1rem; }

/* Header icons that are links behave exactly like the buttons */
a.icon-btn, a.icon-btn:hover { text-decoration: none; }
.header-left .icon-btn svg, .header-right .icon-btn svg { width: 26px; height: 26px; }

/* How to Play and Leaderboard pages: only the logo on the left of the navbar */
body.hide-mode-nav .header-left > :not(.brand-link) { display: none !important; }

/* How to Play and Leaderboard: a home icon instead of the logo, and only theme + profile on the right */
.brand-home { display: none; width: 40px; height: 100%; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; transition: background .2s; }
.brand-link:hover .brand-home { background: #3f4365; }
body.light-theme .brand-home { color: #241F10; }
body.light-theme .brand-link:hover .brand-home { background: rgba(36, 31, 16, 0.12); }
body.hide-mode-nav .brand-logo { display: none; }
body.hide-mode-nav .brand-home { display: flex; }
body.hide-mode-nav .header-right > #open-stats,
body.hide-mode-nav .header-right > #open-how-to-play,
body.hide-mode-nav .header-right > #leaderboard-btn { display: none; }
@media (max-width: 560px) {
  /* only two icons left, so show them directly instead of the menu button */
  body.hide-mode-nav .header-right > #theme-toggle,
  body.hide-mode-nav .header-right > #account-btn { display: flex; }
  body.hide-mode-nav .more-wrap { display: none; }
}
.brand-link, .brand-link:hover { text-decoration: none; }

/* Font Awesome loads after this file and sets display on .fas, so these need higher specificity:
   the home icon exists only on the How to Play and Leaderboard pages. */
.brand-link .brand-home { display: none; }
body.hide-mode-nav .brand-link .brand-home { display: flex; }

/* Phones: the theme button stays in the navbar, next to the menu button */
@media (max-width: 560px) {
  .header-right > #theme-toggle { display: flex; }
}

/* Past 7 days: a finished day gets a soft green / red fill instead of a border */
.profile-day.won { background: rgba(34, 197, 94, 0.26); border-color: transparent; color: var(--text-primary); }
.profile-day.lost { background: rgba(239, 68, 68, 0.26); border-color: transparent; color: var(--text-primary); }
body.light-theme .profile-day.won { background: rgba(34, 197, 94, 0.3); }
body.light-theme .profile-day.lost { background: rgba(239, 68, 68, 0.26); }
.profile-day.won { background: rgba(34, 197, 94, 0.34); }
.profile-day.lost { background: rgba(239, 68, 68, 0.34); }

/* ===== Brand logo: clapperboard + SPOTLE / ACTOR lettering (inline SVG, follows the header text colour) ===== */
.brand-logo { height: 36px; width: auto; border-radius: 0; box-shadow: none; display: block; color: #fff; }
.brand-logo.logo-icon-only { display: none; }
body.light-theme .brand-logo { color: #241F10; }
@media (max-width: 560px) {
  /* phones: just the clapperboard icon */
  .brand-logo.logo-full { display: none; }
  .brand-logo.logo-icon-only { display: block; height: 32px; width: auto; }
}
body.hide-mode-nav .brand-logo { display: none !important; }
.footer-logo { max-width: 230px; }

/* "ACTOR" in the navbar logo: yellow on the dark header, a deep gold on the yellow light-theme header */
.brand-logo .logo-accent { stroke: #facb1c; }
body.light-theme .brand-logo .logo-accent { stroke: #6b4a00; }

/* Navbar: only the clapperboard icon (the full lockup lives in the footer / rating card) */
.brand-logo.logo-full { display: none; }
.brand-logo.logo-icon-only { display: block; height: 34px; width: auto; }
.logo-section { margin-bottom: 1.1rem; }
.footer-logo { max-width: 250px; }
.how-page-inner { padding-top: 1.6rem; }

/* ===================== WIN / GIVE-UP MODAL ===================== */
#win-screen { align-items: center; padding: 1rem; overflow: hidden; }
.win-modal-content {
  --win-accent: var(--green);
  --win-glow: rgba(34, 197, 94, 0.22);
  max-width: 580px; width: 100%; max-height: calc(100vh - 1.5rem); overflow: hidden; padding: 0 1.6rem 1.5rem;
  background: radial-gradient(110% 38% at 50% 0%, var(--win-glow), transparent 70%), linear-gradient(180deg, #121b2f, #0c1322);
  border: 1px solid var(--border-subtle); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.win-modal-content.is-loss { --win-accent: #f0657a; --win-glow: rgba(240, 101, 122, 0.16); }
.win-modal-content .close-btn { top: 0.75rem; right: 0.85rem; }

.win-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.win-confetti i { position: absolute; top: -12px; width: 7px; height: 12px; border-radius: 2px; opacity: 0; animation: winConfetti 2.4s ease-in forwards; }
@keyframes winConfetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--drift, 0), 320px) rotate(540deg); }
}

/* top strip */
.win-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 1.1rem 2.6rem 0.9rem 0;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.win-top b { font-weight: 700; }
.win-next .timer-display { font-family: inherit; font-size: inherit; letter-spacing: 0.12em; color: var(--text-primary); margin-left: 0.4rem; }

/* result */
.win-hero { display: flex; align-items: center; gap: 1rem; margin-top: 1.2rem; text-align: left; position: relative; }
.win-badge {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  color: var(--win-accent); background: rgba(255, 255, 255, 0.05); border: 2px solid var(--win-accent);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.03), 0 0 24px var(--win-glow); position: relative;
}
.win-modal-content.is-win .win-badge { animation: winBadgePop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.win-modal-content.is-win .win-badge::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--win-accent); animation: winRing 2.2s ease-out infinite; pointer-events: none; }
@keyframes winBadgePop { 0% { transform: scale(.3) rotate(-25deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes winRing { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.win-hero-text { min-width: 0; }
.win-eyebrow { margin: 0 0 0.15rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--win-accent); }
.win-hero h2 { margin: 0 0 0.2rem; font-size: 1.7rem; line-height: 1.15; font-weight: 800; color: var(--text-primary); background: none; -webkit-text-fill-color: currentColor; }
#win-sub-text { margin: 0; font-size: 0.88rem; line-height: 1.4; color: var(--text-secondary); }
#win-sub-text strong { color: var(--text-primary); }

.win-pips { display: grid; grid-template-columns: repeat(var(--pips, 10), 1fr); gap: 5px; margin: 1rem 0 0; }
.win-pips i { height: 7px; border-radius: 999px; background: var(--box-bg); }
.win-pips i.used, .win-pips i.miss, .win-pips i.hit { animation: winPip .35s ease both; }
.win-pips i.used { background: var(--yellow); }
.win-pips i.miss { background: #8a96a8; }
.win-pips i.hit { background: var(--green); box-shadow: 0 0 10px var(--green); }
@keyframes winPip { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* the mystery actor */
.win-actor-wrap {
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem 1.2rem; margin-top: 1.2rem; padding: 1rem; text-align: left;
  border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-subtle);
}
.win-modal-content.is-win .win-actor-wrap { border-color: rgba(34, 197, 94, 0.35); background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.02)); }
.win-actor-photo { width: 104px; height: 156px; object-fit: cover; object-position: center top; border-radius: 12px; background: var(--box-bg); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.win-actor-info { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.win-actor-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-secondary); }
.win-actor-name { margin: 0; font-size: 1.4rem; line-height: 1.15; font-weight: 800; color: var(--text-primary); }
.win-actor-sub { font-size: 0.82rem; color: var(--text-secondary); }
.win-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin: 0.45rem 0 0; }
.win-facts div { min-width: 0; }
.win-facts dt { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.win-facts dd { margin: 0.1rem 0 0; font-size: 0.84rem; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-genres { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.win-genre { padding: 0.18rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600; background: var(--pill-bg); color: var(--text-primary); }
.win-actor-link { align-self: flex-start; margin-top: 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.win-actor-link:hover { text-decoration: underline; }

.win-costars { grid-column: 1 / -1; border-top: 1px solid var(--border-subtle); padding-top: 0.8rem; }
.win-costars-label { display: block; margin-bottom: 0.55rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.win-costars-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.win-costar { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 56px; color: var(--text-secondary); }
.win-costar img, .win-costar > i { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center top; background: var(--box-bg); border: 2px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; }
.win-costar span { max-width: 100%; font-size: 0.64rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* numbers + actions */
.win-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-top: 1.1rem; }
.win-stats.two { grid-template-columns: repeat(2, 1fr); }
.win-stat { display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.6rem; border-top: 2px solid #2f62dd; text-align: left; }
.win-stat:first-child { border-top-color: var(--win-accent); }
.win-stat-label { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); }
.win-stat-val { font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--text-primary); }
.win-stat:first-child .win-stat-val { color: var(--win-accent); }

.win-actions { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.win-share-btn, .win-ghost-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.55rem; padding: 0.85rem 0.8rem; border-radius: 999px;
  font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; transition: transform .15s, filter .15s, background .15s;
}
.win-share-btn { border: 0; background: var(--accent); color: var(--yellow-text); box-shadow: 0 8px 22px rgba(250, 203, 28, 0.22); }
.win-share-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.win-ghost-btn { background: transparent; color: var(--text-primary); border: 1px solid var(--border-subtle); }
.win-ghost-btn:hover { background: var(--box-bg); border-color: var(--accent); }

body.light-theme .win-modal-content {
  background: radial-gradient(110% 38% at 50% 0%, var(--win-glow), transparent 70%), var(--bg);
}
body.light-theme .win-badge { background: #fff; }
body.light-theme .win-actor-wrap { background: #fff; }

/* medium screens: drop the co-stars and tighten */
@media (max-height: 820px) {
  .win-costars { display: none; }
}
@media (max-height: 700px) {
  .win-badge { width: 46px; height: 46px; font-size: 1.2rem; }
  .win-hero { margin-top: 0.9rem; }
  .win-hero h2 { font-size: 1.45rem; }
  .win-actor-photo { width: 78px; height: 117px; }
  .win-facts { display: none; }
  .win-actor-wrap { margin-top: 0.9rem; padding: 0.8rem; }
  .win-stats { margin-top: 0.9rem; }
  .win-stat-val { font-size: 1.4rem; }
  .win-actions { margin-top: 0.9rem; }
}
@media (max-height: 560px) {
  .win-badge, .win-pips, .win-genres, #win-sub-text { display: none; }
  .win-actor-photo { width: 56px; height: 84px; }
}
@media (max-width: 480px) {
  .win-modal-content { padding: 0 1.1rem 1.2rem; }
  .win-top { font-size: 0.64rem; letter-spacing: 0.1em; }
  .win-next .timer-display { letter-spacing: 0.06em; margin-left: 0.25rem; }
  .win-hero h2 { font-size: 1.4rem; }
  .win-actor-photo { width: 84px; height: 126px; }
  .win-facts { grid-template-columns: 1fr; }
  .win-stat-val { font-size: 1.4rem; }
  .win-stats { gap: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) { .win-modal-content *, .win-modal-content *::after { animation: none !important; } }

/* Win modal: let long film titles wrap, and keep phones within the screen */
.win-facts dd { white-space: normal; line-height: 1.3; overflow: visible; }
.win-actor-photo { align-self: start; }
@media (max-width: 480px) {
  .win-costars { display: none; }
  .win-facts { grid-template-columns: 1fr 1fr; gap: 0.45rem 0.8rem; }
  .win-facts dd { font-size: 0.78rem; }
  .win-top { white-space: nowrap; font-size: 0.58rem; letter-spacing: 0.06em; padding-right: 2.2rem; }
  .win-share-btn, .win-ghost-btn { font-size: 0.84rem; white-space: nowrap; padding: 0.8rem 0.4rem; gap: 0.4rem; }
  .win-actor-photo { width: 76px; height: 114px; }
  .win-actor-name { font-size: 1.25rem; }
}
@media (max-width: 480px) and (max-height: 760px) { .win-facts { display: none; } }

/* Win modal: plain modal colour (no glow), no badge, squarer buttons */
.win-modal-content,
body.light-theme .win-modal-content { background: var(--card-bg); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
body.light-theme .win-modal-content { background: var(--bg); }
.win-modal-content.is-win .win-actor-wrap { background: rgba(255, 255, 255, 0.04); border-color: var(--border-subtle); }
body.light-theme .win-actor-wrap { background: #fff; }
.win-pips i.hit { box-shadow: none; }
.win-hero { display: block; margin-top: 1.1rem; }
.win-share-btn, .win-ghost-btn { border-radius: 10px; }
.win-share-btn { box-shadow: none; }

/* Phones: the win screen shows only age and top-rated film (no active years / biggest hit) */
@media (max-width: 480px) { .win-fact-active, .win-fact-hit { display: none; } }

/* The game number belongs to the game screen only, not the How to Play / Leaderboard pages */
body.hide-mode-nav .header-center { display: none; }

/* ===================== HINT MODAL (simple) ===================== */
.hint-modal-content, body.light-theme .hint-modal-content {
  max-width: 560px; width: 100%; background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); padding: 0 1.6rem 1.5rem; overflow: visible;
}
body.light-theme .hint-modal-content { background: var(--bg); }
.hint-modal-content .modal-header, .hint-modal-content .modal-header::before { text-align: left; }
.hint-modal-content .modal-header { padding: 1.6rem 3.5rem 0.2rem 0; }
.hint-modal-content .modal-header::before { content: none; display: none; animation: none; }
.hint-modal-content .modal-body { padding: 0; overflow: visible; }
.hint-modal-content .how-title, body.light-theme .hint-modal-content .how-title {
  margin: 0; font-size: 1.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em;
  background: none; -webkit-text-fill-color: currentColor; color: var(--text-primary);
}
.hint-modal-subtitle {
  display: block; margin: 0.9rem 0 1rem; font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-secondary);
}
.hint-modal-subtitle::before, .hint-modal-subtitle::after { content: none; }
.hint-modal-content .close-btn {
  top: 1.1rem; right: 1.1rem; width: 42px; height: 42px; font-size: 1.5rem; color: var(--text-primary);
  background: var(--box-bg); border: 1px solid var(--border-subtle); border-radius: 50%;
}

.hint-modal-note, body.light-theme .hint-modal-note {
  margin: 0 0 1rem; padding: 0.7rem 0.9rem; text-align: left; font-size: 0.85rem; color: var(--text-secondary);
  background: var(--box-bg); border: 1px solid var(--border-subtle); border-radius: 10px;
}

.hint-option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1rem; }
.hint-option-card-btn {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.7rem; padding: 1.2rem 0.7rem 1.1rem;
  background: var(--box-bg); border: 1px solid var(--border-subtle); border-radius: 12px; color: var(--text-primary);
  box-shadow: none; transition: border-color .15s, background .15s; overflow: visible;
}
.hint-option-card-btn::before { content: none !important; }
.hint-option-card-btn:hover:not(.locked):not(.revealed) { border-color: var(--accent); box-shadow: none; background: var(--box-bg); }
.hint-option-icon { width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; font-size: 1.35rem; color: var(--accent); }
.hint-option-card-btn:hover:not(.locked):not(.revealed) .hint-option-icon { transform: none; }
.hint-option-title { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.hint-option-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.35; }
.hint-option-card-btn.locked { background: transparent; border-style: dashed; opacity: 0.65; }
.hint-option-card-btn.locked .hint-option-icon { color: var(--text-muted); filter: none; opacity: 1; background: none; }
.hint-option-card-btn.revealed { background: transparent; border-color: var(--green); box-shadow: none; }
.hint-option-card-btn.revealed .hint-option-icon { color: var(--green); background: none; box-shadow: none; }
.hint-revealed-badge { background: none; color: var(--green); box-shadow: none; padding: 0; font-size: 0.72rem; }

.hint-keep-guessing-btn, body.light-theme .hint-keep-guessing-btn {
  display: block; width: 100%; padding: 0.95rem; background: transparent; border: 1px solid var(--text-secondary); border-radius: 999px;
  color: var(--text-primary); font-family: var(--font); font-weight: 700; font-size: 1rem; letter-spacing: 0; text-transform: none; box-shadow: none; transform: none;
}
.hint-keep-guessing-btn:hover { background: var(--box-bg); box-shadow: none; transform: none; }
.hint-dont-show-btn { display: block; margin: 1rem auto 0; width: auto; font: inherit; font-size: 0.9rem; color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; }
.hint-dont-show-btn:hover { color: var(--text-primary); }

/* hint cards in the feed: plain accent border, no glow */
.hint-card { box-shadow: none; border-width: 1px; }
.hint-card-note { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--text-secondary); }
.hint-name-shape { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.hint-word { display: inline-flex; gap: 5px; }
.hint-word i { width: 15px; height: 24px; border-bottom: 3px solid var(--accent); display: block; }
.hint-card .pills { margin: 0; }

@media (max-width: 520px) {
  .hint-modal-content { padding: 0 1.1rem 1.2rem; }
  .hint-option-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .hint-option-card-btn { flex-direction: row; text-align: left; gap: 0.9rem; padding: 0.9rem 1rem; flex-wrap: wrap; }
  .hint-option-icon { width: 26px; text-align: center; }
  .hint-option-title { font-size: 0.85rem; }
  .hint-option-desc { flex-basis: 100%; padding-left: calc(26px + 0.9rem); margin-top: -0.55rem; font-size: 0.78rem; }
  .hint-revealed-badge { margin-left: auto; }
}
@media (max-width: 520px) { .hint-modal-content { width: calc(100% - 1.5rem); } }

/* Hint modal: a little smaller, and the same close button as the other modals */
.hint-modal-content, body.light-theme .hint-modal-content { max-width: 440px; padding: 0 1.3rem 1.2rem; border-radius: 16px; }
.hint-modal-content .modal-header { padding: 1.3rem 2.6rem 0 0; }
.hint-modal-content .how-title, body.light-theme .hint-modal-content .how-title { font-size: 1.2rem; }
.hint-modal-subtitle { margin: 0.5rem 0 0.9rem; font-size: 0.9rem; }
.hint-modal-content .close-btn {
  top: 0.6rem; right: 1rem; width: 32px; height: 32px; font-size: 1.6rem; color: var(--text-secondary);
  background: transparent; border: 0; border-radius: 50%;
}
.hint-modal-content .close-btn:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.08); }
body.light-theme .hint-modal-content .close-btn:hover { background: rgba(43, 36, 16, 0.08); }
.hint-modal-note, body.light-theme .hint-modal-note { margin-bottom: 0.8rem; padding: 0.55rem 0.8rem; font-size: 0.8rem; }
.hint-option-grid { gap: 0.55rem; margin-bottom: 0.8rem; }
.hint-option-card-btn { gap: 0.5rem; padding: 0.9rem 0.5rem 0.85rem; border-radius: 10px; }
.hint-option-icon { font-size: 1.15rem; }
.hint-option-title { font-size: 0.72rem; }
.hint-option-desc { font-size: 0.72rem; }
.hint-keep-guessing-btn, body.light-theme .hint-keep-guessing-btn { padding: 0.75rem; font-size: 0.92rem; }
.hint-dont-show-btn { margin-top: 0.8rem; font-size: 0.82rem; }
@media (max-width: 520px) {
  .hint-option-card-btn { padding: 0.75rem 0.9rem; }
  .hint-option-desc { font-size: 0.72rem; }
}

/* Hint modal: "Keep guessing" matches the win-screen buttons (squarer corners) */
.hint-keep-guessing-btn, body.light-theme .hint-keep-guessing-btn { border-radius: 10px; }

/* Hint modal: smaller "N uses remaining" line */
.hint-modal-subtitle { font-size: 0.8rem; }

/* Light theme: stars need real contrast against the cream background */
body.light-theme .rating-stars .star { color: #CDBF98; -webkit-text-stroke: 1px #B7A674; }
body.light-theme .rating-stars .star.selected,
body.light-theme .rating-stars .star.hovered { color: #E3A008; -webkit-text-stroke: 1px #B8790A; filter: drop-shadow(0 0 6px rgba(227, 160, 8, 0.4)); }

/* ===================== ABOUT / SEO CONTENT ===================== */
.seo-content { width: 100%; padding: 2.2rem 1rem 1rem; box-sizing: border-box; }
.seo-content-inner { max-width: 640px; margin: 0 auto; }
.seo-content h2 { margin: 0 0 1rem; font-size: 1.45rem; line-height: 1.25; font-weight: 800; color: var(--text-primary); }
.seo-content h3 { margin: 1.8rem 0 0.5rem; font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.seo-content p { margin: 0 0 0.9rem; font-size: 0.95rem; line-height: 1.75; color: var(--text-secondary); }
.seo-content a, .faq-answer a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
body.light-theme .seo-content a, body.light-theme .faq-answer a { color: #B8790A; }

/* Footer: "Actor data by TMDB" with the official logo */
.footer-links a.footer-tmdb { display: inline-flex; align-items: center; gap: 0.45rem; }
.footer-tmdb img { height: 10px; width: auto; display: block; }
