* { margin: 0; padding: 0; box-sizing: border-box; }
.initially-hidden { display: none; }
html, body {
  width: 100%;
  height: 100%;
  background: #060e1a;
  -webkit-tap-highlight-color: transparent;
  font-family: 'B612 Mono', monospace;
  color: #cccccc;
}
body.in-game {
  overflow: hidden;
  touch-action: none;
  background: #0a1628;
}
body.in-game #top-bar {
  display: none !important;
}
body.in-game #homepage {
  display: none !important;
}

/* ── Top bar (hidden on desktop, shown on mobile) ── */
#top-bar {
  height: 40px;
  background: rgba(10, 20, 36, 0.95);
  border-bottom: 1px solid rgba(26, 48, 80, 0.3);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
#top-bar .nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
#top-bar .brand {
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}
#top-bar .brand .brand-logo {
  height: 18px;
  width: auto;
}
#top-bar .brand:hover { opacity: 0.85; }
#top-bar .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
#top-bar .nav-right a {
  color: #8899aa;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.15s;
}
#top-bar .nav-right a:hover { color: #ccddee; }
#top-bar .hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
#top-bar .hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #8899aa;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
#top-bar .hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#top-bar .hamburger.open span:nth-child(2) { opacity: 0; }
#top-bar .hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Game container ── */
#game-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 200;
  touch-action: none;
  background: #0a1628;
}
canvas { display: block; }

/* ── Homepage ── */
#homepage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  display: flex;
  background: #060e1a;
  overflow: hidden;
}

/* Background image */
.radar-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  background: url('/background.jpg') center center / cover no-repeat;
  filter: blur(1px) brightness(0.45);
}

/* ── Navigation sidebar ── */
.nav-sidebar {
  position: relative;
  z-index: 3;
  width: 240px;
  min-width: 240px;
  height: 100%;
  background: rgba(6, 12, 22, 0.95);
  border-right: 1px solid rgba(26, 48, 80, 0.25);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #1a3050 transparent;
}
.nav-sidebar::-webkit-scrollbar { width: 4px; }
.nav-sidebar::-webkit-scrollbar-thumb { background: #1a3050; border-radius: 2px; }
.nav-sidebar::-webkit-scrollbar-track { background: transparent; }

.nav-sidebar-brand {
  padding: 28px 20px 22px;
  border-bottom: 1px solid rgba(26, 48, 80, 0.2);
}
.sidebar-logo {
  width: 90%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}
.sidebar-nav-item {
  display: block;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 700;
  color: #8899aa;
  letter-spacing: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  border-left: 2px solid transparent;
}
.sidebar-nav-item:hover {
  color: #ccddee;
  background: rgba(26, 48, 80, 0.15);
}
.sidebar-nav-item.active {
  color: #4488ff;
  border-left-color: #4488ff;
  background: rgba(68, 136, 255, 0.05);
}
.sidebar-nav-divider {
  height: 1px;
  background: rgba(26, 48, 80, 0.2);
  margin: 8px 24px;
}
.sidebar-nav-item.external::after {
  content: ' \2197';
  font-size: 10px;
  opacity: 0.5;
}

.sidebar-login {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  text-decoration: none;
  color: #8899aa;
  font-size: 12px;
  transition: color 0.2s;
}
.sidebar-login:hover { color: #aabbcc; }
.sidebar-login .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1a3050;
  border: 1px solid #2a4a60;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #556677;
  font-size: 11px;
  flex-shrink: 0;
}

/* Sidebar backdrop (mobile) */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 49;
}

/* ── Mobile nav (horizontal, hidden on desktop) ── */
.mobile-nav {
  display: none;
}

/* ── Main content area ── */
.homepage-content {
  flex: 1;
  position: relative;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 76px; /* align with sidebar nav items (below brand area) */
  padding-bottom: 60px;
  scrollbar-width: thin;
  scrollbar-color: #1a3050 transparent;
}
.homepage-content::-webkit-scrollbar { width: 6px; }
.homepage-content::-webkit-scrollbar-thumb { background: #1a3050; border-radius: 3px; }
.homepage-content::-webkit-scrollbar-track { background: transparent; }

/* Content pages */
.content-page {
  display: none;
  padding: 0 48px 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 0.3s ease-out;
}
.content-page.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Homepage footer ── */
.homepage-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px 20px;
  font-size: 11px;
  color: #7a9aba;
  letter-spacing: 0.5px;
  background: #0a1929;
  border-top: 1px solid rgba(26, 48, 80, 0.4);
  z-index: 10;
}
.footer-sep {
  margin: 0 8px;
  opacity: 0.4;
}
.footer-link {
  color: #4a6a8a;
  text-decoration: none;
}
.footer-link:hover {
  color: #7a9aba;
}
.footer-copy {
  opacity: 0.6;
}

.page-heading {
  font-size: 11px;
  font-weight: 700;
  color: #556677;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.content-divider {
  height: 1px;
  background: rgba(26, 48, 80, 0.3);
  margin: 24px 0;
}

/* ── News items (in content area) ── */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-loading {
  color: #556677;
  font-size: 12px;
  padding: 12px 0;
}
.sidebar-item {
  display: block;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.sidebar-item:hover {
  background: rgba(26, 48, 80, 0.25);
}
.sidebar-item .sidebar-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #ccddee;
  line-height: 1.4;
  margin-bottom: 4px;
}
.sidebar-item .sidebar-item-excerpt {
  font-size: 11px;
  color: #667788;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-item .sidebar-item-meta {
  font-size: 9px;
  color: #445566;
  margin-top: 6px;
}
.sidebar-item .sidebar-item-replies {
  font-size: 9px;
  color: #4488ff;
  opacity: 0.6;
}

/* Full news articles */
.news-full-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.news-full-post {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid rgba(26, 48, 80, 0.3);
  border-radius: 10px;
  padding: 24px;
}
.news-full-post .news-post-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}
.news-full-post .news-post-meta {
  font-size: 11px;
  color: #556677;
  margin-bottom: 20px;
}
.news-full-post .news-post-body {
  font-size: 14px;
  color: #aabbcc;
  line-height: 1.7;
}
.news-full-post .news-post-body p { margin: 0 0 12px; }
.news-full-post .news-post-body img {
  max-width: 100%;
  border-radius: 6px;
  margin: 8px 0;
}
.news-full-post .news-post-body a { color: #4488ff; text-decoration: none; }
.news-full-post .news-post-body a:hover { text-decoration: underline; }
.news-full-post .news-post-body h1,
.news-full-post .news-post-body h2,
.news-full-post .news-post-body h3 {
  color: #ccddee;
  margin: 16px 0 8px;
}
.news-full-post .news-post-body ul,
.news-full-post .news-post-body ol {
  margin: 8px 0;
  padding-left: 24px;
}
.news-full-post .news-post-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: #4488ff;
  text-decoration: none;
}
.news-full-post .news-post-link:hover { text-decoration: underline; }

/* ── Game page sections ── */
.section {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 8px 0 0;
}
.section:first-child {
  padding-top: 0;
}
.section-label {
  font-size: 10px;
  font-weight: 400;
  color: #778899;
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 12px;
}
.mobile-page-title {
  display: none;
  font-size: 14px;
  font-weight: 700;
  color: #aabbcc;
  letter-spacing: 4px;
  text-align: center;
  margin: 0 0 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(26, 48, 80, 0.3);
}
@media (max-width: 900px) {
  .mobile-page-title {
    display: block;
  }
}

/* Airport list */
.airport-grid-header {
  display: grid;
  grid-template-columns: 72px 1fr 80px 100px;
  gap: 0 12px;
  padding: 0 18px 6px;
}
.airport-sort-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  color: #445566;
  letter-spacing: 2px;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: color 0.15s;
}
.airport-sort-btn:hover { color: #8899aa; }
.airport-sort-btn.active { color: #4488ff; }
.airport-sort-btn.right { text-align: right; }
.airport-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.airport-card {
  display: grid;
  grid-template-columns: 72px 1fr 80px 100px;
  align-items: center;
  gap: 0 12px;
  background: rgba(10, 22, 40, 0.3);
  border: 1px solid rgba(26, 48, 80, 0.2);
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.airport-card:hover {
  border-color: rgba(68, 136, 255, 0.3);
  background: rgba(13, 30, 50, 0.5);
}
.airport-card.selected {
  border-color: rgba(68, 136, 255, 0.5);
  background: rgba(15, 38, 64, 0.5);
}
.airport-card .icao {
  font-size: 18px;
  font-weight: 700;
  color: #4488ff;
  letter-spacing: 2px;
}
.airport-card .airport-info {
  min-width: 0;
}
.airport-card .name {
  font-size: 12px;
  color: #aabbcc;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.airport-card .airport-desc {
  font-size: 10px;
  color: #8899aa;
  line-height: 1.3;
  margin-top: 2px;
}
.airport-card .difficulty-rating {
  color: #ffaa00;
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
  text-align: right;
}
.airport-card .details {
  font-size: 10px;
  color: #778899;
  display: flex;
  gap: 10px;
  white-space: nowrap;
  justify-content: flex-end;
  text-align: right;
}
.airport-card .details span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.airport-card.selected .icao { color: #66aaff; }
.airport-card.selected .name { color: #ffffff; }
.airport-card.selected .airport-desc { color: #778899; }

/* Airport row: button + card side by side */
.airport-row {
  position: relative;
}
.card-start-btn {
  display: none;
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  margin-right: 6px;
  padding: 8px 14px;
  background: rgba(0, 170, 85, 0.9);
  border: 1px solid rgba(0, 204, 102, 0.3);
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 3px;
  transition: all 0.2s;
  white-space: nowrap;
  text-align: center;
  align-items: center;
  justify-content: center;
}
.card-start-btn:hover {
  background: rgba(0, 204, 102, 0.95);
  box-shadow: 0 0 20px rgba(0, 204, 102, 0.25);
}
.card-demo-btn {
  background: rgba(136, 102, 0, 0.7);
  border-color: rgba(204, 153, 0, 0.3);
}
.card-demo-btn:hover {
  background: rgba(170, 136, 0, 0.8);
  box-shadow: 0 0 20px rgba(170, 136, 0, 0.2);
}
.airport-row.selected .card-start-btn {
  display: flex;
}
/* Below-card layout when sidebar leaves no room for left-side button */
@media (max-width: 1100px) {
  .airport-row {
    display: flex;
    flex-direction: column;
  }
  .airport-row .airport-card { order: 1; }
  .card-start-btn { order: 2; }
  .airport-row.selected .card-start-btn {
    position: static;
    width: 100%;
    margin-right: 0;
    padding: 10px;
    border-radius: 0 0 6px 6px;
  }
  .airport-row.selected .airport-card {
    border-radius: 6px 6px 0 0;
  }
}

@media (max-width: 420px) {
  .airport-grid-header {
    grid-template-columns: 72px 1fr;
  }
  .airport-grid-header .airport-sort-btn.right {
    display: none;
  }
  .airport-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 0;
    padding: 10px 14px;
  }
  .airport-card .icao {
    font-size: 16px;
  }
  .airport-card .airport-info {
    grid-column: 1;
  }
  .airport-card .difficulty-rating {
    text-align: left;
  }
  .airport-card .details {
    justify-content: flex-start;
  }
}

/* Game mode bar */
.game-mode-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.game-mode-btn {
  flex: 1;
  max-width: 110px;
  background: transparent;
  border: 1px solid rgba(26, 42, 58, 0.5);
  border-radius: 8px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.game-mode-btn:hover {
  border-color: rgba(68, 136, 255, 0.2);
  background: rgba(18, 30, 48, 0.4);
}
.game-mode-btn.selected {
  border-color: rgba(68, 136, 255, 0.5);
  background: rgba(26, 58, 90, 0.4);
}
.game-mode-btn .gm-label {
  font-size: 12px;
  font-weight: 700;
  color: #778899;
  font-family: inherit;
}
.game-mode-btn .gm-desc {
  font-size: 8px;
  color: #445566;
  margin-top: 2px;
  font-family: inherit;
}
.game-mode-btn.selected .gm-label { color: #4488ff; }
.game-mode-btn.selected .gm-desc { color: #667788; }

/* Action buttons */
.actions {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.btn-start {
  width: 100%;
  padding: 14px;
  background: rgba(0, 170, 85, 0.9);
  border: 1px solid rgba(0, 204, 102, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 4px;
  transition: all 0.2s;
  box-shadow: 0 0 30px rgba(0, 170, 85, 0.1);
}
.btn-start:hover {
  background: rgba(0, 204, 102, 0.95);
  box-shadow: 0 0 40px rgba(0, 204, 102, 0.2);
}

.btn-demo-start {
  background: rgba(136, 102, 0, 0.7) !important;
  border-color: rgba(204, 153, 0, 0.3) !important;
  box-shadow: 0 0 30px rgba(136, 102, 0, 0.1) !important;
}
.btn-demo-start:hover {
  background: rgba(170, 136, 0, 0.8) !important;
  box-shadow: 0 0 40px rgba(170, 136, 0, 0.2) !important;
}

.btn-resume {
  width: 100%;
  padding: 14px;
  background: rgba(42, 90, 128, 0.6);
  border: 1px solid rgba(68, 136, 255, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 4px;
  transition: all 0.2s;
}
.btn-resume:hover {
  background: rgba(58, 122, 170, 0.7);
  border-color: rgba(68, 136, 255, 0.5);
}

/* ── Options (inline) ── */
.options-content {
  max-width: 460px;
}
.options-panel {
  background: rgba(14, 30, 52, 0.6);
  border: 1px solid rgba(26, 48, 80, 0.4);
  border-radius: 12px;
  padding: 20px;
}
.options-section-label {
  font-size: 11px;
  color: #667788;
  letter-spacing: 3px;
  margin: 0 0 14px 0;
  text-align: center;
}
.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.options-label {
  font-size: 14px;
  color: #aabbcc;
}
.options-toggle {
  min-width: 56px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #4488ff;
  background: #1a3a5a;
  color: #4488ff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s;
}
.options-toggle:hover { background: #2a4a6a; }
.options-toggle.off {
  border-color: #1a2a3a;
  background: #0e1a2a;
  color: #445566;
}
.options-toggle.off:hover { background: #152535; }
.options-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.options-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 6px;
  border-radius: 3px;
  background: #1a2a3a;
  outline: none;
}
.options-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4488ff;
  cursor: pointer;
  border: 2px solid #1a3a5a;
}
.options-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4488ff;
  cursor: pointer;
  border: 2px solid #1a3a5a;
}
.options-slider-val {
  font-size: 12px;
  color: #667788;
  min-width: 28px;
  text-align: right;
}

/* ── How To Play (inline) ── */
.htp-all {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.htp-section {
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid rgba(26, 48, 80, 0.25);
  border-radius: 10px;
  padding: 20px 24px;
}
.htp-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #4488ff;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.htp-section-body p {
  font-size: 13px;
  color: #aabbcc;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
}

/* ── High Scores (inline) ── */
.scores-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.scores-login-hint {
  color: #556677;
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
}
.personal-stats {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.personal-stat {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid rgba(68, 136, 255, 0.15);
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  min-width: 100px;
}
.personal-stat-value {
  font-size: 22px;
  font-weight: bold;
  color: #ffffff;
}
.personal-stat-label {
  font-size: 10px;
  color: #556677;
  text-transform: uppercase;
  margin-top: 4px;
}
.scores-filters {
  display: flex;
  gap: 10px;
}
.scores-select {
  background: rgba(10, 22, 40, 0.8);
  color: #aabbcc;
  border: 1px solid rgba(68, 136, 255, 0.2);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: 'B612 Mono', monospace;
  font-size: 12px;
  cursor: pointer;
}
.scores-select:focus {
  outline: none;
  border-color: rgba(68, 136, 255, 0.5);
}
.scores-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.scores-table th {
  color: #556677;
  font-size: 10px;
  text-transform: uppercase;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(68, 136, 255, 0.15);
}
.scores-table td {
  color: #8899aa;
  padding: 8px;
  border-bottom: 1px solid rgba(68, 136, 255, 0.07);
}
.scores-table .score-val {
  color: #ffffff;
  font-weight: bold;
}
.scores-table tr.top-1 td { color: #ffd700; }
.scores-table tr.top-1 .score-val { color: #ffd700; }
.scores-table tr.top-2 td { color: #c0c0c0; }
.scores-table tr.top-2 .score-val { color: #c0c0c0; }
.scores-table tr.top-3 td { color: #cd7f32; }
.scores-table tr.top-3 .score-val { color: #cd7f32; }

/* ── Responsive: tablet / no sidebar ── */
@media (max-width: 900px) {
  #top-bar {
    display: flex !important;
  }
  #homepage {
    height: calc(100vh - 40px);
    margin-top: 40px;
    flex-direction: column;
    min-height: calc(100vh - 40px);
  }
  .nav-sidebar {
    display: none;
    position: fixed;
    top: 40px;
    left: 0;
    height: calc(100% - 40px);
    z-index: 50;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }
  .nav-sidebar.mobile-open {
    display: flex;
  }
  .nav-sidebar-brand {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
  .homepage-content {
    padding-top: 16px;
    overflow-y: visible;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .content-page {
    padding: 24px 20px;
    width: 100%;
    max-width: 700px;
  }
}

/* ── Responsive: mobile ── */
@media (max-width: 768px) {
  #top-bar {
    height: 34px;
    padding: 0 8px;
  }
  #homepage {
    height: calc(100vh - 34px);
    margin-top: 34px;
    flex-direction: column;
  }
  .homepage-content {
    padding-top: 16px;
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #game-container {
    top: 34px;
    height: calc(100dvh - 34px);
  }
  .content-page {
    padding: 0 14px 32px;
    width: 100%;
    max-width: 700px;
  }
}

/* ── Welcome page ── */
#page-welcome {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#page-welcome.active {
  display: flex;
}
.welcome-hero {
  margin-bottom: 32px;
}
.welcome-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 3px;
  line-height: 1.3;
}
.welcome-sub {
  font-size: 13px;
  color: #8899aa;
  margin-top: 10px;
  line-height: 1.6;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.welcome-play {
  margin-top: 20px;
  max-width: 280px;
}
.welcome-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.welcome-stat {
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid rgba(68, 136, 255, 0.12);
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  min-width: 90px;
}
.welcome-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}
.welcome-stat-label {
  font-size: 9px;
  color: #667788;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}
.welcome-section-label {
  font-size: 10px;
  font-weight: 700;
  color: #556677;
  letter-spacing: 4px;
  margin-bottom: 12px;
}
.welcome-news {
  max-width: 500px;
  width: 100%;
  text-align: left;
}

/* ── About page ── */
.about-content {
  max-width: 560px;
}
.about-title {
  font-size: 16px;
  font-weight: 700;
  color: #ccddee;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.about-text {
  font-size: 13px;
  color: #8899aa;
  line-height: 1.7;
  margin-bottom: 8px;
}
.about-section {
  margin-top: 20px;
}
.about-label {
  font-size: 10px;
  font-weight: 700;
  color: #4488ff;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

