/* EchoForge Arcade — Shared Styles */

/* Self-hosted fonts */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/fonts/cinzel-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
}

/* --- Tokens --- */
:root {
  --bg-deep: #0d0d14;
  --bg: #1a1f2e;
  --surface: #242a3a;
  --border: rgba(255, 255, 255, 0.10);
  --text: #f2e9dd;
  --muted: #9a9aab;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --gold: #d4a04a;
  --gold-light: #e8c47a;
  --gold-dark: #b8862e;
  --blue: #3ba8ff;
  --blue-dark: #1f78d1;
  --blue-soft: #7fd3ff;
  --neon-green: #5ac46a;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 820px;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 700px at 15% 10%, rgba(90, 196, 106, 0.06), transparent 60%),
    radial-gradient(900px 600px at 85% 20%, rgba(59, 168, 255, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 35%, var(--bg-deep));
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: 'Cinzel', serif; font-weight: 700; line-height: 1.2; }
a { color: var(--blue); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--blue-soft); }
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px;
}

/* --- Skip to Content --- */
.skip-to-content {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  padding: 8px 16px; background: var(--gold); color: var(--text-dark);
  font-weight: 600; font-size: 0.85rem; border-radius: var(--radius-sm);
  text-decoration: none; transition: top 0.2s ease;
}
.skip-to-content:focus { top: 8px; }
img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* --- Nav --- */
.page-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13, 13, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}
.page-nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; }
.page-nav-brand {
  font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700;
  color: var(--gold); text-decoration: none;
}
.page-nav-brand:hover { color: var(--gold-light); }
.nav-badge {
  display: inline-block; padding: 2px 8px; font-family: 'Inter', sans-serif;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  background: var(--neon-green); color: var(--text-dark);
  border-radius: 4px; margin-left: 8px; vertical-align: middle;
}
.page-nav-links { display: flex; gap: 24px; }
.page-nav-links a {
  color: var(--muted); font-size: 0.85rem; font-weight: 500;
  text-decoration: none; transition: color 0.15s ease;
}
.page-nav-links a:hover { color: var(--white); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 4px; width: 28px; height: 20px; position: relative; flex-shrink: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; width: 100%; height: 2px;
  background: var(--muted); border-radius: 1px; transition: all 0.2s ease;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); background: var(--white); }
.nav-toggle.open span::after { top: 0; transform: rotate(-45deg); background: var(--white); }

/* --- Page Content --- */
.page-content { padding: 80px 0 48px; min-height: calc(100vh - 120px); }

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.8rem; color: var(--muted); margin-bottom: 24px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.4; }

/* --- Page Header --- */
.page-header { margin-bottom: 48px; }
.page-header h1 {
  font-size: clamp(28px, 3.5vw, 42px); color: var(--white);
  margin-bottom: 12px;
}
.page-header h1 .accent { color: var(--neon-green); }
.page-subtitle { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 600px; }

/* --- Content Sections --- */
.content-section { margin-bottom: 48px; }
.content-section h2 {
  font-size: 1.3rem; color: var(--gold); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(212, 160, 74, 0.15);
}
.content-section h3 {
  font-size: 1rem; color: var(--white); margin-bottom: 8px; margin-top: 20px;
}
.content-section p {
  color: var(--text); font-size: 0.95rem; line-height: 1.7;
  margin-bottom: 12px;
}
.content-section ul, .content-section ol {
  padding-left: 20px; margin-bottom: 16px;
}
.content-section li {
  color: var(--text); font-size: 0.9rem; line-height: 1.7;
  margin-bottom: 6px;
}

/* --- Stat Grid --- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin-top: 24px;
}
.stat-card {
  background: linear-gradient(135deg, var(--surface), rgba(36, 42, 58, 0.6));
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px; text-align: center;
}
.stat-number {
  display: block; font-family: 'Cinzel', serif; font-size: 1.8rem;
  font-weight: 700; color: var(--neon-green); margin-bottom: 4px;
}
.stat-label { font-size: 0.8rem; color: var(--muted); }

/* --- Category List (about page) --- */
.category-list { display: grid; gap: 20px; }
.category-item {
  background: linear-gradient(135deg, var(--surface), rgba(36, 42, 58, 0.6));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.category-item h3 { font-size: 1.05rem; color: var(--gold); margin: 0 0 8px; }
.category-item p { margin-bottom: 0; }

/* --- Tech List --- */
.tech-list { list-style: none; padding-left: 0; }
.tech-list li {
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tech-list li:last-child { border-bottom: none; }

/* --- Link Cards --- */
.link-cards { display: grid; gap: 12px; margin-top: 16px; }
.link-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; border-radius: var(--radius);
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: all 0.15s ease;
}
.link-card:hover {
  background: rgba(255,255,255,0.04); border-color: rgba(59,168,255,0.2);
  color: var(--white);
}
.link-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.link-card strong { color: var(--white); display: block; margin-bottom: 4px; }
.link-card p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* --- Contact Grid --- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.contact-card {
  background: linear-gradient(135deg, var(--surface), rgba(36, 42, 58, 0.6));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.contact-icon { font-size: 2rem; }
.contact-card h3 { font-size: 1rem; color: var(--white); }
.contact-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; flex-grow: 1; margin: 0; }

/* --- FAQ --- */
.faq-list { display: grid; gap: 8px; }
.faq-item {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600;
  font-size: 0.95rem; color: var(--white); list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.15s ease;
}
.faq-item summary:hover { background: rgba(255,255,255,0.03); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--gold); font-size: 1.2rem; font-weight: 400; }
.faq-item[open] summary::after { content: '-'; }
.faq-item p { padding: 0 20px 16px; font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* --- Company Info --- */
.company-info { font-size: 0.95rem; line-height: 2; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; min-height: 40px; font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 600; border-radius: var(--radius-sm);
  border: none; cursor: pointer; transition: all 0.15s ease; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-play {
  background: linear-gradient(135deg, var(--neon-green), #3da64d);
  color: var(--text-dark); box-shadow: 0 4px 16px rgba(90, 196, 106, 0.2);
}
.btn-play:hover { filter: brightness(1.1); transform: translateY(-1px); color: var(--text-dark); }
.btn-outline {
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--blue); background: rgba(59, 168, 255, 0.06); color: var(--white);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--text-dark);
}
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); color: var(--text-dark); }

/* --- Legal Content --- */
.legal-content h3 { font-family: 'Inter', sans-serif; }

/* --- Game Detail Page --- */
.game-hero {
  display: flex; flex-direction: column; gap: 24px; margin-bottom: 48px;
}
.game-hero-top {
  display: flex; align-items: flex-start; gap: 20px;
}
.game-meta-badge {
  display: inline-block; padding: 4px 12px; font-size: 0.75rem;
  font-weight: 600; border-radius: 20px; letter-spacing: 0.03em;
}
.badge-category {
  background: rgba(212,160,74,0.15); color: var(--gold); border: 1px solid rgba(212,160,74,0.2);
}
.badge-difficulty {
  background: rgba(59,168,255,0.1); color: var(--blue); border: 1px solid rgba(59,168,255,0.15);
}
.badge-players {
  background: rgba(90,196,106,0.1); color: var(--neon-green); border: 1px solid rgba(90,196,106,0.15);
}
.game-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.game-tagline {
  font-size: 1.1rem; color: var(--muted); font-style: italic; margin-bottom: 8px;
}
.game-description p {
  color: var(--text); font-size: 0.95rem; line-height: 1.8; margin-bottom: 16px;
}
.game-play-cta {
  display: flex; gap: 12px; align-items: center; margin: 24px 0 0;
  padding: 24px; background: linear-gradient(135deg, rgba(90,196,106,0.08), rgba(59,168,255,0.06));
  border: 1px solid rgba(90,196,106,0.15); border-radius: var(--radius);
}
.game-play-cta .cta-text { flex-grow: 1; }
.game-play-cta .cta-text strong { color: var(--white); font-size: 1rem; display: block; }
.game-play-cta .cta-text span { color: var(--muted); font-size: 0.85rem; }

/* How to Play steps */
.how-to-play-list {
  list-style: none; padding: 0; counter-reset: step;
}
.how-to-play-list li {
  counter-increment: step;
  padding: 12px 12px 12px 48px; position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.how-to-play-list li:last-child { border-bottom: none; }
.how-to-play-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(212,160,74,0.12); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}

/* Tips grid */
.tips-grid { display: grid; gap: 12px; }
.tip-item {
  padding: 16px 20px; border-radius: var(--radius-sm);
  background: rgba(59,168,255,0.04); border-left: 3px solid var(--blue);
  font-size: 0.9rem; color: var(--text); line-height: 1.6;
}

/* Features list */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.feature-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  font-size: 0.85rem; color: var(--text);
}
.feature-check { color: var(--neon-green); font-weight: 700; }

/* Controls table */
.controls-table {
  width: 100%; border-collapse: collapse;
}
.controls-table th {
  text-align: left; padding: 10px 14px; font-size: 0.8rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.controls-table td {
  padding: 12px 14px; font-size: 0.9rem; color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

/* Related games */
.related-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: all 0.15s ease;
}
.related-card:hover {
  background: rgba(255,255,255,0.05); border-color: rgba(212,160,74,0.2);
  color: var(--white); transform: translateX(2px);
}
.related-card-name { font-weight: 600; font-size: 0.9rem; }
.related-card-desc { font-size: 0.75rem; color: var(--muted); }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border); padding: 36px 20px; text-align: center;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; display: flex;
  flex-direction: column; align-items: center; gap: 16px;
}
.footer-brand { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700; color: var(--gold); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); font-size: 0.85rem; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .page-nav-links {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(13,13,20,0.98); padding: 16px 20px; border-bottom: 1px solid var(--border);
  }
  .page-nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .contact-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .game-hero-top { flex-direction: column; }
  .features-grid { grid-template-columns: 1fr; }
  .game-play-cta { flex-direction: column; text-align: center; }
}
