/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-1: #1a1a2e;
  --bg-2: #16213e;
  --card: #0f3460;
  --amber: #f59e0b;
  --gold: #ffd700;
  --white: #ffffff;
  --white-70: rgba(255, 255, 255, 0.7);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-30: rgba(255, 255, 255, 0.3);
  --white-10: rgba(255, 255, 255, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--amber);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Layout ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 4rem 0;
}

section + section {
  border-top: 1px solid var(--white-10);
}

/* ===== Nav ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--white-10);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-brand span {
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--white-70);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 5rem 0 4rem;
}

.hero-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--white-70);
  max-width: 540px;
  margin: 0 auto 2rem;
}

.testflight-btn {
  display: inline-block;
  background: var(--amber);
  color: var(--bg-1);
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.2s;
}

.testflight-btn:hover {
  background: var(--gold);
  color: var(--bg-1);
  transform: translateY(-1px);
}

/* ===== Section Headings ===== */
.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: var(--white-70);
  font-size: 1rem;
}

/* ===== Games Grid ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.game-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--white-10);
  transition: border-color 0.2s, transform 0.2s;
}

.game-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.game-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.game-card-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.game-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.game-card-players {
  font-size: 0.75rem;
  color: var(--amber);
  font-weight: 600;
}

.game-card-desc {
  font-size: 0.875rem;
  color: var(--white-70);
  line-height: 1.5;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.feature-item {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--white-10);
  text-align: center;
}

.feature-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--white-70);
  line-height: 1.5;
}

/* ===== About ===== */
.about-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.about-content p {
  color: var(--white-70);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* ===== Support ===== */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.support-contact {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--white-10);
}

.support-contact h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.support-contact p {
  color: var(--white-70);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.support-email {
  display: inline-block;
  background: var(--amber);
  color: var(--bg-1);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.support-email:hover {
  background: var(--gold);
  color: var(--bg-1);
}

.faq h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.faq-item {
  margin-bottom: 1.25rem;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 0.25rem;
}

.faq-item p {
  font-size: 0.875rem;
  color: var(--white-70);
  line-height: 1.5;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--white-10);
  padding: 2rem 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--white-50);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--amber);
}

.footer-copy {
  color: var(--white-30);
  font-size: 0.8rem;
}

/* ===== Legal Pages ===== */
.legal-page {
  padding: 3rem 0;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.legal-page .legal-updated {
  color: var(--white-50);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--amber);
}

.legal-page p,
.legal-page li {
  color: var(--white-70);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page li {
  margin-bottom: 0.4rem;
}

.legal-back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* ===== Error Page (404) ===== */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page .testflight-btn {
  margin-top: 1rem;
}

/* ===== Focus Styles ===== */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.nav-links a:focus-visible,
.testflight-btn:focus-visible,
.support-email:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1.1rem;
  }

  .hero-icon {
    font-size: 4rem;
  }

  section {
    padding: 3rem 0;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--white-10);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }
}
