@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&family=Work+Sans:wght@400;600;700;800&family=Special+Gothic+Expanded+One&family=Barlow+Condensed:wght@400;600&display=swap');

:root {
  --bg: #0b0f19;
  --surface: #12182a;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --text: #e8eefc;
  --muted: #a9b4d0;
  --line: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #f5d84a;
  --accent-strong: #e8c730;
  --danger: #ff8f95;
  --shadow: 0 20px 55px -35px rgba(5, 8, 18, 0.95);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  min-height: 100vh;
  font-family: 'Work Sans', sans-serif;
  color: var(--text);
  line-height: 1.5;
  background:
    radial-gradient(circle at 12% 0%, #16233f 0%, transparent 40%),
    radial-gradient(circle at 100% 10%, #132844 0%, transparent 35%),
    linear-gradient(180deg, #0b0f19 0%, #0d1322 55%, #0b0f19 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

body::before {
  box-shadow:
    2vw 4vh 0 0 rgba(255, 255, 255, 0.88), 7vw 16vh 0 0 rgba(201, 224, 255, 0.85),
    12vw 28vh 0 0 rgba(255, 255, 255, 0.86), 17vw 9vh 0 0 rgba(181, 214, 255, 0.82),
    23vw 21vh 0 0 rgba(255, 255, 255, 0.9), 28vw 35vh 0 0 rgba(169, 209, 255, 0.8),
    33vw 14vh 0 0 rgba(255, 255, 255, 0.92), 38vw 31vh 0 0 rgba(188, 219, 255, 0.84),
    44vw 8vh 0 0 rgba(255, 255, 255, 0.86), 49vw 24vh 0 0 rgba(173, 210, 255, 0.8),
    55vw 40vh 0 0 rgba(255, 255, 255, 0.9), 60vw 18vh 0 0 rgba(182, 216, 255, 0.82),
    65vw 30vh 0 0 rgba(255, 255, 255, 0.88), 71vw 12vh 0 0 rgba(168, 206, 255, 0.78),
    76vw 26vh 0 0 rgba(255, 255, 255, 0.9), 82vw 6vh 0 0 rgba(196, 221, 255, 0.84),
    87vw 20vh 0 0 rgba(255, 255, 255, 0.88), 92vw 33vh 0 0 rgba(173, 210, 255, 0.8),
    97vw 15vh 0 0 rgba(255, 255, 255, 0.9), 5vw 46vh 0 0 rgba(181, 214, 255, 0.82),
    11vw 57vh 0 0 rgba(255, 255, 255, 0.9), 16vw 71vh 0 0 rgba(171, 208, 255, 0.8),
    22vw 52vh 0 0 rgba(255, 255, 255, 0.88), 27vw 66vh 0 0 rgba(190, 220, 255, 0.84),
    32vw 48vh 0 0 rgba(255, 255, 255, 0.86), 37vw 74vh 0 0 rgba(173, 210, 255, 0.8),
    43vw 61vh 0 0 rgba(255, 255, 255, 0.9), 48vw 83vh 0 0 rgba(188, 219, 255, 0.82),
    53vw 55vh 0 0 rgba(255, 255, 255, 0.9), 58vw 69vh 0 0 rgba(171, 208, 255, 0.8),
    64vw 51vh 0 0 rgba(255, 255, 255, 0.88), 69vw 78vh 0 0 rgba(193, 222, 255, 0.84),
    74vw 63vh 0 0 rgba(255, 255, 255, 0.9), 79vw 86vh 0 0 rgba(175, 211, 255, 0.8),
    84vw 58vh 0 0 rgba(255, 255, 255, 0.86), 89vw 72vh 0 0 rgba(183, 216, 255, 0.82),
    94vw 54vh 0 0 rgba(255, 255, 255, 0.9), 99vw 80vh 0 0 rgba(171, 208, 255, 0.78),
    8vw 90vh 0 0 rgba(255, 255, 255, 0.86), 14vw 96vh 0 0 rgba(196, 221, 255, 0.82),
    26vw 92vh 0 0 rgba(255, 255, 255, 0.9), 41vw 95vh 0 0 rgba(171, 208, 255, 0.8),
    57vw 93vh 0 0 rgba(255, 255, 255, 0.88), 73vw 97vh 0 0 rgba(188, 219, 255, 0.84),
    88vw 94vh 0 0 rgba(255, 255, 255, 0.9), 3vw 27vh 0 0 rgba(188, 219, 255, 0.82),
    9vw 33vh 0 0 rgba(255, 255, 255, 0.9), 15vw 43vh 0 0 rgba(174, 211, 255, 0.8),
    21vw 11vh 0 0 rgba(255, 255, 255, 0.86), 29vw 82vh 0 0 rgba(185, 218, 255, 0.82),
    34vw 53vh 0 0 rgba(255, 255, 255, 0.9), 40vw 70vh 0 0 rgba(173, 210, 255, 0.8),
    47vw 12vh 0 0 rgba(255, 255, 255, 0.88), 54vw 29vh 0 0 rgba(190, 220, 255, 0.84),
    62vw 7vh 0 0 rgba(255, 255, 255, 0.9), 67vw 47vh 0 0 rgba(172, 209, 255, 0.8),
    72vw 56vh 0 0 rgba(255, 255, 255, 0.88), 80vw 22vh 0 0 rgba(193, 222, 255, 0.84),
    85vw 44vh 0 0 rgba(255, 255, 255, 0.9), 91vw 68vh 0 0 rgba(175, 211, 255, 0.8),
    96vw 90vh 0 0 rgba(255, 255, 255, 0.88), 24vw 98vh 0 0 rgba(188, 219, 255, 0.84);
  opacity: 0.92;
  animation: starDrift 120s linear infinite;
}

body::after {
  width: 3px;
  height: 3px;
  box-shadow:
    6vw 11vh 4px 0 rgba(255, 255, 255, 0.55), 19vw 7vh 5px 0 rgba(184, 219, 255, 0.5),
    31vw 17vh 4px 0 rgba(255, 255, 255, 0.52), 46vw 5vh 6px 0 rgba(178, 213, 255, 0.48),
    59vw 13vh 4px 0 rgba(255, 255, 255, 0.54), 72vw 9vh 5px 0 rgba(188, 221, 255, 0.5),
    86vw 16vh 4px 0 rgba(255, 255, 255, 0.5), 95vw 9vh 6px 0 rgba(177, 212, 255, 0.46),
    10vw 39vh 5px 0 rgba(255, 255, 255, 0.52), 24vw 34vh 4px 0 rgba(186, 220, 255, 0.48),
    36vw 43vh 6px 0 rgba(255, 255, 255, 0.54), 51vw 37vh 5px 0 rgba(179, 214, 255, 0.48),
    63vw 45vh 4px 0 rgba(255, 255, 255, 0.52), 77vw 38vh 6px 0 rgba(188, 221, 255, 0.5),
    91vw 42vh 4px 0 rgba(255, 255, 255, 0.5), 4vw 62vh 5px 0 rgba(182, 217, 255, 0.46),
    18vw 57vh 4px 0 rgba(255, 255, 255, 0.54), 29vw 68vh 6px 0 rgba(186, 220, 255, 0.5),
    43vw 59vh 5px 0 rgba(255, 255, 255, 0.52), 56vw 73vh 4px 0 rgba(179, 214, 255, 0.48),
    68vw 64vh 6px 0 rgba(255, 255, 255, 0.52), 81vw 70vh 5px 0 rgba(187, 221, 255, 0.5),
    93vw 61vh 4px 0 rgba(255, 255, 255, 0.5), 12vw 84vh 6px 0 rgba(180, 216, 255, 0.46),
    27vw 89vh 4px 0 rgba(255, 255, 255, 0.52), 39vw 82vh 5px 0 rgba(186, 219, 255, 0.5),
    52vw 91vh 4px 0 rgba(255, 255, 255, 0.54), 66vw 86vh 6px 0 rgba(181, 216, 255, 0.48),
    78vw 92vh 5px 0 rgba(255, 255, 255, 0.5), 90vw 87vh 4px 0 rgba(187, 221, 255, 0.46);
  opacity: 0.55;
  filter: blur(0.35px);
  animation: twinkle 5.8s ease-in-out infinite alternate;
}

.site-header,
.page,
.site-credit {
  position: relative;
  z-index: 1;
}

@keyframes twinkle {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.45;
  }
}

@keyframes starDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-1.2vw, 1.8vh, 0);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
  background: rgba(11, 15, 25, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-brand.brand-with-icon {
  gap: 14px;
}

.brand-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-block;
  transform: scale(1.24);
  transform-origin: center;
}

.nav-links-desktop {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.nav-links-desktop a,
.nav-drawer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links-desktop a:hover,
.nav-drawer a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.nav-links-desktop a.nav-cta,
.nav-drawer a.nav-cta {
  color: #0b0f19;
  background: var(--accent);
  font-weight: 800;
}

.nav-links-desktop a.nav-cta:hover,
.nav-drawer a.nav-cta:hover {
  color: #0b0f19;
  filter: brightness(1.05);
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 8px;
  cursor: pointer;
  flex: 0 0 44px;
  position: relative;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(232, 238, 252, 0.9);
  margin: 4px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-backdrop {
  display: none;
}

.nav-drawer {
  display: none;
}

.nav-close {
  display: none;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 20px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #18233e 0%, #12182a 55%, #16243f 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 30px;
}

.hero-planet {
  position: absolute;
  right: 30px;
  top: 50px;
  width: 300px;
  height: auto;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 780px) {
  .hero-planet {
    width: 180px;
    right: -20px;
    top: -20px;
  }
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: #9db5de;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
}

h1 {
  margin: 8px 0 14px;
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
  line-height: 1.05;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.lead {
  margin: 0;
  max-width: 55ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 400;
}

.info-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-row div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
}

.info-row span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 2px;
}

.info-row strong {
  font-size: 1.8rem;
}

.actions {
  margin-top: 18px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -16px rgba(12, 29, 61, 0.82);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a1020;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.danger {
  border-color: rgba(255, 100, 100, 0.35);
  color: var(--danger);
}

.button.full {
  width: 100%;
  margin-top: 12px;
}

.section {
  margin-top: 26px;
}

h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}

.section-copy {
  margin-top: 6px;
  color: var(--muted);
}

.section-copy a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.section-copy a:hover {
  color: var(--accent-strong);
}

.game-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 30px;
  box-shadow: 0 12px 36px -32px rgba(9, 21, 48, 0.95);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.06rem;
}

label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

input {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  min-height: 110px;
}

input:focus {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

textarea:focus {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a1020;
}

button.danger {
  border-color: rgba(255, 100, 100, 0.35);
  color: var(--danger);
}

.timer-card {
  background:
    radial-gradient(circle at 15% 0%, #1a2f52 0%, transparent 42%),
    radial-gradient(circle at 100% 100%, #1a2140 0%, transparent 40%),
    var(--surface);
}

.timer {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* Larger, gentler buttons inside the timer card */
.timer-card .button {
  font-size: 0.85rem;
  padding: 6px 10px;
  text-transform: uppercase;
}

/* Mobile: larger timer buttons for better tap targets */
@media (max-width: 600px) {
  .timer-card .button {
    font-size: 1.0rem;
    padding: 8px 12px;
    text-transform: uppercase;
  }
}

/* Target the Start/Finish buttons (they are outside .timer-card) */
#btnStart,
#btnFinish,
#btnResetRun {
  font-size: 0.85rem;
  padding: 6px 10px;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  #btnStart,
  #btnFinish,
  #btnResetRun {
    font-size: 0.95rem;
    padding: 8px 12px;
  }
}

.note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.materials-file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.materials-folder {
  margin-top: 12px;
  font-weight: 700;
  opacity: 0.85;
}
.materials-file a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.materials-file a:hover {
  border-color: var(--accent, #2a9d8f);
}
.materials-file-name {
  font-weight: 600;
  word-break: break-word;
}
.materials-file-size {
  flex-shrink: 0;
  opacity: 0.7;
  font-size: 0.9em;
}

.status-pill {
  display: inline-block;
  padding: 5px 10px;
  font-size: 0.84rem;
}

.table-wrap {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.info-row div,
.table-wrap {
  background: var(--surface);
  border-color: var(--line);
}

.ok {
  color: #0e8d5e;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

#leaderboardPagination {
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

#leaderboardPagination .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 6px;
}

#leaderboardPageInfo {
  font-size: 0.82rem;
}

#adminLbPageInfo,
#leaderboardPageInfo {
  white-space: nowrap;
}

#adminLbPageInfo {
  margin-left: 0;
  text-align: right;
}

#leaderboardPagination.admin-pagination {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

.admin-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.admin-leaderboard-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.admin-action-link {
  color: #c9d7f6;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.admin-action-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.admin-action-link.danger {
  color: #ffc6ca;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.mt-10 {
  margin-top: 10px;
}

.mt-25 {
  margin-top: 25px;
}

.mb-14 {
  margin-bottom: 14px;
}

.divider-thick {
  border: none;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.text-center {
  text-align: center;
}

.admin-page-title {
  font-family: 'Outfit', sans-serif;
  line-height: 1.05;
  font-weight: 600;
}

body:not(.admin-app-body) .admin-page-title {
  text-align: center;
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
}

#adminPanel {
  display: none;
}

body.admin-login-mode .wrap,
body.admin-login-mode .admin-login-wrap {
  max-width: 620px;
  padding-top: 44px;
}

body.admin-login-mode .wrap > h1 {
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

body.admin-login-mode #loginForm {
  max-width: 100%;
  margin: 0 auto;
}

body.admin-login-mode #loginForm .row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.admin-login-mode #btnLogin {
  width: 100%;
  margin: 0;
}

body.admin-login-mode #loginStatus {
  width: 100%;
  text-align: center;
}

body.admin-login-mode .navbar-nav {
  display: none;
}

body.admin-login-mode #btnLogout {
  display: none;
}

.admin-menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: sticky;
  top: 10px;
  z-index: 5;
  background: rgba(18, 24, 42, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 14px;
}

.admin-menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.admin-menu a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.admin-section-block {
  scroll-margin-top: 72px;
}

.admin-header {
  justify-content: space-between;
}

.hero-actions-row {
  justify-content: center;
}

.codes-actions-row {
  justify-content: center;
}

.hero-editor-wrap {
  margin-top: 6px;
}

.hero-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.hero-editor-toolbar button {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.hero-editor-toolbar button.is-active {
  background: rgba(245, 216, 74, 0.18);
  border-color: rgba(245, 216, 74, 0.42);
}

.hero-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  min-height: 160px;
  padding: 10px 12px;
  color: var(--text);
}

.hero-editor .ProseMirror {
  outline: none;
  min-height: 136px;
  color: var(--text);
}

.hero-editor .ProseMirror * {
  color: inherit;
}

.hero-editor .ProseMirror p {
  margin: 0 0 10px;
}

.hero-editor .ProseMirror p:last-child {
  margin-bottom: 0;
}

#heroStatus {
  text-align: center;
}

.subsection-title,
.subsection-title-top {
  margin: 16px 0 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  width: auto;
  min-height: auto;
}

.site-credit {
  --site-credit-gap: 1.75rem;
  --site-credit-gap-tight: 0.65rem;
  width: 100%;
  margin: 0;
  padding: var(--site-credit-gap) 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--site-credit-gap);
  text-align: center;
  scroll-margin-top: 72px;
}

.site-credit-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--site-credit-gap-tight);
  width: 100%;
}

.site-credit-partners {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin: 0 0 0.5rem;
}

.site-credit-divider {
  width: 100%;
  max-width: 1080px;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.site-credit-partners .logo-img {
  height: 28px;
}

.site-contact {
  margin: 0;
  color: rgba(255, 255, 255, 0.32);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-align: center;
}

.site-contact a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.site-contact a:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.site-credit-link {
  color: rgba(255, 255, 255, 0.32);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-credit-link .site-credit-brand {
  color: rgba(255, 255, 255, 0.72);
}

.site-credit-link:hover {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.site-credit-link:hover .site-credit-brand {
  color: rgba(255, 255, 255, 0.85);
}

.footer-row {
  width: 100%;
  max-width: none;
  margin: 18px 0 0;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  background: rgba(11, 15, 25, 0.86);
  border-top: 1px solid var(--line);
}

.footer-row a {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logo {
  height: 26px;
}

.admin-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.logo-img {
  height: 35px;
  vertical-align: middle;
}

#congrats {
  margin-top: 12px;
}

#adminLeaderboardStatus,
#adminLbPageInfo,
#adminLeaderboardBody td,
#adminLeaderboardBody th,
.table-wrap table,
.table-wrap td,
.table-wrap th {
  color: var(--text);
}

#adminLeaderboardBody td:last-child {
  text-align: right;
  white-space: nowrap;
}

#adminLeaderboardBody td:last-child .button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 600;
}

#adminLeaderboardBody td:last-child .button.danger {
  color: #ffc6ca;
  border-color: rgba(255, 143, 149, 0.24);
}

@media (max-width: 1024px) {
  .game-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .info-row {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    position: relative;
    flex-wrap: nowrap;
  }

  .nav-links-desktop {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
  }

  .nav-backdrop[hidden],
  .nav-drawer[hidden] {
    display: none !important;
  }

  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 14, 0.55);
    z-index: 1100;
  }

  .nav-drawer:not([hidden]) {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 84vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(13, 20, 36, 0.98);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 42px -28px rgba(0, 0, 0, 0.9);
    padding: 30px 18px 24px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    z-index: 1200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .nav-drawer a {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.03);
    justify-content: flex-start;
  }

  .nav-drawer a.nav-cta {
    justify-content: center;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero {
    padding: 22px;
  }

  .footer-row {
    justify-content: center;
    align-items: center;
  }

  .table-wrap {
    overflow-x: auto;
  }
}

.hero .cta-row {
  justify-content: center;
}

/* Objednávka / platba */
.cta-row {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.voucher-form-card {
  max-width: 520px;
  margin-top: 16px;
}

.order-form-card label:not(.choice-row),
.order-form-card .label-like {
  display: block;
  margin: 16px 0 6px;
  font-weight: 700;
}

.order-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px 36px;
  align-items: start;
}

.order-form-col > :first-child {
  margin-top: 0;
}

.order-form-col .label-like:first-child,
.order-form-col > label:first-of-type {
  margin-top: 0;
}

.order-form-heading {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.order-form-col .summary-box {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .order-form-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.delivery-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.choice-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-row:hover {
  border-color: rgba(245, 216, 74, 0.35);
}

.choice-row:has(input:checked) {
  border-color: rgba(245, 216, 74, 0.55);
  background: rgba(245, 216, 74, 0.08);
}

.choice-row input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  flex: 0 0 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.choice-row > span {
  flex: 1;
  min-width: 0;
}

.choice-row strong {
  display: block;
  font-weight: 700;
  line-height: 1.35;
}

.choice-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.45;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.address-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .name-row,
  .address-row {
    grid-template-columns: 1fr;
  }
}

.zbox-fields.is-hidden {
  display: none;
}

.summary-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(245, 216, 74, 0.28);
  border-radius: 8px;
  background: rgba(245, 216, 74, 0.06);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row:last-child {
  border-bottom: none;
}

.payment-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  align-items: center;
}

.qr-img {
  width: 210px;
  height: 210px;
  border-radius: 8px;
  background: #fff;
  display: block;
}

.badge-waiting {
  color: var(--accent);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters-row .button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.button.btn-sm {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.85rem;
  margin: 2px 0;
}

.order-status-select {
  width: 100%;
  min-width: 150px;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0c1329;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.order-status-select:focus {
  outline: none;
  border-color: var(--accent);
}

.order-codes {
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: nowrap;
}

.orders-admin-table td {
  vertical-align: top;
}

.muted {
  color: var(--muted);
}

@media (max-width: 850px) {
  .payment-layout {
    grid-template-columns: 1fr;
  }
}
