/* ============================================================
   STYLE.CSS — Optimized & fully responsive
   Platforms: Mobile · Tablet · Desktop · TV/4K
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #7C3AED;
  --accent-glow: #a855f7;
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #16161f;
  --text: #e8e8f0;
  --muted: #8888a8;
  --border: rgba(255,255,255,0.07);
  --font-title: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;

  /* Fluid spacing scale */
  --space-xs: clamp(0.5rem,  1vw,  0.75rem);
  --space-sm: clamp(0.75rem, 1.5vw, 1rem);
  --space-md: clamp(1rem,    2vw,  1.5rem);
  --space-lg: clamp(1.5rem,  3vw,  2.5rem);
  --space-xl: clamp(2rem,    5vw,  4rem);
  --space-2xl:clamp(3rem,    7vw,  6rem);

  /* Fluid type scale */
  --text-xs:   clamp(0.65rem, 1vw,  0.78rem);
  --text-sm:   clamp(0.8rem,  1.2vw, 0.95rem);
  --text-base: clamp(0.9rem,  1.4vw, 1.05rem);
  --text-lg:   clamp(1rem,    1.8vw, 1.2rem);
  --text-xl:   clamp(1.2rem,  2.5vw, 1.6rem);
  --text-hero: clamp(2.4rem,  9vw,  6rem);

  /* Touch target minimum */
  --tap: 44px;
}

/* ── BASE ───────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── CANVAS BACKGROUND ──────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── NAVBAR ─────────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1rem, 3vw, 2rem);
  height: clamp(54px, 7vw, 70px);
}
.nav-inner {
  max-width: clamp(900px, 90vw, 1400px);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.nav-logo {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 1px;
  text-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 6px clamp(8px, 1.5vw, 14px);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-toggle button {
  background: none; border: none;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 5px 11px;
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  transition: color 0.2s, background 0.2s;
  min-height: var(--tap);
}
.lang-toggle button.active { background: var(--accent); color: #fff; }

.btn-cta {
  background: var(--accent); color: #fff;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 8px clamp(12px, 2vw, 18px);
  border-radius: 8px;
  transition: opacity 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 40%, transparent);
  flex-shrink: 0;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.btn-cta:hover { opacity: 0.85; }

/* ── HAMBURGER (mobile nav) ─────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  min-width: var(--tap);
  min-height: var(--tap);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh; /* safe area on mobile */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: clamp(54px, 7vw, 70px);
  z-index: 1;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, color-mix(in srgb, var(--accent) 25%, transparent) 0%, transparent 70%),
    var(--bg);
  background-size: cover;
  background-position: center;
}
.hero-bg.has-image { background-color: transparent; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,15,0.2) 0%, rgba(10,10,15,0.65) 70%, var(--bg) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: var(--space-lg) var(--space-md);
  max-width: clamp(320px, 85vw, 800px);
  width: 100%;
  animation: fadeUp 0.8s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 6px 20px;
  border-radius: 100px;
  margin-bottom: var(--space-md);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.hero-title {
  font-family: var(--font-title);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 0 0 40px var(--accent-glow);
  margin-bottom: var(--space-sm);
}
.hero-sub {
  font-size: var(--text-base);
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}
.hero-btns {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}
.btn-primary {
  background: var(--accent); color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 32px);
  border-radius: 10px;
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-outline {
  border: 1px solid rgba(255,255,255,0.2); color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 32px);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  transition: background 0.2s, border-color 0.2s;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
.hero-stats {
  display: flex;
  gap: clamp(1rem, 4vw, 2.5rem);
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stat .val {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--accent);
}
.hero-stat .lbl {
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: var(--muted); font-size: 1.2rem; z-index: 2;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── SECTIONS ─────────────────────────────────────────────── */
.section {
  padding: var(--space-2xl) clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 1;
}
.section-dark { background: var(--bg2); }
.container {
  max-width: clamp(320px, 92vw, 1400px);
  margin: 0 auto;
}
.center { text-align: center; }
.section-label {
  display: block;
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

/* ── ABOUT ────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-desc {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  font-size: var(--text-base);
}
.game-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.game-tag {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  font-family: var(--font-title);
  letter-spacing: 1px;
}
.about-avatar-wrap { position: relative; flex-shrink: 0; }
.about-avatar {
  width: clamp(130px, 20vw, 200px);
  height: clamp(130px, 20vw, 200px);
  border-radius: 50%;
  overflow: hidden;
  position: relative; z-index: 1;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 40%, transparent);
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initials {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  background: var(--bg3);
}
.avatar-ring {
  position: absolute; inset: -12px; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--accent) 30%, transparent);
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SCHEDULE ─────────────────────────────────────────────── */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(100px, 12vw, 140px), 1fr));
  gap: clamp(0.5rem, 1.5vw, 1rem);
}
.schedule-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(0.8rem, 2vw, 1.25rem) clamp(0.5rem, 1.5vw, 1rem);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.schedule-card:hover { transform: translateY(-3px); }
.schedule-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 25%, transparent);
}
.schedule-card.off { opacity: 0.4; }
.schedule-day {
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}
.schedule-time { font-size: var(--text-xs); color: var(--muted); }
.schedule-badge {
  display: inline-block;
  margin-top: 0.6rem;
  background: #ef4444; color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 100px;
  letter-spacing: 1px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

/* ── SOCIALS ──────────────────────────────────────────────── */
.socials-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  justify-content: center;
  margin-top: var(--space-sm);
}
.social-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.2rem, 3vw, 2rem);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  min-width: clamp(110px, 15vw, 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.social-card:hover { transform: translateY(-4px); }
.social-icon {
  width: clamp(28px, 4vw, 36px);
  height: clamp(28px, 4vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-icon svg { width: 100%; height: 100%; }
.social-name {
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: 700;
}
.social-followers { font-size: var(--text-xs); color: var(--muted); }

/* ── FOOTER ───────────────────────────────────────────────── */
#footer {
  text-align: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-xs);
  position: relative;
  z-index: 1;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── MOBILE (≤ 600px) ──────────────────────────────────────── */
@media (max-width: 600px) {

  /* Navbar: hide links, show hamburger */
  .nav-links { display: none; }
  .lang-toggle { display: none; }
  .btn-cta { display: none; }
  .nav-hamburger { display: flex; }

  /* Mobile nav drawer */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: clamp(54px, 7vw, 70px);
    left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 1.5rem 2rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    z-index: 99;
    animation: slideDown 0.25s ease;
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .nav-links.open li a {
    font-size: 1rem;
    padding: 12px 8px;
    width: 100%;
    border-radius: 8px;
  }
  .nav-links.open + .btn-cta,
  .nav-links.open ~ .btn-cta { display: none; }

  /* Hero */
  .hero-content { padding: 1.5rem 1rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .btn-primary, .btn-outline { width: 100%; max-width: 280px; justify-content: center; }
  .hero-stats { gap: 1.2rem; }
  .scroll-hint { display: none; }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-avatar-wrap {
    display: flex;
    justify-content: center;
    order: -1;
    margin-bottom: 0.5rem;
  }
  .game-tags { justify-content: center; }

  /* Schedule */
  .schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Socials */
  .socials-grid { gap: 0.6rem; }
  .social-card { min-width: calc(50% - 0.3rem); flex: 1 1 calc(50% - 0.3rem); }
}

/* ── TABLET (601px – 900px) ─────────────────────────────────── */
@media (min-width: 601px) and (max-width: 900px) {

  /* Navbar: compress links */
  .nav-links a {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-avatar-wrap {
    display: flex;
    justify-content: center;
    order: -1;
  }
  .game-tags { justify-content: center; }

  /* Schedule */
  .schedule-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Socials */
  .social-card { min-width: clamp(120px, 20vw, 160px); }
}

/* ── DESKTOP (901px – 1600px) ───────────────────────────────── */
@media (min-width: 901px) and (max-width: 1600px) {
  .about-grid { grid-template-columns: 1fr auto; }
  .schedule-grid { grid-template-columns: repeat(7, 1fr); }
}

/* ── LARGE DESKTOP (1601px – 2560px) ───────────────────────── */
@media (min-width: 1601px) {
  :root {
    --text-base: 1.1rem;
    --text-sm: 0.95rem;
    --text-xs: 0.85rem;
    --text-lg: 1.3rem;
  }
  .about-grid { grid-template-columns: 1fr auto; gap: 6rem; }
  .schedule-grid { grid-template-columns: repeat(7, 1fr); gap: 1.25rem; }
  .social-card { min-width: 170px; }
  .hero-content { max-width: 900px; }
  #navbar { height: 72px; }
}

/* ── TV / 4K (≥ 2561px) ─────────────────────────────────────── */
@media (min-width: 2561px) {
  :root {
    --text-base: 1.3rem;
    --text-sm: 1.1rem;
    --text-xs: 0.95rem;
    --text-hero: clamp(5rem, 7vw, 9rem);
    --space-2xl: 8rem;
    --radius: 18px;
  }
  .container { max-width: 2000px; }
  #navbar { height: 90px; padding: 0 4rem; }
  .nav-logo { font-size: 2rem; }
  .btn-cta { font-size: 1rem; padding: 12px 28px; border-radius: 12px; }
  .nav-links a { font-size: 1rem; padding: 8px 20px; }
  .about-avatar {
    width: 300px;
    height: 300px;
  }
  .schedule-card { padding: 1.75rem 1.25rem; }
  .social-card { min-width: 200px; padding: 2rem 2.5rem; }
  .social-icon { width: 48px; height: 48px; }
  .hero-content { max-width: 1100px; }
  .hero-badge { font-size: 0.9rem; padding: 8px 28px; }
  .hero-stats { gap: 3.5rem; }
  .hero-stat .val { font-size: 2.8rem; }
  .scroll-hint { font-size: 1.6rem; }
}

/* ── REDUCED MOTION ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .avatar-ring { animation: none; }
  .schedule-badge { animation: none; opacity: 1; }
  .scroll-hint { animation: none; }
}

/* ── HIGH CONTRAST MODE ─────────────────────────────────────── */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255,255,255,0.25);
    --muted: #aaaacc;
  }
  .schedule-card, .social-card { border-width: 2px; }
}

/* ── DARK MODE (already dark, just ensure safe fallback) ─────── */
@media (prefers-color-scheme: light) {
  /* Site is intentionally dark — no change needed */
}
