/* ================================================================
   WINVPN Stream — премиальная тема
   ================================================================ */

:root {
  --bg: #07070f;
  --bg-soft: #0c0c1a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f1fa;
  --text-dim: rgba(242, 241, 250, 0.62);
  --text-faint: rgba(242, 241, 250, 0.4);
  --gold-1: #ffe3a3;
  --gold-2: #f5c26b;
  --gold-3: #d4973a;
  --violet-1: #a78bfa;
  --violet-2: #8b5cf6;
  --violet-3: #6d28d9;
  --blue-1: #60a5fa;
  --grad-brand: linear-gradient(120deg, var(--gold-2) 0%, #e8a94e 35%, var(--violet-2) 100%);
  --grad-gold: linear-gradient(120deg, var(--gold-1), var(--gold-3));
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25), 0 0 120px rgba(245, 194, 107, 0.12);
  --shadow-card: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

::selection { background: rgba(139, 92, 246, 0.45); }

/* ---------- Фоновая сцена ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(109, 40, 217, 0.16), transparent 60%),
    radial-gradient(900px 600px at 10% 20%, rgba(212, 151, 58, 0.08), transparent 55%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.orb-gold {
  width: 480px; height: 480px;
  top: -140px; right: -80px;
  background: radial-gradient(circle at 30% 30%, rgba(245, 194, 107, 0.5), rgba(212, 151, 58, 0.05) 70%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.orb-violet {
  width: 560px; height: 560px;
  bottom: -180px; left: -140px;
  background: radial-gradient(circle at 60% 40%, rgba(139, 92, 246, 0.45), rgba(109, 40, 217, 0.04) 70%);
  animation: drift-b 26s ease-in-out infinite alternate;
}

.orb-blue {
  width: 380px; height: 380px;
  top: 45%; left: 55%;
  background: radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.28), transparent 70%);
  animation: drift-c 30s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-70px, 60px) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.05); }
  to   { transform: translate(80px, -50px) scale(0.95); }
}
@keyframes drift-c {
  from { transform: translate(0, 0); }
  to   { transform: translate(-90px, -70px); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(900px 600px at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(900px 600px at 50% 0%, #000 20%, transparent 75%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Анимации появления ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.d1 { animation-delay: 0.12s; }
.d2 { animation-delay: 0.24s; }
.d3 { animation-delay: 0.38s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 7, 15, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #0c0c1a;
  background: var(--grad-gold);
  box-shadow: 0 8px 24px -6px rgba(245, 194, 107, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.72));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-links {
  display: flex;
  gap: 6px;
}

.header-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.25s, background 0.25s;
}
.header-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffd7d7;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.25);
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-red 1.6s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
}

/* ---------- Hero ---------- */

.hero {
  padding: 92px 0 46px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(245, 194, 107, 0.35);
  background: linear-gradient(120deg, rgba(245, 194, 107, 0.12), rgba(139, 92, 246, 0.12));
  box-shadow: 0 0 30px rgba(245, 194, 107, 0.12);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 26px auto 0;
  max-width: 15ch;
  background: linear-gradient(180deg, #ffffff 20%, rgba(255, 255, 255, 0.62) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin: 22px auto 0;
  max-width: 62ch;
  color: var(--text-dim);
  font-size: clamp(15px, 2vw, 18px);
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  color: #16101f;
  background: var(--grad-gold);
  box-shadow: 0 14px 34px -10px rgba(245, 194, 107, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s ease;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -10px rgba(245, 194, 107, 0.65); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(-1px); }

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-links a svg { width: 17px; height: 17px; color: var(--violet-1); }
.hero-links a:hover {
  color: var(--text);
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 10px 26px -12px rgba(139, 92, 246, 0.5);
}

/* ---------- Плеер ---------- */

.player-section { padding: 30px 0 80px; }

.player-shell {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: linear-gradient(140deg, rgba(245, 194, 107, 0.35), rgba(255, 255, 255, 0.06) 30%, rgba(139, 92, 246, 0.35));
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.player-shell::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(245, 194, 107, 0.7), transparent 30%, transparent 70%, rgba(139, 92, 246, 0.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  background: #05050c;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* ---------- Заглушка «Стрим выключен» ---------- */

.offline-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  background:
    radial-gradient(700px 380px at 50% 115%, rgba(109, 40, 217, 0.28), transparent 70%),
    radial-gradient(560px 320px at 50% -20%, rgba(212, 151, 58, 0.14), transparent 70%),
    linear-gradient(180deg, #0a0a16 0%, #07070f 100%);
  opacity: 1;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.player-frame.is-live .offline-overlay {
  opacity: 0;
  visibility: hidden;
}

.offline-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 65%);
  filter: blur(30px);
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.offline-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.offline-ring {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.offline-ring::before,
.offline-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(245, 194, 107, 0.35);
  animation: ring-wave 2.6s ease-out infinite;
}
.offline-ring::after { animation-delay: 1.3s; }

@keyframes ring-wave {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.45); opacity: 0; }
}

.offline-ring-inner {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-2);
  background: linear-gradient(150deg, rgba(245, 194, 107, 0.16), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(245, 194, 107, 0.4);
  box-shadow:
    0 0 46px rgba(245, 194, 107, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}
.offline-ring-inner svg { width: 40px; height: 40px; }

.offline-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, var(--gold-1) 10%, #fff 55%, var(--violet-1) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.offline-text {
  max-width: 52ch;
  margin-top: 10px;
  color: var(--text-dim);
  font-size: clamp(13px, 1.8vw, 16px);
}

.offline-chip {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.offline-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-2);
  animation: blink-soft 1.8s ease-in-out infinite;
}

@keyframes blink-soft {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(245, 194, 107, 0.8); }
  50% { opacity: 0.35; box-shadow: 0 0 2px rgba(245, 194, 107, 0.3); }
}

/* Частицы в заглушке */
.offline-particles { position: absolute; inset: 0; pointer-events: none; }
.offline-particles i {
  position: absolute;
  bottom: -12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(245, 194, 107, 0.55);
  animation: float-up 9s linear infinite;
}
.offline-particles i:nth-child(1) { left: 12%; animation-delay: 0s; }
.offline-particles i:nth-child(2) { left: 28%; animation-delay: 2.2s; background: rgba(139, 92, 246, 0.55); }
.offline-particles i:nth-child(3) { left: 47%; animation-delay: 4.4s; width: 4px; height: 4px; }
.offline-particles i:nth-child(4) { left: 63%; animation-delay: 1.2s; background: rgba(139, 92, 246, 0.5); }
.offline-particles i:nth-child(5) { left: 78%; animation-delay: 5.6s; width: 6px; height: 6px; }
.offline-particles i:nth-child(6) { left: 90%; animation-delay: 3.3s; background: rgba(139, 92, 246, 0.45); }

@keyframes float-up {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  85% { opacity: 0.5; }
  100% { transform: translateY(-70vh); opacity: 0; }
}

/* ---------- Загрузка ---------- */

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  background: rgba(5, 5, 12, 0.72);
  backdrop-filter: blur(6px);
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold-2);
  animation: spin 0.9s linear infinite;
}

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

/* ---------- Статус под плеером ---------- */

.player-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 0 6px;
}

.player-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.4s;
}

.player-status.is-live { color: #fecaca; }
.player-status.is-live .status-dot {
  background: #ef4444;
  animation: pulse-red 1.6s ease-in-out infinite;
}
.player-status.is-off .status-dot { background: #475569; }

.player-live-title {
  font-size: 14px;
  color: var(--text-faint);
  font-style: italic;
}

/* ---------- Преимущества ---------- */

.features { padding: 30px 0 100px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 36px);
  text-align: center;
  margin-bottom: 46px;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.6));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.feature-card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s, box-shadow 0.4s;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px 200px at var(--mx, 50%) var(--my, 0%), rgba(245, 194, 107, 0.13), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 194, 107, 0.35);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 194, 107, 0.08);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--gold-2);
  background: linear-gradient(150deg, rgba(245, 194, 107, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(245, 194, 107, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
}
.feature-icon svg { width: 24px; height: 24px; }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ---------- Футер ---------- */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 7, 15, 0.6);
  backdrop-filter: blur(12px);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-faint);
  font-size: 14px;
}

.footer-admin {
  color: var(--text-faint);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.25s;
}
.footer-admin:hover { color: var(--gold-2); }

/* ---------- Адаптив ---------- */

@media (max-width: 760px) {
  .container { width: min(1120px, 100% - 32px); }
  .hero { padding: 60px 0 34px; }
  .header-links { display: none; }
  .player-shell { padding: 6px; border-radius: 20px; }
  .player-frame { border-radius: 15px; }
  .offline-ring { width: 88px; height: 88px; margin-bottom: 16px; }
  .offline-ring-inner { width: 72px; height: 72px; }
  .offline-ring-inner svg { width: 32px; height: 32px; }
  .features { padding: 20px 0 70px; }
}

@media (max-width: 460px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .hero-links { width: 100%; }
  .hero-links a { flex: 1; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
