:root {
  --bg: #05020b;
  --bg-soft: #0d0718;
  --bg-card: rgba(255, 255, 255, 0.065);
  --bg-card-strong: rgba(255, 255, 255, 0.095);
  --text: #ffffff;
  --muted: #b8b0c8;
  --dim: #817891;
  --violet: #8b5cf6;
  --violet-2: #6d28d9;
  --violet-3: #c4b5fd;
  --red: #fb305b;
  --green: #22c55e;
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(139, 92, 246, 0.48);
  --shadow: rgba(139, 92, 246, 0.22);
  --radius: 28px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, 0.34), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(251, 48, 91, 0.13), transparent 28%),
    radial-gradient(circle at 50% 110%, rgba(109, 40, 217, 0.2), transparent 35%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

a {
  color: inherit;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.62;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.25), transparent 36%), #05020b;
  animation: pageOut .62s ease forwards;
}

@keyframes pageOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.04); visibility: hidden; }
}

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1160px, calc(100% - 28px));
  min-height: 68px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(5, 2, 11, 0.74);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 80px rgba(0,0,0,.3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 950;
  letter-spacing: -0.05em;
  font-size: 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  box-shadow: 0 0 40px var(--shadow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 12px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  transition: .22s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,.08);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  padding: 13px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  font-weight: 950;
  font-size: 14px;
  box-shadow: 0 18px 45px rgba(139,92,246,.28);
}

.live-pill span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 16px var(--red);
  animation: blink 1.4s infinite;
}

.mobile-toggle {
  display: none;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 44px;
  height: 44px;
  font-size: 22px;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 120px;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 70px 0;
}

.hero.compact {
  min-height: 48vh;
  padding-bottom: 38px;
}

.home-hero {
  overflow: hidden;
}

.orb {
  position: absolute;
  width: 270px;
  height: 270px;
  border-radius: 999px;
  filter: blur(40px);
  opacity: .34;
  pointer-events: none;
}

.orb-one {
  top: 22%;
  left: 6%;
  background: var(--violet);
  animation: float 6s ease-in-out infinite;
}

.orb-two {
  bottom: 8%;
  right: 8%;
  background: var(--red);
  animation: float 7s ease-in-out infinite reverse;
}

.profile-ring {
  position: relative;
  width: 118px;
  height: 118px;
  margin-bottom: 20px;
  border-radius: 999px;
  padding: 4px;
  background: linear-gradient(135deg, var(--violet), var(--red), var(--violet-3));
  box-shadow: 0 0 70px rgba(139,92,246,.36);
}

.profile-ring img,
.profile-fallback {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  background: #12091f;
  border: 5px solid #090411;
}

.profile-fallback {
  display: grid;
  place-items: center;
  font-size: 50px;
  font-weight: 1000;
  letter-spacing: -0.08em;
}

.status-ring {
  position: absolute;
  right: -13px;
  bottom: 9px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 1000;
  border: 3px solid #090411;
  box-shadow: 0 0 25px rgba(251,48,91,.55);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 24px;
  padding: 11px 17px;
  border-radius: 999px;
  border: 1px solid rgba(139,92,246,.55);
  background: rgba(139,92,246,.14);
  color: #efe9ff;
  font-weight: 950;
  box-shadow: 0 0 44px rgba(139,92,246,.16);
}

.live-badge {
  animation: pulse 2.1s infinite;
}

h1 {
  max-width: 100%;
  font-size: clamp(58px, 11vw, 150px);
  line-height: .86;
  letter-spacing: -0.085em;
  background: linear-gradient(180deg, white 15%, #d8ccff 52%, #8b5cf6 100%);
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 60px rgba(139,92,246,.2));
}

h2 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: .95;
  letter-spacing: -0.07em;
  margin-bottom: 20px;
}

h3 {
  font-size: 23px;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  max-width: 750px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.58;
}

.hero-actions,
.button-row {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 950;
  color: white;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-xl {
  min-height: 58px;
  padding: 0 26px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  box-shadow: 0 18px 60px rgba(139,92,246,.32);
}

.btn-secondary,
.btn-ghost {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.btn-ghost:hover,
.btn-secondary:hover {
  border-color: var(--border-strong);
  box-shadow: 0 18px 48px rgba(139,92,246,.13);
}

.countdown-panel {
  width: min(450px, 100%);
  margin: 26px auto 0;
  padding: 18px 20px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 80px rgba(0,0,0,.25);
}

.countdown-panel small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 800;
}

.countdown-panel strong {
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.06em;
}

.section,
.twitch-showcase,
.live-grid {
  padding: 60px 0;
}

.twitch-showcase {
  display: grid;
  grid-template-columns: .92fr 1.25fr;
  gap: 24px;
  align-items: stretch;
}

.showcase-copy,
.chat-panel,
.contact-form,
.legal-card,
.api-card,
.feature-card,
.network-card,
.manual-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
  box-shadow: 0 24px 90px rgba(0,0,0,.24);
}

.showcase-copy {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.showcase-copy p,
.feature-card p,
.network-card p,
.manual-card p,
.chat-panel p,
.legal-card p {
  color: var(--muted);
  line-height: 1.65;
}

.kicker {
  display: block;
  color: var(--violet-3);
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 12px;
}

.api-card {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 16px;
  margin-top: 22px;
}

.api-card span,
.live-info-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.api-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--dim);
  flex: 0 0 auto;
}

.api-dot.live {
  background: var(--red);
  box-shadow: 0 0 24px rgba(251,48,91,.75);
  animation: blink 1.3s infinite;
}

.api-dot.ok {
  background: var(--green);
  box-shadow: 0 0 20px rgba(34,197,94,.45);
}

.twitch-shell {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: #0b0613;
  min-height: 400px;
  box-shadow: 0 30px 110px rgba(139,92,246,.18);
}

.twitch-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
  display: block;
}

.twitch-shell.large iframe {
  min-height: 620px;
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: stretch;
}

.main-player {
  min-width: 0;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.live-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.chat-panel {
  padding: 20px;
}

.chat-frame {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  margin-top: 16px;
  height: 620px;
}

.chat-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.feature-grid,
.video-grid,
.network-grid,
.manual-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(4, 1fr);
}

.video-grid {
  grid-template-columns: repeat(3, 1fr);
}

.network-grid {
  grid-template-columns: repeat(4, 1fr);
}

.manual-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card,
.manual-card {
  padding: 24px;
  min-height: 220px;
  transition: .22s ease;
}

.feature-card span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.35);
  margin-bottom: 18px;
  font-size: 24px;
}

.feature-card:hover,
.network-card:hover,
.manual-card:hover,
.video-card:hover {
  transform: translateY(-7px);
  border-color: var(--border-strong);
  box-shadow: 0 28px 100px rgba(139,92,246,.18);
}

.video-card,
.skeleton-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  min-height: 280px;
  transition: .22s ease;
}

.skeleton-card {
  background: linear-gradient(100deg, rgba(255,255,255,.05), rgba(255,255,255,.11), rgba(255,255,255,.05));
  background-size: 220% 100%;
  animation: shimmer 1.6s infinite;
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,.05);
}

.video-body {
  padding: 18px;
}

.video-body h3 {
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.video-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.video-body a,
.manual-card a,
.network-card span {
  display: inline-flex;
  margin-top: 16px;
  color: #ddd6fe;
  font-weight: 950;
  text-decoration: none;
}

.social-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.social-strip a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: .22s ease;
}

.social-strip a:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 70px rgba(139,92,246,.16);
}

.social-strip b,
.network-card b,
.manual-card b {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(139,92,246,.16);
  color: white;
  border: 1px solid rgba(139,92,246,.35);
  font-weight: 1000;
}

.social-strip span {
  color: var(--muted);
  font-weight: 900;
}

.network-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 24px;
  text-decoration: none;
  transition: .22s ease;
}

.network-card h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.network-card span {
  margin-top: auto;
}

.network-card.twitch,
.network-card.discord {
  grid-column: span 2;
}

.network-card.twitch {
  background: linear-gradient(135deg, rgba(139,92,246,.24), rgba(255,255,255,.055));
  border-color: rgba(139,92,246,.44);
}

.network-card.discord {
  background: linear-gradient(135deg, rgba(88,101,242,.22), rgba(255,255,255,.055));
}

.contact-form {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.08);
  color: white;
  border-radius: 18px;
  padding: 16px;
  font: inherit;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--border-strong);
}

textarea {
  resize: vertical;
}

.footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer a {
  color: #ddd6fe;
  text-decoration: none;
  margin-left: 12px;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 60px;
}

.legal-page h1 {
  font-size: clamp(44px, 8vw, 80px);
  margin-bottom: 26px;
}

.legal-card {
  padding: 28px;
}

.legal-card h2 {
  font-size: 26px;
  margin-top: 26px;
  margin-bottom: 10px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s ease, transform .75s ease;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(139,92,246,.18); }
  50% { transform: scale(1.035); box-shadow: 0 0 65px rgba(139,92,246,.35); }
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}

@keyframes float {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(0,-20px,0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1050px) {
  .twitch-showcase,
  .live-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .network-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-grid,
  .manual-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-frame {
    height: 420px;
  }

  .social-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar {
    border-radius: 26px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    order: 5;
    width: 100%;
    padding: 8px 0 4px;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-links a {
    text-align: center;
  }

  .live-pill {
    display: none;
  }

  main {
    width: min(100% - 22px, 1160px);
    padding-top: 108px;
  }

  .hero,
  .hero.compact {
    min-height: 62vh;
    padding: 45px 0;
  }

  .profile-ring {
    width: 100px;
    height: 100px;
  }

  .hero-actions,
  .button-row,
  .player-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .feature-grid,
  .video-grid,
  .network-grid,
  .manual-grid,
  .social-strip {
    grid-template-columns: 1fr;
  }

  .network-card.twitch,
  .network-card.discord {
    grid-column: span 1;
  }

  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .twitch-shell iframe,
  .twitch-shell.large iframe {
    min-height: 300px;
  }

  .chat-frame {
    height: 360px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }

  .footer a {
    margin: 0 6px;
  }
}
