/* =============================================
   theme.css — Premium Dark / Streaming Style
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;700;900&family=Mulish:wght@300;400;500&display=swap');

:root {
  --bg:          #090912;
  --bg2:         #0d0d1a;
  --surface:     #111122;
  --surface2:    #181830;
  --surface3:    #1e1e3a;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.13);
  --red:         #e8192c;
  --red-glow:    rgba(232,25,44,0.35);
  --orange:      #ff5500;
  --text:        #f2f2ff;
  --muted:       rgba(255,255,255,0.42);
  --green:       #00e676;
  --font-display:'Unbounded', sans-serif;
  --font-body:   'Mulish', sans-serif;
  --max-chat:    1060px;
  --header-h:    62px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Анимации ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(22px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -300% center; }
  100% { background-position:  300% center; }
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,230,118,0.6); }
  50%      { box-shadow: 0 0 0 5px rgba(0,230,118,0); }
}
@keyframes counter-flip {
  from { opacity:0; transform:translateY(5px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes border-rotate {
  to { --angle: 360deg; }
}
@keyframes gradshift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ── Фоновые слои ─────────────────────────── */

/* Тонкая сетка */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    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: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 100%);
}

/* Атмосферное свечение центра */
.bg-vignette {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%,   rgba(232,25,44,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(41,121,255,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 80%,   rgba(101,31,255,0.05) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Шум поверх всего */
.bg-noise {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}

/* ── Wrapper ──────────────────────────────── */
#wrapper {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
#header {
  height: var(--header-h);
  padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 200;
  background: rgba(9,9,18,0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.4s ease both;
}

/* Градиентная линия снизу хедера */
#header::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(232,25,44,0.7) 20%,
    rgba(255,85,0,0.5) 50%,
    rgba(41,121,255,0.6) 80%,
    transparent 100%);
}

.logo-link {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 28px; width: auto;
  filter: brightness(1.15) drop-shadow(0 0 8px rgba(232,25,44,0.3));
}

.logo-text {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 400;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

/* Счётчик онлайна */
.online-counter {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 18px;
  border-radius: 28px;
  border: 1px solid rgba(0,230,118,0.18);
  background: rgba(0,230,118,0.05);
}

.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-dot 1.8s ease infinite;
  box-shadow: 0 0 6px var(--green);
}

.online-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.05em;
}

.online-num {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  color: var(--green);
  min-width: 54px; text-align: right;
  letter-spacing: 0.02em;
}

.online-num.tick {
  animation: counter-flip 0.2s ease both;
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 24px 56px;
  animation: fadeUp 0.5s ease 0.06s both;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 500; color: rgba(255,255,255,0.45);
  margin-bottom: 24px;
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.04);
}

.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 6px var(--red);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 66px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 20px;
  width: 100%;
  text-align: center !important;
}

.line-white {
  display: block !important;
  text-align: center !important;
  color: #fff;
}

/* Огненный градиент с анимацией */
.line-fire {
  display: block !important;
  text-align: center !important;
  background: linear-gradient(90deg, var(--red), var(--orange), #ffaa00, var(--red));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradshift 4s ease infinite;
}

.hero-sub {
  font-size: 16px; color: var(--muted);
  font-weight: 300; max-width: 480px;
  margin: 0 auto; line-height: 1.65;
  letter-spacing: 0.01em;
  text-align: center !important;
}

/* ══════════════════════════════════════════
   DIVIDER — декоративная черта между hero и чатом
══════════════════════════════════════════ */
.hero-divider {
  width: 100%; max-width: var(--max-chat);
  margin: 44px auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.08) 20%,
    rgba(232,25,44,0.3) 50%,
    rgba(255,255,255,0.08) 80%,
    transparent);
  position: relative;
}

.hero-divider::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

/* ══════════════════════════════════════════
   CHAT SECTION
══════════════════════════════════════════ */
.inset-modules {
  text-align: center;
  padding: 0 24px 20px;
}

.chat-section {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 32px 64px;
  animation: fadeUp 0.6s ease 0.12s both;
}

/* Рамка с вращающимся градиентом */
.chat-frame-outer {
  position: relative;
  width: 100%; max-width: var(--max-chat);
  border-radius: 18px;
  padding: 1.5px;
  background: var(--surface);
  isolation: isolate;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.75),
    0 0 0 1px rgba(255,255,255,0.03);
}

.chat-frame-outer::before {
  content: '';
  position: absolute; inset: -1.5px;
  border-radius: 19.5px;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--red) 0%,
    var(--orange) 15%,
    rgba(255,255,255,0.15) 30%,
    var(--orange) 50%,
    var(--red) 65%,
    rgba(255,255,255,0.08) 80%,
    var(--red) 100%
  );
  z-index: -1;
  animation: border-rotate 5s linear infinite;
}

.chat-frame {
  position: relative; z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  width: 100%;
}

/* Топбар */
.chat-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.topbar-dots { display: flex; gap: 7px; }
.topbar-dots span { width: 11px; height: 11px; border-radius: 50%; }
.d-r { background: #ff5f57; box-shadow: 0 0 6px rgba(255,95,87,0.6); }
.d-y { background: #febc2e; box-shadow: 0 0 6px rgba(254,188,46,0.4); }
.d-g { background: #28c840; box-shadow: 0 0 6px rgba(40,200,64,0.5); }

.topbar-title {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

.topbar-live {
  display: flex; align-items: center; gap: 7px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--red);
  padding: 3px 10px; border-radius: 10px;
  border: 1px solid rgba(232,25,44,0.2);
  background: rgba(232,25,44,0.07);
}

.live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 6px var(--red);
  animation: pulse-dot 1.4s ease infinite;
}

#coomeet_container {
  width: 100%; height: 640px;
  display: block; background: var(--surface);
}

/* ══════════════════════════════════════════
   РЕКЛАМА + КОНТЕНТ
══════════════════════════════════════════ */
.top-modules {
  width: 100%; max-width: var(--max-chat);
  margin: 24px auto 0;
  font-size: 12px; text-align: center;
  color: rgba(255,255,255,0.14);
}

.content-area {
  width: 100%; max-width: 840px;
  margin: 36px auto 0;
  padding: 44px 56px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.45);
  color: #111;
  font-size: 15px; line-height: 1.85;
  font-weight: 400; text-align: center;
}

.content-area a { color: var(--red); text-decoration: none; border-bottom: 1px solid rgba(232,25,44,0.25); }
.content-area a:hover { border-color: var(--red); }
.content-area h1,.content-area h2,.content-area h3 {
  font-family: var(--font-display); font-weight: 700;
  color: #080812; margin: 28px 0 12px;
  letter-spacing: -0.02em; text-align: center;
}
.content-area h1 { font-size: 22px; }
.content-area h2 { font-size: 18px; }
.content-area h3 { font-size: 14px; }
.content-area p { margin-bottom: 14px; }
.content-area p:last-child { margin: 0; }
.content-area ul,.content-area ol { text-align:left; display:inline-block; padding-left:20px; margin:8px 0 14px; }
.content-area li { margin-bottom: 6px; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
#footer {
  margin-top: 56px;
  padding: 26px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(9,9,18,0.7);
  backdrop-filter: blur(12px);
  position: relative;
}

#footer::before {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,25,44,0.35), rgba(41,121,255,0.35), transparent);
}

.f-nav {
  display: flex; justify-content: center;
  flex-wrap: wrap; gap: 4px; margin-bottom: 12px;
}

.f-nav a {
  font-size: 12px; color: rgba(255,255,255,0.25);
  text-decoration: none; padding: 5px 15px;
  border-radius: 18px; border: 1px solid transparent;
  letter-spacing: 0.04em; transition: all 0.22s ease;
}
.f-nav a:hover {
  color: rgba(255,255,255,0.85);
  border-color: var(--border2);
  background: var(--surface2);
}

.copyright {
  font-size: 10px; color: rgba(255,255,255,0.1);
  letter-spacing: 0.1em; text-transform: uppercase;
}
