@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
* { -webkit-tap-highlight-color: transparent; }

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #0f0e17;
  --surface:   #1e1b36;
  --card:      #252248;
  --primary:   #ff6b35;
  --gold:      #ffd700;
  --cyan:      #00d4ff;
  --green:     #39ff14;
  --danger:    #ff3366;
  --text:      #f0f0ff;
  --muted:     #8888aa;
  --border:    #3a3560;
  --shadow:    rgba(0,0,0,0.7);
  --font:      'Press Start 2P', monospace;
}

/* ── Base ──────────────────────────────────────────────────── */
html { font-size: 10px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  min-height: 100vh;
}

body:not(.home-page) main {
  padding-top: 28px;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.home-container {
  max-width: 1240px;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  background: var(--bg);
  border-bottom: 3px solid var(--gold);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 0 #000;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-inner-guest {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav-inner-guest .nav-logo {
  justify-self: start;
}
.nav-inner-guest .nav-links {
  justify-content: center;
}
.nav-inner-guest .nav-right {
  justify-self: end;
}
.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
  text-align: center;
}
.nav-logo-small {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 5px;
  line-height: 1.2;
}
.nav-logo-trip {
  color: var(--gold);
}
.nav-logo-main {
  font-size: 1.28rem;
  color: var(--primary);
  text-shadow: 4px 4px 0 #7a2000, 2px 2px 0 #000;
  letter-spacing: 2px;
  line-height: 1.05;
}
.nav-home {
  background: transparent;
  box-shadow: none;
}
.home-page .nav-home .nav-logo {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.home-page.mobile-menu-open .nav-home .nav-logo {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.home-page.mobile-menu-open .nav-home {
  background: rgba(15, 14, 23, 0.98);
  border-bottom-color: var(--gold);
  box-shadow: 0 4px 0 #000;
  backdrop-filter: blur(10px);
}
.home-page.home-scrolled .nav-home {
  background: rgba(15, 14, 23, 0.96);
  border-bottom-color: var(--gold);
  box-shadow: 0 4px 0 #000;
  backdrop-filter: blur(10px);
}
.home-page.home-scrolled .nav-home .nav-logo {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.nav-link {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.1s;
}
.nav-link:hover { color: var(--gold); }
.nav-link.active { color: var(--cyan); }
.nav-user {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}
.nav-user span { color: var(--cyan); }
.nav-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-avatar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.18s ease;
}
.nav-avatar-toggle:hover {
  transform: translateY(-1px);
}
.mobile-menu-open .nav-avatar-toggle {
  transform: scale(1.06);
}
.nav-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--surface);
  flex-shrink: 0;
}
.nav-user-email {
  font-size: 0.65rem;
  color: var(--muted);
}

/* ── Game title ────────────────────────────────────────────── */
.game-title {
  display: none;
  text-align: center;
  padding: 48px 20px 32px;
  user-select: none;
  transition: transform 0.2s ease, filter 0.2s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  overflow: hidden;
  max-height: 240px;
}
.game-title .line-small {
  display: inline-block;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 6px;
  margin-bottom: 12px;
}
.game-title .line-small {
  margin-left: auto;
  margin-right: auto;
}
.game-title .line-small .word-trip {
  color: var(--gold);
}
.game-title .line-main {
  display: block;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  color: var(--primary);
  text-shadow: 5px 5px 0 #7a2000, 3px 3px 0 #000;
  letter-spacing: 3px;
  line-height: 1.4;
}
.home-page .game-title {
  display: block;
  padding-top: 32px;
  padding-bottom: 54px;
  max-height: 460px;
}
.home-page .game-title .line-small {
  font-size: 2.2rem;
  letter-spacing: 12px;
}
.game-title .line-stage {
  display: block;
  font-size: 1.4rem;
  letter-spacing: 8px;
  margin-top: 18px;
  opacity: 0.9;
}
.home-page .game-title .line-stage {
  font-size: 1.8rem;
  letter-spacing: 10px;
  margin-top: 24px;
}
.home-page .game-title .line-main {
  font-size: clamp(4.8rem, 12vw, 8.8rem);
  letter-spacing: 6px;
  line-height: 1.12;
}
.home-page.home-scrolled .game-title {
  pointer-events: none;
}

/* ── Home divider & section label ─────────────────────────── */
.home-divider {
  border: none;
  border-top: 2px solid var(--gold);
  margin: 32px 0;
}
.home-section-label {
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: 5px;
  margin: 0 0 20px;
}
.home-section-label-lg {
  font-size: 1.6rem;
  letter-spacing: 6px;
  margin-bottom: 28px;
}

/* ── Home countdown ───────────────────────────────────────── */
.home-countdown {
  display: inline-block;
  text-align: center;
  margin: 0 auto 40px;
  padding: 12px 24px;
  background: #000;
  border: 2px solid var(--cyan);
  box-shadow: 3px 3px 0 #000;
}
.home-countdown-label {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.home-countdown-timer {
  display: block;
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  color: var(--cyan);
  text-shadow: 2px 2px 0 #003a3a;
  letter-spacing: 2px;
}
.home-countdown-date {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 1px;
  margin-top: 6px;
}

/* ── Stage banner ──────────────────────────────────────────── */
.stage-banner {
  border: 3px solid currentColor;
  box-shadow: 4px 4px 0 #000;
  padding: 20px 24px;
  margin: 0 0 32px;
  background: var(--surface);
}
.stage-banner .stage-label {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.stage-banner .stage-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 2;
}
.stage-deadline {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--gold);
}

.profile-photo-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
  padding: 24px 28px;
  border-color: #ffd700;
  box-shadow: 4px 4px 0 #000, 0 0 24px rgba(255,215,0,0.2);
  background:
    linear-gradient(135deg, #5a110c 0%, #7a1e10 45%, #a62b12 100%);
}

.profile-photo-reminder-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}

.profile-photo-reminder-kicker {
  font-size: 0.95rem;
  color: #ffd700;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.55);
  letter-spacing: 2px;
}

.profile-photo-reminder-title {
  color: #fff4c2;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  text-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}

.profile-photo-reminder p {
  font-size: 0.8rem;
  color: #ffe5c7;
  line-height: 1.95;
  max-width: 72ch;
}

.profile-photo-reminder .btn-primary {
  background: #ffd700;
  color: #160800;
  border: 3px solid rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.bonus-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 0 0 24px;
}

.bonus-card {
  padding: 20px 22px;
  border-color: var(--green);
  box-shadow: 4px 4px 0 #000, 0 0 18px rgba(57,255,20,0.16);
  background: linear-gradient(135deg, rgba(18, 54, 18, 0.96), rgba(30, 72, 34, 0.96));
}

.bonus-card-points {
  font-size: 1.7rem;
  color: var(--green);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
  margin-bottom: 10px;
}

.bonus-card-title {
  font-size: 0.95rem;
  color: #d9ffd0;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.bonus-card p {
  font-size: 0.75rem;
  color: #c7f7be;
  line-height: 1.9;
}

.players-showcase {
  margin: 0 0 32px;
  padding: 22px 0 20px 24px;
  overflow: hidden;
  border-color: var(--cyan);
  background:
    radial-gradient(circle at top left, rgba(0,212,255,0.2), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent),
    var(--surface);
}

.players-showcase-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px 14px 0;
}

.players-showcase-label {
  font-size: 1.4rem;
  color: var(--cyan);
  text-shadow: 3px 3px 0 #000;
}

.players-showcase-subtitle {
  font-size: 0.72rem;
  color: var(--muted);
}

.players-carousel {
  position: relative;
  overflow: hidden;
  padding: 6px 0;
}

.players-carousel::before,
.players-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 2;
  pointer-events: none;
}

.players-carousel::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface), transparent);
}

.players-carousel::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface), transparent);
}

.players-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  padding-right: 24px;
}

.players-track.is-animated {
  animation: players-marquee 26s linear infinite;
}

.player-chip {
  flex: 0 0 auto;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.player-avatar-frame {
  width: 154px;
  height: 154px;
  border-radius: 50%;
  padding: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  box-shadow: 0 0 0 3px #000, 0 0 18px rgba(0,212,255,0.22);
}

.player-avatar {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card);
  border: 3px solid var(--bg);
}

.player-name {
  width: 100%;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes players-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 7px)); }
}

/* ── Pixel box ──────────────────────────────────────────────── */
.pixel-box {
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: 4px 4px 0 #000;
}
.pixel-box-gold {
  border-color: var(--gold);
  box-shadow: 4px 4px 0 #000, 0 0 16px rgba(255,215,0,0.15);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 12px 20px;
  cursor: pointer;
  border: none;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.08s, box-shadow 0.08s;
  white-space: nowrap;
}
.btn:hover  { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }

.btn-primary  { background: var(--primary); color: #000; }
.btn-gold     { background: var(--gold);    color: #000; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-outline  { background: transparent; color: var(--gold); border: 3px solid var(--gold); box-shadow: 4px 4px 0 #000; }
.btn-outline:hover { background: var(--gold); color: #000; }
.btn-sm { font-size: 0.75rem; padding: 8px 14px; }
.btn-full { display: block; width: 100%; text-align: center; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 12px 14px;
  border: 3px solid var(--border);
  box-shadow: inset 2px 2px 0 #000;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus { border-color: var(--cyan); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 6px;
}
.reward-highlight {
  color: #39ff14;
  text-shadow: 1px 1px 0 #052b00;
}
.datetime-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.datetime-picker-btn {
  background: transparent;
  color: var(--gold);
  border: 3px solid var(--gold);
  box-shadow: 4px 4px 0 #000;
  font-family: var(--font);
  font-size: 0.72rem;
  padding: 0 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.datetime-picker-btn:hover,
.datetime-picker-btn:focus-visible {
  background: var(--gold);
  color: #000;
}
.datetime-picker-btn:active {
  transform: translate(1px, 1px);
}
.duration-input-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.duration-input-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.duration-input-label {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 2px;
}

/* File input */
.form-file-label {
  display: block;
  background: var(--bg);
  border: 3px dashed var(--border);
  padding: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s;
}
.form-file-label:hover { border-color: var(--cyan); color: var(--cyan); }
.form-file-input { display: none; }

/* ── Destination cards ──────────────────────────────────────── */
.destination-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  align-items: start;
}

.destination-card {
  background: var(--card);
  border: 3px solid var(--border);
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.18s ease, filter 0.18s ease;
  position: relative;
  align-self: start;
}
.destination-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}
.destination-card.winner {
  border-color: var(--gold);
  box-shadow: 4px 4px 0 #000, 0 0 24px rgba(255,215,0,0.25);
}
.destination-card.winner-featured {
  grid-column: 1 / -1;
}
.destination-card.winner-featured .card-photo,
.destination-card.winner-featured .card-photo-placeholder {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 420px;
}
.destination-card.winner-featured .card-info {
  padding: 20px 24px 24px;
}
.destination-card.winner-featured .card-name {
  font-size: 1.7rem;
}
.destination-card.winner-featured .card-points {
  font-size: 1.1rem;
}
.destination-card.winner-featured .card-owner {
  font-size: 0.82rem;
}
.destination-card.winner-featured .card-owner-avatar {
  width: 32px;
  height: 32px;
}
.decided .destination-card:not(.winner-featured):not(.expanded) {
  opacity: 0.62;
  filter: brightness(0.72) saturate(0.82);
}
.decided .destination-card:not(.winner-featured):hover,
.decided .destination-card:not(.winner-featured).expanded {
  opacity: 1;
  filter: none;
}
.placement-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 14, 23, 0.92);
  color: var(--gold);
  font-size: 0.68rem;
  padding: 4px 8px;
  border: 2px solid var(--gold);
  box-shadow: 2px 2px 0 #000;
  z-index: 10;
}
.card-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  image-rendering: auto;
  display: block;
}
.card-photo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--muted);
}
.detail-photo-gallery,
.card-photo-gallery {
  margin-bottom: 12px;
}
.card-info {
  padding: 14px 16px;
}
.card-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-name {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 8px;
  line-height: 1.6;
  text-shadow: 2px 2px 0 #000;
}
.winner-mark {
  font-size: 4.2rem;
  line-height: 1;
  letter-spacing: 8px;
  flex-shrink: 0;
  filter: drop-shadow(3px 3px 0 #000);
  margin-top: 18px;
}
.card-creator {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.card-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 24px;
  font-size: 0.65rem;
  color: var(--cyan);
}
.card-owner-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--surface);
  flex-shrink: 0;
}
.card-points {
  font-size: 0.8rem;
  color: var(--gold);
  min-height: 1.8rem;
}
.winner-points-mark { display: none; }
.card-expand-hint {
  font-size: 0.65rem;
  color: var(--border);
  margin-top: 6px;
  transition: color 0.1s;
}
.destination-card:hover .card-expand-hint { color: var(--cyan); }

.card-description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s;
  border-top: 0 solid var(--border);
}
.destination-card.expanded .card-description {
  max-height: 460px;
  padding: 18px;
  border-top-width: 2px;
  overflow-y: auto;
}
.destination-card.winner-featured.expanded .card-description {
  max-height: 980px;
}
.card-description p {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 2.2;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.card-description::-webkit-scrollbar {
  width: 8px;
}
.card-description::-webkit-scrollbar-thumb {
  background: var(--border);
}

/* ── Vote cards ─────────────────────────────────────────────── */
.vote-card {
  background: var(--card);
  border: 3px solid var(--border);
  box-shadow: 4px 4px 0 #000;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.1s, transform 0.1s;
}
.vote-card:hover { transform: translate(-1px, -1px); }
.vote-card.selected { border-color: var(--cyan); box-shadow: 4px 4px 0 #000, 0 0 12px rgba(0,212,255,0.2); }
.vote-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.vote-card-info { flex: 1; }
.vote-card-name { font-size: 0.85rem; color: var(--text); margin-bottom: 4px; }
.vote-card-creator { font-size: 0.7rem; color: var(--muted); }
.vote-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-size: 0.65rem;
  color: var(--muted);
}

.vote-card-points {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vote-point-choice {
  display: none;
}

.vote-point-pill {
  display: inline-block;
  padding: 10px 14px;
  background: var(--surface);
  border: 3px solid var(--border);
  font-family: var(--font);
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: all 0.1s;
  white-space: nowrap;
}

.vote-point-choice:checked + .vote-point-pill,
.vote-point-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 3px 3px 0 #000;
}

.vote-point-choice:checked + .vote-point-pill {
  background: rgba(255,215,0,0.08);
}


/* ── Tables (admin) ─────────────────────────────────────────── */
.pixel-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.pixel-table th,
.pixel-table td {
  border: 2px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
}
.pixel-table th { background: var(--surface); color: var(--gold); }
.pixel-table td { background: var(--card); }
.pixel-table tr:hover td { background: #2a2650; }

/* ── Alerts / flash messages ─────────────────────────────────── */
.alert {
  padding: 12px 16px;
  font-size: 0.8rem;
  border: 3px solid;
  box-shadow: 3px 3px 0 #000;
  margin-bottom: 20px;
  line-height: 2;
}
.alert-error   { border-color: var(--danger); color: var(--danger); background: rgba(255,51,102,0.1); }
.alert-success { border-color: var(--green);  color: var(--green);  background: rgba(57,255,20,0.08); }
.alert-info    { border-color: var(--cyan);   color: var(--cyan);   background: rgba(0,212,255,0.08); }

/* ── Sections ────────────────────────────────────────────────── */
.section { margin-bottom: 48px; }
.section-title {
  font-size: 1rem;
  color: var(--gold);
  border-bottom: 3px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 24px;
}

/* ── Login box ────────────────────────────────────────────────── */
.login-box {
  max-width: 420px;
  margin: 60px auto;
  background: var(--surface);
  border: 3px solid var(--gold);
  box-shadow: 6px 6px 0 #000;
  padding: 32px;
}
.login-title {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 24px;
  text-align: center;
}

/* ── Removed badge ────────────────────────────────────────────── */
.badge-removed {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  box-shadow: 2px 2px 0 #000;
}

/* ── Misc utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); font-size: 0.8rem; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 0.85rem;
  border: 3px dashed var(--border);
  line-height: 2.5;
}

/* ── Example badge ───────────────────────────────────────────── */
.badge-example {
  display: inline-block;
  background: var(--surface);
  color: var(--muted);
  border: 2px solid var(--border);
  font-size: 0.6rem;
  padding: 2px 6px;
}

/* ── Eye button (masked email) ───────────────────────────────── */
.eye-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 4px;
  vertical-align: middle;
  opacity: 0.6;
  transition: opacity 0.1s;
}
.eye-btn:hover { opacity: 1; }
.masked-email {
  letter-spacing: 2px;
  color: var(--muted);
}
.admin-reveal-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Verify code box ─────────────────────────────────────────── */
.verify-box {
  background: var(--surface);
  border: 3px solid var(--gold);
  box-shadow: 6px 6px 0 #000;
  padding: 28px;
  margin-bottom: 32px;
}
.verify-box .verify-title {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.destination-gallery {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface);
}
.card-photo-gallery,
.detail-photo-gallery {
  width: 100%;
  min-height: 180px;
}
.detail-photo-gallery {
  height: 260px;
}
.destination-card.winner-featured .card-description .detail-photo-gallery {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 420px;
}
.current-destination-gallery-main {
  width: 100%;
  max-width: 100%;
}
.current-destination-gallery-main + .current-destination-gallery-secondary {
  margin-top: 24px;
}
.current-destination-gallery-main .destination-gallery-slide img,
.current-destination-gallery-secondary .destination-gallery-slide img {
  object-fit: contain;
  background: var(--bg);
}
.current-destination-gallery-secondary .destination-gallery-slide img {
  object-fit: cover;
}
.current-destination-gallery-secondary {
  width: 280px;
  max-width: 280px;
  min-height: 280px;
  height: 280px;
  margin-left: auto;
  margin-right: auto;
}
.vote-thumb-gallery {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
}
.destination-gallery-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.destination-gallery-slide {
  display: none;
  position: relative;
  width: 100%;
  height: 100%;
}
.destination-gallery-slide.is-active {
  display: block;
}
.destination-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.destination-gallery-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  font-size: 0.65rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.55);
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.destination-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}
.destination-gallery-arrow.prev { left: 8px; }
.destination-gallery-arrow.next { right: 8px; }
.destination-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.destination-gallery-dot {
  width: 7px;
  height: 7px;
  background: rgba(255,255,255,0.35);
}
.destination-gallery-dot.is-active {
  background: var(--gold);
}

.photo-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.photo-slot {
  background: var(--card);
  border: 2px solid var(--border);
  padding: 12px;
}
.photo-slot-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px dashed var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 12px;
  overflow: hidden;
  font-size: 0.7rem;
  text-align: center;
}
.photo-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-slot-label {
  padding: 12px;
  margin-bottom: 10px;
}
.photo-slot-caption {
  margin-top: 0;
}
.photo-slot-remove {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 10px;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: end;
}
.admin-action-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-action-btn {
  white-space: normal;
  text-align: center;
  line-height: 1.5;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.admin-inline-toggle {
  margin-bottom: 12px;
}
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.secondary-gallery-block {
  margin-bottom: 16px;
}
.secondary-gallery-title {
  font-size: 0.65rem;
  color: var(--gold);
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-align: left;
}
.current-destination-header {
  display: inline-block;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: rgba(255,215,0,0.12);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 1px;
  box-shadow: 3px 3px 0 #000;
}
.detail-text-primary {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 10px;
  line-height: 1.6;
  text-shadow: 2px 2px 0 #000;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail-text-muted {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.profile-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.profile-avatar-large {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 4px 4px 0 #000;
  background: var(--surface);
}

/* ── Mobile nav elements (always present, hidden on desktop) ───── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-hamburger {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font);
  font-size: 1.1rem;
  padding: 5px 10px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.18s ease;
}
.nav-hamburger:hover {
  transform: translateY(-1px);
}
.mobile-menu-open .nav-hamburger {
  background: rgba(255, 215, 0, 0.08);
}
.nav-mobile-menu {
  background: rgba(15, 14, 23, 0.98);
  border-top: 2px solid var(--border);
  backdrop-filter: blur(10px);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  margin-top: 0;
  transition: max-height 0.26s ease, opacity 0.2s ease, transform 0.26s ease, border-color 0.2s ease;
}
.nav-mobile-menu.is-open {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 14px;
}
.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 8px;
  padding-bottom: 12px;
}
.nav-mobile-user {
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.nav-mobile-user-name {
  font-size: 0.8rem;
  color: var(--cyan);
  line-height: 1.7;
}
.nav-mobile-user-email {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.7;
  word-break: break-word;
}
.nav-mobile-links .nav-link {
  font-size: 0.85rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: block;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.2s ease;
}
.nav-mobile-menu.is-open .nav-link {
  opacity: 1;
  transform: translateY(0);
}
.nav-mobile-menu.is-open .nav-link:nth-child(1) { transition-delay: 0.03s; }
.nav-mobile-menu.is-open .nav-link:nth-child(2) { transition-delay: 0.06s; }
.nav-mobile-menu.is-open .nav-link:nth-child(3) { transition-delay: 0.09s; }
.nav-mobile-menu.is-open .nav-link:nth-child(4) { transition-delay: 0.12s; }
.nav-mobile-menu.is-open .nav-link:nth-child(5) { transition-delay: 0.15s; }
.nav-mobile-menu.is-open .nav-link:nth-child(6) { transition-delay: 0.18s; }
.nav-mobile-menu.is-open .nav-link:nth-child(7) { transition-delay: 0.21s; }
.nav-mobile-links .nav-link:last-child { border-bottom: none; }
.nav-mobile-logout { color: var(--danger) !important; }

/* ── Responsive ────────────────────────────────────────────────── */

/* Tablet (≤ 768px) */
@media (max-width: 768px) {
  .destination-grid { grid-template-columns: repeat(2, 1fr); }
  .destination-card.winner-featured { grid-column: 1 / -1; }
  .destination-card.winner-featured .card-photo,
  .destination-card.winner-featured .card-photo,
  .destination-card.winner-featured .card-photo-placeholder {
    min-height: 320px;
  }

  .profile-photo-reminder {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }

  .bonus-card-grid { grid-template-columns: 1fr; }

  .players-showcase-header { flex-direction: column; align-items: flex-start; }
  .player-chip { width: 120px; }
  .player-avatar-frame { width: 96px; height: 96px; }
  .player-name { font-size: 0.7rem; }

  .vote-card { flex-wrap: wrap; align-items: flex-start; }
  .vote-card-points { width: 100%; justify-content: flex-start; }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
  html { font-size: 9px; }

  /* Nav */
  .nav { padding: 14px 0; }
  .nav-inner-guest { display: flex; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; align-items: center; order: -1; }
  .nav-user-text { display: none; }
  .nav-logo { flex: 1; text-align: center; align-items: center; }
  .nav-logo-small { font-size: 0.55rem; letter-spacing: 3px; }
  .nav-logo-main  { font-size: 0.9rem;  letter-spacing: 1px; }
  .nav-user-card { gap: 0; }
  .nav-avatar-toggle { display: inline-flex; }
  .nav-avatar { width: 40px; height: 40px; }

  /* Hero title */
  .home-page .game-title { padding-top: 20px; padding-bottom: 28px; }
  .home-page .game-title .line-small { font-size: 1.2rem; letter-spacing: 5px; }
  .home-page .game-title .line-main  { font-size: clamp(2.6rem, 10.5vw, 4.4rem); letter-spacing: 1px; }
  .home-page .game-title .line-stage { font-size: 1rem; letter-spacing: 3px; margin-top: 14px; }

  /* Section labels */
  .home-section-label    { font-size: 0.85rem; letter-spacing: 2px; }
  .home-section-label-lg { font-size: 1.1rem;  letter-spacing: 3px; }
  .home-divider { margin: 20px 0; }

  /* Countdown */
  .home-countdown { padding: 10px 16px; }
  .home-countdown-timer { font-size: clamp(1rem, 6vw, 1.4rem); }

  /* Players */
  .players-showcase { padding-left: 14px; }
  .players-showcase-label { font-size: 1rem; }
  .player-chip { width: 90px; }
  .player-avatar-frame { width: 72px; height: 72px; padding: 5px; }
  .player-name { font-size: 0.6rem; }

  /* Destinations */
  .destination-grid { grid-template-columns: 1fr; gap: 16px; }
  .destination-card.winner-featured { grid-column: span 1; }
  .destination-card.winner-featured .card-photo,
  .destination-card.winner-featured .card-photo,
  .destination-card.winner-featured .card-photo-placeholder {
    min-height: 220px;
  }
  .destination-card.winner-featured .card-name { font-size: 1.05rem; }
  .destination-card.winner-featured .card-description .detail-photo-gallery {
    min-height: 220px;
  }
  .winner-mark { font-size: 3rem; letter-spacing: 4px; margin-top: 12px; }
  .winner-points-mark { display: none; }
  .destination-card:not(.winner-featured) .card-photo,
  .destination-card:not(.winner-featured) .card-photo-placeholder { min-height: 156px; }
  .destination-card:not(.winner-featured) .card-info { padding: 11px 13px; }
  .destination-card:not(.winner-featured) .card-name { font-size: 0.8rem; }
  .destination-card:not(.winner-featured) .card-points { font-size: 0.74rem; min-height: 1.5rem; }
  .destination-card:not(.winner-featured) .card-owner { font-size: 0.58rem; min-height: 20px; }
  .destination-card:not(.winner-featured) .card-owner-avatar { width: 20px; height: 20px; }
  .destination-card:not(.winner-featured) .card-expand-hint { font-size: 0.58rem; }
  .card-photo,
  .card-photo-placeholder { min-height: 180px; }
  .card-name { font-size: 0.9rem; }

  /* Buttons */
  .btn { font-size: 0.8rem; padding: 10px 16px; }
  .btn-sm { font-size: 0.65rem; padding: 7px 11px; }

  /* Forms */
  .form-input, .form-textarea, .form-select { font-size: 0.8rem; padding: 10px 12px; }
  .datetime-input-wrap { grid-template-columns: 1fr; }
  .duration-input-wrap { grid-template-columns: 1fr 1fr; }
  .datetime-picker-btn { min-height: 42px; }

  /* Admin */
  .admin-grid,
  .admin-form-grid { grid-template-columns: 1fr; }
  .pixel-table { font-size: 0.7rem; }
  .pixel-table th, .pixel-table td { padding: 8px 10px; }

  /* Vote cards */
  .vote-card { gap: 10px; }
  .vote-thumb { width: 64px; height: 48px; }
  .vote-card-name { font-size: 0.75rem; }
  .vote-point-pill { padding: 8px 10px; font-size: 0.65rem; }

  /* Photo slots */
  .photo-slot-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Verify / login boxes */
  .verify-box, .login-box { padding: 20px; }

  /* Pixel box spacing */
  .pixel-box { box-shadow: 3px 3px 0 #000; }

  /* Section title */
  .section-title { font-size: 0.85rem; }

  /* Profile */
  .profile-avatar-large { width: 120px; height: 120px; }
}
