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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #101018;
  --bg-card: #14141e;
  --bg-card-hover: #1a1a28;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --accent-purple: #7c3aed;
  --accent-purple-dim: rgba(124, 58, 237, 0.15);
  --accent-green: #00ff88;
  --accent-red: #ff3b5c;
  --accent-gold: #c9a84c;
  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --border: #222233;
  --border-light: #2e2e42;
  --glow-accent: rgba(0, 212, 255, 0.12);
  --glow-purple: rgba(124, 58, 237, 0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ===== PAGE TRANSITION ===== */
.page-transition {
  animation: pageIn 0.6s ease-out;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== VIDEO BACKGROUND ===== */
.video-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(10,10,15,0.6) 0%,
      rgba(10,10,15,0.25) 35%,
      rgba(10,10,15,0.3) 65%,
      rgba(10,10,15,0.85) 100%
    ),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(10,10,15,0.5) 100%);
  pointer-events: none;
}

/* ===== SUBTLE BG (for non-video pages) ===== */
.bg-grid {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0,212,255,0.04) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 32px;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  border-bottom-color: rgba(0,212,255,0.1);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.25s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: rgba(0,212,255,0.06);
}

.nav-links a.nav-cta {
  background: linear-gradient(135deg, #5865F2, var(--accent-purple));
  color: #fff;
  font-weight: 700;
  padding: 8px 18px;
  margin-left: 8px;
}

.nav-links a.nav-cta:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-hamburger:hover {
  background: rgba(255,255,255,0.05);
}

/* ===== COMMON SECTION ===== */
.section {
  position: relative;
  z-index: 2;
  padding: 100px 24px;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent);
  margin-bottom: 20px;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #b0b8c8 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 50px;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: rgba(20, 20, 30, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(0,212,255,0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 30px var(--glow-accent);
}

/* ===== 3D TILT EFFECT ===== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 800px;
}

.tilt-card .tilt-inner {
  transition: transform 0.15s ease-out;
}

.tilt-card .tilt-shine {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255,255,255,0.08) 0%, transparent 60%);
  z-index: 5;
}

.tilt-card:hover .tilt-shine {
  opacity: 1;
}

/* ===== TYPING CURSOR ===== */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 3px;
  animation: cursorBlink 0.7s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-discord {
  background: linear-gradient(135deg, #5865F2, var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 20px rgba(88,101,242,0.25);
}

.btn-discord:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 35px rgba(88,101,242,0.4);
  filter: brightness(1.1);
}

.btn-youtube {
  background: linear-gradient(135deg, #c4302b, #8b1a17);
  color: #fff;
  box-shadow: 0 4px 20px rgba(196,48,43,0.2);
}

.btn-youtube:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 35px rgba(196,48,43,0.35);
  filter: brightness(1.1);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: #0a0a0f;
  box-shadow: 0 4px 20px var(--glow-accent);
}

.btn-accent:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 35px rgba(0,212,255,0.35);
  filter: brightness(1.1);
}

.btn-outline {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,212,255,0.06);
  transform: translateY(-3px);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
  text-align: center;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(12px);
}

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.footer-divider {
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-purple));
  margin: 14px auto;
  border-radius: 2px;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9998;
  background: rgba(10, 10, 20, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 24px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cookie-banner.visible { display: flex; }
.cookie-banner p { max-width: 650px; line-height: 1.6; }
.cookie-banner a { color: var(--accent); text-decoration: underline; }

.cookie-banner-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.cookie-btn-accept {
  background: var(--accent);
  color: #0a0a14;
}

.cookie-btn-accept:hover { background: #33dfff; }

.cookie-btn-refuse {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
}

.cookie-btn-refuse:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--glow-accent);
}

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 18px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.preloader-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .navbar { padding: 0 24px; }
  .section { padding: 90px 20px; }
  .section-title { font-size: 2.4rem; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
  .navbar { padding: 0 16px; }

  .section-title { font-size: 2rem; }
  .section { padding: 70px 16px; }
  .glass-card { padding: 20px 16px; }
  .footer { padding: 32px 16px 20px; }
}

@media (max-width: 480px) {
  .section-title { font-size: 1.6rem; }
  .section { padding: 60px 12px; }
  .section-badge { font-size: 0.65rem; padding: 4px 12px; }
  .section-desc { font-size: 0.95rem; }
  .glass-card { padding: 16px 12px; }
  .navbar { padding: 0 12px; }
  .navbar-inner { height: 56px; }
  .nav-brand { font-size: 1rem; }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 300px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .cookie-banner {
    padding: 14px 16px;
    font-size: 0.8rem;
  }

  .cookie-btn {
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .footer-links {
    gap: 16px;
    font-size: 0.78rem;
  }
}

@media (max-width: 360px) {
  .section-title { font-size: 1.4rem; }
  .section { padding: 50px 10px; }
  .glass-card { padding: 14px 10px; }
  .btn { max-width: 260px; }
  .footer-links { gap: 12px; font-size: 0.75rem; }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .nav-card {
    min-height: 44px;
    padding: 16px;
  }

  .btn {
    min-height: 44px;
    padding: 16px 24px;
  }

  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
  }

  .back-to-top {
    width: 48px;
    height: 48px;
  }

  .audio-toggle {
    width: 48px;
    height: 48px;
  }
}

/* ===== DARK MODE & HIGH CONTRAST ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a0f;
    --text-primary: #f0f0f8;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border: #444466;
    --border-light: #555577;
    --text-secondary: #aaaacc;
  }

  .glass-card {
    border-width: 2px;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .video-bg {
    display: none;
  }

  .bg-grid {
    opacity: 0.5;
  }
}
