/* ================================================================
   iamharryyyyy hub — animated dark glassmorphism
   ================================================================ */

:root {
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Inter, Roboto, sans-serif;
  --mono: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  --max: 1160px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --bg: #05060b;
  --bg-2: #080a12;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eaeefb;
  --dim: #a6adc8;
  --faint: #6b7390;
  --accent: #6c8cff;
  --accent-2: #a855f7;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --blur: 22px;
  --shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 10px 40px -16px rgba(0, 0, 0, 0.7);
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, #22d3ee 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  padding-left: 72px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(108, 140, 255, 0.4); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: padding-box; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ================================================================
   Animated background — drifting orbs + grid + aurora
   ================================================================ */

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(108, 140, 255, 0.18), transparent 60%),
    radial-gradient(1000px 620px at -8% 26%, rgba(168, 85, 247, 0.14), transparent 60%),
    radial-gradient(900px 560px at 52% 108%, rgba(34, 211, 238, 0.1), transparent 60%),
    linear-gradient(180deg, #06070e 0%, var(--bg) 50%, #04050a 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.orb-1 {
  width: 46vw; height: 46vw;
  left: -14vw; top: -16vw;
  background: radial-gradient(circle at 35% 35%, #6c8cff, transparent 70%);
  animation: drift-a 30s var(--ease) infinite alternate;
}
.orb-2 {
  width: 40vw; height: 40vw;
  right: -12vw; top: 4vh;
  background: radial-gradient(circle at 50% 50%, #22d3ee, transparent 70%);
  opacity: 0.32;
  animation: drift-b 38s var(--ease) infinite alternate;
}
.orb-3 {
  width: 44vw; height: 44vw;
  left: 26vw; bottom: -20vw;
  background: radial-gradient(circle at 50% 50%, #a855f7, transparent 70%);
  animation: drift-c 44s var(--ease) infinite alternate;
}
.orb-4 {
  width: 26vw; height: 26vw;
  right: 16vw; bottom: -6vw;
  background: radial-gradient(circle at 50% 50%, #ec4899, transparent 70%);
  opacity: 0.22;
  animation: drift-a 52s var(--ease) infinite alternate-reverse;
}

@keyframes drift-a { to { transform: translate3d(12vw, 10vh, 0) scale(1.16); } }
@keyframes drift-b { to { transform: translate3d(-10vw, 15vh, 0) scale(1.1); } }
@keyframes drift-c { to { transform: translate3d(9vw, -13vh, 0) scale(1.2); } }

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 78%);
}

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

/* ================================================================
   Layout
   ================================================================ */

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }

h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.12; font-weight: 700; }
h1 { font-size: clamp(40px, 6.6vw, 74px); }
h2 { font-size: clamp(28px, 3.8vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.015em; }
p { margin: 0; }

.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  padding: 0.1em 0.45em;
  border-radius: 6px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.kicker::before {
  content: '';
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.sec-head { text-align: center; margin: 0 auto 52px; max-width: 680px; }
.sec-head p { color: var(--dim); font-size: 17px; margin-top: 14px; }

/* ================================================================
   Buttons
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.3s;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
}
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad);
  border: none;
  color: #fff;
  box-shadow: 0 10px 34px -12px rgba(108, 140, 255, 0.6);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 44px -14px rgba(108, 140, 255, 0.75);
}
.btn-primary:hover::after { transform: translateX(120%); }

.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }

/* ================================================================
   Nav
   ================================================================ */

.nav {
  position: fixed;
  top: 0; left: 72px; right: 0;
  z-index: 50;
  padding: 14px 0;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 7, 14, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand .logo {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 8px 24px -8px rgba(108, 140, 255, 0.7);
  animation: logo-float 5s ease-in-out infinite;
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-4deg); }
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dim);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }

.kbd {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--dim);
  line-height: 1;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ================================================================
   Hero (hub home)
   ================================================================ */

.hero {
  padding: 170px 0 90px;
  text-align: center;
  position: relative;
}
.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  margin-bottom: 26px;
  backdrop-filter: blur(14px);
  animation: fade-up 0.7s var(--ease-out) both;
}
.hero .pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero h1 {
  animation: fade-up 0.7s var(--ease-out) 0.08s both;
}
.hero .lede {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: 18.5px;
  color: var(--dim);
  animation: fade-up 0.7s var(--ease-out) 0.16s both;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
  animation: fade-up 0.7s var(--ease-out) 0.24s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Card grid
   ================================================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  padding: 30px 0 100px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.3s, box-shadow 0.4s;
  animation: fade-up 0.7s var(--ease-out) both;
  transform-style: preserve-3d;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.13s; }
.card:nth-child(3) { animation-delay: 0.21s; }
.card:nth-child(4) { animation-delay: 0.29s; }

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.09), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 32px 70px -28px rgba(0, 0, 0, 0.85);
}
.card:active { transform: translateY(-4px) scale(0.99); }

.card-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}
.card:hover .card-glow { opacity: 0.45; transform: scale(1.25); }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s var(--ease-out);
}
.card:hover .card-icon { transform: scale(1.1) rotate(-6deg); }
.card-icon svg { width: 26px; height: 26px; }

.card h3 { font-size: 19px; }
.card .desc { color: var(--dim); font-size: 14.5px; line-height: 1.5; flex: 1; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.card-arrow {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease-out), background 0.25s, border-color 0.25s;
  color: var(--dim);
}
.card:hover .card-arrow {
  transform: translateX(4px);
  background: var(--surface-3);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text);
}
.card-tag {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* maintenance state */
.card.maintenance { cursor: not-allowed; }
.card.maintenance:hover { transform: none; border-color: rgba(251, 191, 36, 0.4); box-shadow: none; }
.card.maintenance:hover .card-glow { opacity: 0.25; transform: none; }
.card.maintenance:hover .card-icon { transform: none; }
.card.maintenance:hover .card-arrow { transform: none; }
.maint-badge {
  position: absolute;
  top: 16px; right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 99px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--warn);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: fade-up 0.4s var(--ease-out) both;
}
.maint-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warn);
  animation: pulse-dot 1.6s infinite;
}
.card.maintenance .card-icon { filter: grayscale(0.7) brightness(0.8); }
.card.maintenance .desc { opacity: 0.5; }

/* ================================================================
   Footer
   ================================================================ */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.015);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer p { color: var(--faint); font-size: 14px; }
.footer nav { display: flex; gap: 18px; }
.footer nav a { color: var(--dim); font-size: 14px; transition: color 0.2s; }
.footer nav a:hover { color: var(--text); }

/* ================================================================
   Sub-page hero (afterhours / nexus / scriptmonkey)
   ================================================================ */

.page-hero {
  padding: 150px 0 70px;
  text-align: center;
  position: relative;
}
.page-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 22px;
  backdrop-filter: blur(14px);
  animation: fade-up 0.6s var(--ease-out) both;
}
.page-hero h1 { animation: fade-up 0.6s var(--ease-out) 0.08s both; }
.page-hero .lede {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: 18px;
  color: var(--dim);
  animation: fade-up 0.6s var(--ease-out) 0.14s both;
}
.page-hero .hero-cta { animation: fade-up 0.6s var(--ease-out) 0.2s both; }

.hero-logo {
  width: 92px; height: 92px;
  margin: 0 auto 26px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  animation: fade-up 0.6s var(--ease-out) both, logo-float 6s ease-in-out 0.6s infinite;
}
.hero-logo svg { width: 48px; height: 48px; }

/* ================================================================
   Feature grid (sub-pages)
   ================================================================ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  padding: 20px 0 90px;
}
.feature {
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(16px);
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.35s;
  animation: fade-up 0.6s var(--ease-out) both;
}
.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-soft);
}
.feature .fi {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.6);
}
.feature .fi svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 9px; }
.feature p { color: var(--dim); font-size: 14.5px; }
.feature ul { margin: 14px 0 0; padding: 0; list-style: none; }
.feature ul li {
  position: relative;
  padding-left: 24px;
  color: var(--dim);
  font-size: 14px;
  margin-top: 8px;
}
.feature ul li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: var(--ok);
  font-weight: 700;
}

/* ================================================================
   Split section
   ================================================================ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 60px 0 90px;
}
.split.rev > div:first-child { order: 2; }
.split h2 { margin-bottom: 18px; }
.split .sec-lede { color: var(--dim); font-size: 17px; margin-bottom: 26px; }
.split .checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.split .checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--dim); font-size: 15px; }
.split .checks .ck {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

/* visual card */
.card-visual {
  padding: 30px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.cv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.cv-row:last-of-type { border-bottom: none; }
.cv-row span { color: var(--dim); }
.cv-row strong { color: var(--text); }
.cv-note { margin-top: 16px; color: var(--faint); font-size: 13.5px; line-height: 1.5; }
.shield {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 22px;
  box-shadow: 0 16px 44px -16px rgba(108, 140, 255, 0.7);
  animation: logo-float 5s ease-in-out infinite;
}
.shield svg { width: 32px; height: 32px; }

/* terminal */
.term {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #06070d;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}
.term-bar .sd { width: 11px; height: 11px; border-radius: 50%; }
.term-bar .sd:nth-child(1) { background: #ff5f57; }
.term-bar .sd:nth-child(2) { background: #febc2e; }
.term-bar .sd:nth-child(3) { background: #28c840; }
.term-bar em { margin-left: 8px; font-style: normal; color: var(--faint); font-size: 12.5px; font-family: var(--mono); }
.term pre {
  margin: 0;
  padding: 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--dim);
  overflow-x: auto;
}
.term .c { color: var(--faint); }
.term .p { color: var(--accent); }
.term .ok { color: var(--ok); }

/* ================================================================
   Download card (nexus)
   ================================================================ */

.dl-card {
  width: 100%;
  max-width: 480px;
  margin: 30px auto 0;
  padding: 28px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: var(--surface);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  animation: fade-up 0.6s var(--ease-out) 0.26s both;
}
.dl-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.dl-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 34px -12px rgba(139, 92, 246, 0.7);
}
.dl-icon svg { width: 32px; height: 32px; color: #fff; }
.dl-info { flex: 1; }
.dl-info strong { display: block; font-size: 18px; }
.dl-info span { color: var(--dim); font-size: 13.5px; }
.dl-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13px;
  color: var(--faint);
}
.dl-foot a { color: var(--accent); }

.badge-pill {
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
}

/* ================================================================
   Steps (numbered)
   ================================================================ */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; }
.steps .num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 13px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 10px 28px -10px rgba(108, 140, 255, 0.6);
}
.steps strong { display: block; font-size: 16px; margin-bottom: 4px; }
.steps p { color: var(--dim); font-size: 14.5px; }

/* ================================================================
   FAQ
   ================================================================ */

.faq { display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 22px;
  color: var(--dim);
  transition: transform 0.3s var(--ease);
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--surface-2); }
.faq details p { padding: 0 22px 20px; color: var(--dim); font-size: 14.5px; line-height: 1.6; }

/* ================================================================
   Stats row
   ================================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 10px 0 70px;
}
.stat {
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  text-align: center;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
  animation: fade-up 0.6s var(--ease-out) both;
}
.stat:hover { transform: translateY(-4px); border-color: var(--line-2); }
.stat-num {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.stat-label { color: var(--dim); font-size: 14px; margin-top: 6px; }

/* ================================================================
   Section wrapper
   ================================================================ */

.section { padding: 70px 0; position: relative; }
.section.alt { background: rgba(255, 255, 255, 0.015); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.center-col { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tiny { font-size: 13px; }
.faint { color: var(--faint); }

/* ================================================================
   Toast / broadcast popup
   ================================================================ */

.toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}
.toast {
  padding: 16px 18px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: rgba(12, 14, 24, 0.9);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 20px 60px -18px rgba(0, 0, 0, 0.9);
  animation: toast-in 0.5s var(--ease-out) both;
  position: relative;
  overflow: hidden;
}
.toast.leaving { animation: toast-out 0.4s var(--ease) forwards; }
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad);
}
.toast .t-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.toast .t-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast .t-title .ico {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.toast .t-title .ico svg { width: 13px; height: 13px; }
.toast .t-close {
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}
.toast .t-close:hover { color: var(--text); }
.toast .t-msg { color: var(--dim); font-size: 14px; line-height: 1.5; }
.toast .t-time { color: var(--faint); font-size: 11.5px; margin-top: 8px; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(40px) scale(0.96); }
}

/* maintenance banner */
.maint-banner {
  position: fixed;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 99px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--warn);
  font-size: 13.5px;
  font-weight: 600;
  backdrop-filter: blur(20px);
  animation: fade-up 0.5s var(--ease-out) both;
}
.maint-banner.show { display: inline-flex; }
.maint-banner .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn);
  animation: pulse-dot 1.6s infinite;
}

/* ================================================================
   Admin panel (Ctrl+M)
   ================================================================ */

.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 4, 9, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.25s var(--ease) both;
}
.admin-overlay.open { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.admin-panel {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: rgba(10, 12, 20, 0.96);
  backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  animation: admin-in 0.4s var(--ease-out) both;
}
@keyframes admin-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.admin-head .title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 17px;
}
.admin-head .title .ico {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
}
.admin-head .title .ico svg { width: 13px; height: 13px; }
.admin-close {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--dim);
  width: 36px; height: 36px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
  display: grid;
  place-items: center;
}
.admin-close:hover { background: var(--surface-2); color: var(--text); }

.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 26px 0;
  border-bottom: 1px solid var(--line);
}
.admin-tab {
  padding: 10px 18px;
  border: none;
  background: none;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 26px;
}
.admin-section { display: none; }
.admin-section.active { display: block; animation: fade-in 0.25s var(--ease) both; }

.admin-body h4 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-body h4 .sub { color: var(--faint); font-weight: 500; font-size: 13px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="color"],
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input[type="color"] {
  height: 46px;
  padding: 4px;
  cursor: pointer;
}
.field .hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

.admin-card-row {
  padding: 18px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.admin-card-row:hover { border-color: var(--line-2); }
.admin-card-row .row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-card-row .row-head .mini-icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
}
.admin-card-row .row-head .mini-icon svg { width: 18px; height: 18px; }
.admin-card-row .row-head strong { flex: 1; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.maint-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.maint-toggle .label { flex: 1; font-size: 14px; font-weight: 600; }
.maint-toggle .label .sub { display: block; color: var(--faint); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.switch {
  position: relative;
  width: 46px; height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: background 0.3s;
}
.switch .slider::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s var(--ease-out);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.switch input:checked + .slider { background: var(--warn); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.broadcast-box textarea {
  min-height: 120px;
  font-family: var(--mono);
  font-size: 14px;
}
.broadcast-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.broadcast-actions .status { color: var(--faint); font-size: 13px; }

.admin-foot {
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}
.admin-foot .conn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 13px;
}
.admin-foot .conn .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse-dot 2s infinite;
}

.save-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.save-bar .status { color: var(--faint); font-size: 13px; }
.save-bar .status.ok { color: var(--ok); }

/* ================================================================
   Reveal on scroll
   ================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.rev > div:first-child { order: 0; }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(8, 10, 18, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .burger { display: flex; }
  .hero { padding: 130px 0 60px; }
  .cards { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* ================================================================
   Password gate
   ================================================================ */
.admin-gate {
  padding: 54px 26px 46px;
  text-align: center;
}
.gate-inner { max-width: 320px; margin: 0 auto; }
.gate-ico {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(108,140,255,0.18), rgba(168,85,247,0.18));
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent);
}
.gate-ico svg { width: 19px; height: 19px; }
.gate-inner h3 { margin: 0 0 6px; font-size: 20px; }
.gate-inner p { margin: 0 0 22px; color: var(--dim); font-size: 14px; }
.gate-inner input {
  width: 100%;
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.gate-inner .btn { width: 100%; }
.gate-err { display: block; margin-top: 12px; color: #f87171; font-size: 13px; min-height: 18px; }

/* ================================================================
   Changelogs (public)
   ================================================================ */
.changelog-list { display: flex; flex-direction: column; gap: 16px; }
.changelog-item {
  position: relative;
  padding: 22px 24px 22px 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.changelog-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad);
}
.changelog-item.is-new { border-color: rgba(108,140,255,0.4); box-shadow: 0 0 0 1px rgba(108,140,255,0.12), var(--shadow); }
.cl-when { font-size: 12.5px; color: var(--faint); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.cl-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-body { margin: 8px 0 0; color: var(--dim); line-height: 1.65; font-size: 14.5px; white-space: pre-wrap; }
.new-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #04110c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ================================================================
   Sidebar rail — everything lives here
   ================================================================ */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 60;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  background: rgba(10, 12, 20, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid var(--line);
}
.rail-spacer { flex: 1; }
.rail-sep { width: 30px; height: 1px; background: var(--line); margin: 4px 0; }
.rail-btn {
  width: 42px; height: 42px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.rail-btn svg { width: 18px; height: 18px; }
.rail-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: var(--text);
  transform: translateY(-2px);
}
.rail-logo {
  background: var(--grad);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 8px 22px -8px rgba(108, 140, 255, 0.7);
  text-decoration: none;
}
.rail-logo:hover { color: #fff; background: var(--grad); border-color: transparent; }
.rail-online {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  padding: 8px 0 2px;
}
.rail-online .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulse 2.2s ease-in-out infinite;
}

.sug-modal {
  position: fixed; inset: 0;
  z-index: 70;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
.sug-modal.open { opacity: 1; pointer-events: auto; }
.sug-panel {
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(14, 17, 28, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s var(--ease-out);
  overflow: hidden;
}
.sug-modal.open .sug-panel { transform: none; }
.sug-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.sug-head .title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.sug-head .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.sug-head .ico svg { width: 16px; height: 16px; }
.sug-close, .btn-icon.danger {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 19px;
  line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sug-close:hover, .btn-icon.danger:hover { background: rgba(248, 113, 113, 0.12); color: #f87171; border-color: rgba(248,113,113,0.35); }
#sugForm { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.sug-actions { display: flex; align-items: center; gap: 12px; }

/* ================================================================
   Admin list rows (changelogs + suggestions)
   ================================================================ */
.admin-list-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 10px;
}
.admin-list-row.unread { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.05); }
.admin-list-row .main { flex: 1; min-width: 0; }
.admin-list-row .main strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.admin-list-row .main .meta { display: block; font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.admin-list-row .main p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.sug-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.sug-top .meta { margin-bottom: 0; }
.empty-state { padding: 22px; text-align: center; color: var(--faint); font-size: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.tab-badge {
  display: inline-block;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #04110c;
  font-size: 11px; font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.admin-tab.has-unread .tab-badge { box-shadow: 0 0 0 3px rgba(52,211,153,0.18); }

/* ================================================================
   Confetti (easter egg)
   ================================================================ */
.confetti {
  position: fixed;
  top: -12px;
  z-index: 200;
  width: 10px; height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

@media (max-width: 760px) {
  body { padding-left: 58px; }
  .nav { left: 58px; }
  .rail { width: 58px; }
  .rail-btn { width: 38px; height: 38px; }
  .rail-btn svg { width: 17px; height: 17px; }
  .rail-online { font-size: 11px; }
  .admin-gate { padding: 40px 18px; }
}

/* ================================================================
   Chat unread badge on the rail
   ================================================================ */
.rail-btn { position: relative; }
.rail-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  font-size: 10px; font-weight: 800;
  line-height: 17px; text-align: center;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.rail-badge.show { opacity: 1; transform: scale(1); }

/* ================================================================
   Chat panel
   ================================================================ */
.chat-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 372px;
  max-width: 92vw;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: rgba(9, 11, 19, 0.92);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-left: 1px solid var(--line-2);
  box-shadow: -30px 0 80px -30px rgba(0, 0, 0, 0.9);
  transform: translateX(105%);
  transition: transform 0.34s var(--ease-out);
}
.chat-panel.open { transform: translateX(0); }
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.chat-head .title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.chat-head .ico { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.chat-head .ico svg { width: 15px; height: 15px; }
.chat-user {
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
}
.chat-user strong { color: var(--text); }
.chat-user button {
  float: right; background: none; border: none; color: var(--accent);
  font-size: 12.5px; cursor: pointer; font-weight: 600;
}
.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg { max-width: 86%; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.cm-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.chat-msg.mine .cm-head { justify-content: flex-end; }
.cm-name { font-weight: 700; font-size: 12.5px; }
.cm-time { font-size: 10.5px; color: var(--faint); }
.cm-body {
  display: inline-block;
  padding: 9px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  text-align: left;
}
.chat-msg.mine .cm-body { background: linear-gradient(135deg, rgba(108,140,255,0.22), rgba(168,85,247,0.22)); border-color: rgba(108,140,255,0.3); }
.chat-form {
  display: flex; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.chat-form input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.chat-form input:focus { border-color: var(--accent); }
.chat-send {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  border: none;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}
.chat-send:hover { transform: translateY(-2px); filter: brightness(1.1); }
.chat-send svg { width: 18px; height: 18px; }

/* ================================================================
   Chat name prompt
   ================================================================ */
.name-modal {
  position: fixed; inset: 0;
  z-index: 340;
  background: rgba(4, 6, 12, 0.75);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.name-modal.open { opacity: 1; pointer-events: auto; }
.name-panel {
  width: 100%; max-width: 360px;
  padding: 30px 26px 28px;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: rgba(14, 17, 28, 0.97);
  text-align: center;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}
.name-panel h3 { margin: 0 0 6px; font-size: 19px; }
.name-panel p { margin: 0 0 20px; color: var(--dim); font-size: 14px; }
.name-panel input {
  width: 100%;
  text-align: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.name-panel input:focus { border-color: var(--accent); }
.name-panel .btn { width: 100%; }

/* ================================================================
   Accent color popover
   ================================================================ */
.color-pop {
  position: fixed;
  left: 82px; bottom: 20px;
  z-index: 65;
  width: 210px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(12, 14, 24, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 0.2s, transform 0.2s;
}
.color-pop.open { opacity: 1; pointer-events: auto; transform: translateX(0); }
.cp-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); margin-bottom: 10px; }
.cp-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cp-swatch {
  width: 100%; aspect-ratio: 1;
  border-radius: 9px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.cp-swatch:hover { transform: scale(1.1); border-color: rgba(255,255,255,0.4); }
.cp-reset {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}
.cp-reset:hover { background: var(--surface-2); color: var(--text); }

/* ================================================================
   Stats tab
   ================================================================ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(108,140,255,0.08), rgba(168,85,247,0.05));
}
.sc-val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.sc-lab { font-size: 12px; color: var(--faint); margin-top: 2px; }
.stat-bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 140px;
  padding: 12px 4px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.stat-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.sb-fill {
  width: 100%;
  min-height: 3px;
  border-radius: 5px 5px 0 0;
  background: var(--grad);
  transition: height 0.5s var(--ease-out);
}
.sb-lab { position: absolute; bottom: -20px; font-size: 10px; color: var(--faint); white-space: nowrap; }
.stat-line {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.stat-line span { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-line strong { color: var(--text); }
.stat-note { margin-top: 20px; font-size: 12px; color: var(--faint); }

/* ================================================================
   Abuse tab
   ================================================================ */
.abuse-note {
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
  color: var(--warn);
  font-size: 13px;
  margin-bottom: 18px;
}
.abuse-custom { display: grid; grid-template-columns: 1fr 180px; gap: 14px; margin-bottom: 18px; }
.abuse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.abuse-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.abuse-btn:hover { background: var(--surface-3); border-color: var(--line-2); transform: translateY(-2px); }
.abuse-btn:active { transform: scale(0.97); }
.ab-ico { font-size: 17px; line-height: 1; }

/* ================================================================
   FX — global effects the admin can trigger
   ================================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fx-fall { 0% { transform: translateY(-12vh) rotate(0deg); opacity: 1; } 100% { transform: translateY(112vh) rotate(360deg); opacity: 0.6; } }
@keyframes fx-spark-fly { 0% { transform: translate(0,0) scale(1.1); opacity: 1; } 100% { transform: translate(var(--dx, 0), var(--dy, 0)) scale(0); opacity: 0; } }

.fx-emoji, .fx-snow {
  position: fixed;
  top: -8vh;
  z-index: 195;
  pointer-events: none;
  animation: fx-fall linear forwards;
  will-change: transform;
}
.fx-spark {
  position: fixed;
  z-index: 198;
  width: 7px; height: 7px;
  border-radius: 50%;
  pointer-events: none;
  animation: fx-spark-fly cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
.fx-matrix { overflow: hidden; }
.fx-vortex { overflow: hidden; }

body.fx-shake { animation: fx-shake 0.28s linear infinite; }
@keyframes fx-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 3px) rotate(-0.35deg); }
  50% { transform: translate(3px, -4px) rotate(0.35deg); }
  75% { transform: translate(-3px, -2px) rotate(-0.2deg); }
}

body.fx-flip main, body.fx-flip .nav, body.fx-flip .footer { transform: rotate(180deg); transition: transform 0.5s var(--ease-out); }

body.fx-invert { animation: fx-invert 0.4s ease forwards; }
@keyframes fx-invert { from { filter: none; } to { filter: invert(1) hue-rotate(180deg); } }

body.fx-zoom main { animation: fx-zoom 1.1s ease-in-out infinite; }
@keyframes fx-zoom { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }

body.fx-glitch main, body.fx-glitch .nav {
  animation: fx-glitch 0.42s steps(2) infinite;
}
@keyframes fx-glitch {
  0% { transform: translate(0); filter: none; }
  20% { transform: translate(-3px, 1px); filter: hue-rotate(90deg); }
  40% { transform: translate(2px, -2px); filter: hue-rotate(-60deg); }
  60% { transform: translate(-1px, 3px); filter: saturate(3); }
  80% { transform: translate(3px, -1px); filter: hue-rotate(180deg); }
  100% { transform: translate(0); filter: none; }
}

body.fx-disco { animation: fx-disco 1.4s linear infinite; }
@keyframes fx-disco { to { filter: hue-rotate(360deg); } }

body.fx-rainbow main h1, body.fx-rainbow main h2, body.fx-rainbow .card h3, body.fx-rainbow .brand span {
  animation: fx-rainbow 1.6s linear infinite;
}
@keyframes fx-rainbow { to { filter: hue-rotate(360deg); } }

body.fx-bigcursor, body.fx-bigcursor * { cursor: none !important; }
body.fx-bigcursor::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,140,255,0.55), transparent 70%);
  border: 2px solid var(--accent);
  z-index: 999;
  pointer-events: none;
  left: var(--cx, 50vw);
  top: var(--cy, 50vh);
}

/* big announcement / rickroll modal */
.fx-modal {
  position: fixed; inset: 0;
  z-index: 400;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s;
}
.fx-modal.open { opacity: 1; }
.fx-modal-panel {
  max-width: 440px;
  padding: 34px 28px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: rgba(16, 19, 30, 0.98);
  text-align: center;
  box-shadow: 0 50px 110px -30px rgba(0, 0, 0, 0.95);
  transform: scale(0.92);
  transition: transform 0.3s var(--ease-out);
}
.fx-modal.open .fx-modal-panel { transform: scale(1); }
.fx-modal-ico { font-size: 46px; margin-bottom: 10px; }
.fx-modal-panel h2 { margin: 0 0 10px; font-size: 22px; }
.fx-modal-panel p { margin: 0 0 22px; color: var(--dim); line-height: 1.6; white-space: pre-wrap; }

@media (max-width: 600px) {
  .abuse-custom { grid-template-columns: 1fr; }
  .chat-panel { width: 100%; }
  .color-pop { left: 66px; }
}
