/* ============================================
   SiliconBrain.eu — Prime Board Game
   Style: Modern, Dark, Game-Focused
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #6c2bd9;
  --primary-dark: #4a1a9e;
  --primary-light: #8b5cf6;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --accent-glow: rgba(6, 182, 212, 0.3);
  --surface: #0f172a;
  --surface-2: #1e293b;
  --surface-3: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); text-decoration: underline; }
ul { list-style: none; }
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
  border: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(6,182,212,0.15); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}
.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
}
.navbar.scrolled {
  background: rgba(15, 23, 42, 0.97);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.navbar-logo:hover { text-decoration: none; color: var(--accent); }
.navbar-logo img { width: 36px; height: 36px; border-radius: 8px; }
.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-links a {
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.navbar-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; }
.navbar-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface) 0%, #1a0533 40%, #0c1e33 70%, var(--surface) 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(108,43,217,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(6,182,212,0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 24px;
  animation: fadeIn 0.8s ease;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease;
}
.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  animation: fadeInUp 0.8s ease 0.1s both;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* --- Hero CTA Cards --- */
.hero-ctas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.3s both;
}
.cta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}
.cta-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
  transform: translateY(-4px);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}
.cta-card .cta-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.cta-card .cta-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.cta-card .cta-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.cta-card.play-store { border-color: rgba(16,185,129,0.3); }
.cta-card.play-store:hover { border-color: var(--success); }
.cta-card.steam { border-color: rgba(59,130,246,0.3); }
.cta-card.steam:hover { border-color: #3b82f6; }
.cta-card.linux { border-color: rgba(249,115,22,0.3); }
.cta-card.linux:hover { border-color: var(--warning); }
.cta-card.tutorial { border-color: rgba(139,92,246,0.3); }
.cta-card.tutorial:hover { border-color: var(--primary-light); }

/* --- Hero Bottom Arrow --- */
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: float 3s ease-in-out infinite;
}
.hero-scroll a {
  color: var(--text-dim);
  font-size: 1.5rem;
  transition: color var(--transition);
}
.hero-scroll a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* --- Section Base --- */
.section {
  padding: 100px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 16px auto;
}

/* --- How to Play Section --- */
.how-to-play {
  background: var(--surface-2);
}
.how-to-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.how-to-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.how-to-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}
.how-to-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(108,43,217,0.2), transparent);
}
.how-to-text h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent);
}
.how-to-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}
.how-to-text p:last-child {
  margin-bottom: 0;
}

/* --- About Section --- */
.about {
  background: var(--surface);
}
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.about-text .about-tagline {
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: 24px;
  font-size: 1.05rem;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}
.about-text .about-dedication {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text);
}
.about-text .about-signature {
  margin-top: 20px;
  font-weight: 600;
  color: var(--text);
}
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.about-image img {
  width: 100%;
  height: auto;
  min-height: 400px;
  object-fit: cover;
}

/* --- Leaderboard Section (Home) --- */
.leaderboard-preview {
  background: var(--surface-2);
}
.leaderboard-grid {
  display: flex;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}
.leaderboard-prompt {
  text-align: center;
  padding: 40px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius);
}
.leaderboard-prompt p {
  color: var(--text-muted);
  margin-bottom: 16px;
}
.leaderboard-prompt .btn {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text);
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition);
}
.leaderboard-prompt .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(108,43,217,0.4);
  text-decoration: none;
}

/* --- Privacy Section --- */
.privacy {
  background: var(--surface);
}
.privacy-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.privacy-content p {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.7;
}
.privacy-content a {
  color: var(--accent);
}

/* --- Footer --- */
.footer {
  background: var(--surface-2);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 300px;
}
.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--accent); text-decoration: none; }

/* --- Cookie Consent --- */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--surface-2);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
}
.cookie-consent.show {
  transform: translateY(0);
}
.cookie-consent .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-consent p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 250px;
}
.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.cookie-btn.accept {
  background: var(--accent);
  color: var(--surface);
}
.cookie-btn.accept:hover {
  background: var(--accent-dark);
}
.cookie-btn.decline {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.cookie-btn.decline:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

/* --- Linux Versions Page --- */
.page-hero {
  padding: 120px 24px 60px;
  text-align: center;
  background: linear-gradient(135deg, var(--surface) 0%, #1a0533 50%, var(--surface) 100%);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}
.page-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
}
.linux-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 40px 0;
}
.linux-card {
  flex: 1;
  min-width: 260px;
  max-width: 340px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}
.linux-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.linux-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.linux-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.linux-card .card-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.linux-card .card-size {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.linux-card .download-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: all var(--transition);
}
.linux-card .download-btn:hover { text-decoration: none; transform: scale(1.02); }
.linux-card.appimage .download-btn { background: var(--success); }
.linux-card.flatpak .download-btn { background: #3b82f6; }
.linux-card.snap .download-btn { background: var(--warning); }
.linux-card .card-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 12px;
}
.linux-card .card-note code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.linux-card .card-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--warning);
}
.requirements {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 28px;
  margin: 40px auto;
  max-width: 700px;
}
.requirements h3 {
  font-family: var(--font-display);
  margin-bottom: 16px;
}
.requirements ul {
  padding-left: 20px;
}
.requirements ul li {
  list-style: disc;
  color: var(--text-muted);
  line-height: 2;
  font-size: 0.95rem;
}
.requirements ul li strong { color: var(--text); }
.linux-footer-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 24px;
  margin-top: 40px;
}
.linux-footer-note a { color: var(--accent); }

/* --- Page Content --- */
.page-section {
  padding: 80px 0;
}

/* --- 404 Page --- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
}
.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.error-page p {
  color: var(--text-muted);
  margin: 20px 0 32px;
  font-size: 1.1rem;
}
.error-page .btn-home {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--surface);
  border-radius: 8px;
  font-weight: 700;
  transition: all var(--transition);
}
.error-page .btn-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
  text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(15,23,42,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .navbar-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .navbar-links a {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
  }
  .navbar-toggle { display: flex; }
  .hero-ctas { grid-template-columns: 1fr 1fr; }
  .how-to-layout,
  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .how-to-image { order: -1; }
  .about-image { order: -1; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .cookie-consent .container {
    flex-direction: column;
    text-align: center;
  }
  .section { padding: 60px 0; }
  .linux-downloads { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .hero-ctas { grid-template-columns: 1fr; }
  .hero { padding: 100px 16px 60px; }
}