/* ------------------------------------------------------------------
   Alarak — global styles v2
   Sleek dark glassmorphism, red accent, more GFX and depth
------------------------------------------------------------------ */

:root {
  --bg-0:    #000000;
  --bg-1:    #08080a;
  --bg-2:    #0e0e11;
  --bg-3:    #16161b;
  --panel:   rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --panel-3: rgba(255, 255, 255, 0.09);
  --line:    rgba(255, 255, 255, 0.08);
  --line-2:  rgba(255, 255, 255, 0.14);

  --red:      #ff2a2a;
  --red-2:    #ff4444;
  --red-hot:  #ff5b5b;
  --red-dark: #8b0000;
  --red-deep: #6b0000;
  --red-glow: rgba(255, 42, 42, 0.4);
  --red-glow-soft: rgba(255, 42, 42, 0.15);

  --fg:      #f5f5f7;
  --fg-2:    #d5d5da;
  --muted:   #8a8a92;
  --muted-2: #5c5c66;

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-glass: 0 10px 40px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-red:   0 10px 40px rgba(255, 42, 42, 0.15), 0 0 0 1px rgba(255, 42, 42, 0.2);

  /* Liquid-glass tokens */
  --glass-spec:      rgba(255, 255, 255, 0.55);
  --glass-spec-soft: rgba(255, 255, 255, 0.16);
  --glass-tint:      rgba(255, 42, 42, 0.08);
  --mx: 50%;
  --my: 0%;

  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-0); color-scheme: dark; }
body {
  font-family: var(--font-display);
  background: var(--bg-0);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ------------------------------------------------------------------
   Background — richer aurora with animated orbs, mesh grid, noise
------------------------------------------------------------------ */
#hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255,42,42,0.28), transparent 55%),
    radial-gradient(ellipse 70% 55% at 90% 100%, rgba(180,0,0,0.22), transparent 55%),
    radial-gradient(ellipse 65% 50% at 5% 90%, rgba(255,60,60,0.14), transparent 55%),
    #000;
}
/* Mesh grid overlay */
#hero-bg::before {
  content: '';
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 75%);
  -webkit-mask: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 75%);
  opacity: 0.7;
}
/* Drifting blobs */
#hero-bg::after {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,42,42,0.22) 0%, transparent 22%),
    radial-gradient(circle at 70% 60%, rgba(255,90,90,0.14) 0%, transparent 22%),
    radial-gradient(circle at 20% 80%, rgba(255,42,42,0.10) 0%, transparent 22%);
  filter: blur(50px);
  animation: drift 22s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%      { transform: translate(4%, -3%) rotate(3deg); }
  66%      { transform: translate(-3%, 4%) rotate(-3deg); }
}

/* Fine noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
/* Scanline / vignette pass on top */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 60%, rgba(0,0,0,0.55) 100%),
    linear-gradient(rgba(0,0,0,0) 50%, rgba(255,255,255,0.008) 50%);
  background-size: 100% 100%, 100% 3px;
}

#root { position: relative; z-index: 2; min-height: 100vh; }

/* ------------------------------------------------------------------
   Typography
------------------------------------------------------------------ */
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.02; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.35rem; }
p  { margin: 0; line-height: 1.65; color: var(--fg-2); text-wrap: pretty; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------------
   Layout
------------------------------------------------------------------ */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 620px) { .container { padding: 0 14px; } }
.section { padding: 80px 0; position: relative; }
.section-tight { padding: 40px 0; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
/* On mobile: keep 2 columns so 4 cards fit perfectly as a 2x2 grid. */
@media (max-width: 620px) {
  .grid { gap: 12px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.stack { display: flex; flex-direction: column; }
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* ------------------------------------------------------------------
   Glass primitives — richer, with light streak + inner glow
------------------------------------------------------------------ */
.glass {
  background:
    radial-gradient(120% 140% at var(--mx) var(--my), rgba(255,255,255,0.09), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-glass);
  position: relative;
  isolation: isolate;
  transition: background 0.5s var(--ease-out);
}
.glass::before {
  /* Diagonal light streak — the "liquid" refraction band */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.09) 48%, rgba(255,255,255,0.02) 52%, transparent 62%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: overlay;
}
.glass::after {
  /* Top highlight rim — glass edge catching light */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(165deg, var(--glass-spec-soft), rgba(255,255,255,0.03) 22%, transparent 45%, transparent 65%, rgba(255,42,42,0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.glass-hover {
  transition: transform 0.55s var(--ease-spring), border-color 0.4s var(--ease-out), box-shadow 0.5s var(--ease-out);
  will-change: transform;
}
.glass-hover:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: rgba(255, 42, 42, 0.45);
  box-shadow:
    0 30px 70px rgba(255,42,42,0.22),
    0 0 0 1px rgba(255,42,42,0.32),
    inset 0 0 50px rgba(255,42,42,0.06),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.glass-hover:active { transform: translateY(-4px) scale(0.995); }

/* Corner glint on hoverable glass */
.glass-hover::before { transition: opacity 0.5s var(--ease-out); }
.glass-hover:hover::before { opacity: 1; }

/* Cursor-tracked liquid sheen — position set via --mx/--my (see ui-fx.js) */
.glass-hover {
  --mx: 50%;
  --my: 0%;
}
.glass-hover::after {
  transition: opacity 0.5s var(--ease-out), background 0.15s linear;
}

/* Sweeping shine pass on hover — pure CSS, no JS required */
.glass-shine { position: relative; overflow: hidden; }
.glass-shine > .shine-sweep {
  content: '';
  position: absolute;
  top: -60%; left: -30%;
  width: 40%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16) 45%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.16) 55%, transparent);
  transform: translateX(-120%) rotate(8deg);
  transition: transform 0.9s var(--ease-out);
  pointer-events: none;
  z-index: 3;
}
.glass-shine:hover > .shine-sweep { transform: translateX(280%) rotate(8deg); }

/* ------------------------------------------------------------------
   Buttons — more depth, glossy primary
------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.94rem;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out), box-shadow 0.35s var(--ease-out);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  isolation: isolate;
}
.btn::after {
  /* Liquid sheen sweep */
  content: '';
  position: absolute; top: -50%; left: -20%;
  width: 30%; height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-220%) rotate(10deg);
  transition: transform 0.7s var(--ease-out);
  pointer-events: none;
  z-index: 1;
}
.btn:hover::after { transform: translateX(420%) rotate(10deg); }
.btn:hover { transform: translateY(-2px); border-color: var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04)); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
  background: linear-gradient(180deg, #ff3a3a 0%, #d81f1f 50%, #a01111 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 10px 30px rgba(255,42,42,0.45),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.2);
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent 50%);
  pointer-events: none;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #ff5555, #dd2020 50%, #b81515 100%);
  box-shadow: 0 18px 44px rgba(255,42,42,0.65), inset 0 1px 0 rgba(255,255,255,0.4);
  transform: translateY(-3px);
}
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------
   Inputs
------------------------------------------------------------------ */
.input, .textarea, .select {
  width: 100%;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--fg);
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255,42,42,0.15);
  background: rgba(0,0,0,0.6);
}
.textarea { resize: vertical; min-height: 96px; font-family: var(--font-mono); font-size: 0.88rem; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
label.field { display: block; }
label.field > .lbl { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; font-weight: 600; }

/* ------------------------------------------------------------------
   Badges
------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--fg-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-red {
  background: linear-gradient(180deg, rgba(255,42,42,0.35), rgba(255,42,42,0.12));
  border-color: rgba(255,42,42,0.5);
  color: #ffcccc;
  box-shadow: 0 0 20px rgba(255,42,42,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  animation: pulse-red 2.4s ease-in-out infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 20px rgba(255,42,42,0.35), inset 0 1px 0 rgba(255,255,255,0.15); }
  50%      { box-shadow: 0 0 32px rgba(255,42,42,0.6), inset 0 1px 0 rgba(255,255,255,0.15); }
}
.badge-green { background: rgba(46, 204, 113, 0.14); border-color: rgba(46, 204, 113, 0.35); color: #7cf0a8; }
.badge-blue  { background: rgba(59, 130, 246, 0.14); border-color: rgba(59, 130, 246, 0.35); color: #92b3ff; }

/* ------------------------------------------------------------------
   Thumb
------------------------------------------------------------------ */
.thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, #1a0808, #0a0a0d);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.05);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease-out), filter 0.5s var(--ease-out); filter: saturate(1) brightness(1); }
.glass-hover:hover .thumb img { transform: scale(1.1) rotate(0.3deg); filter: saturate(1.15) brightness(1.06); }
.thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.55));
  pointer-events: none;
  transition: background 0.4s var(--ease-out);
}
.thumb::before {
  /* liquid rim light along the top edge of every thumbnail */
  content: '';
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), inset 0 0 0 1px rgba(255,255,255,0.04);
  pointer-events: none;
}
.thumb-placeholder {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------
   Section header
------------------------------------------------------------------ */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; gap: 24px; flex-wrap: wrap; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--red);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

/* Section divider — glowing horizontal line */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,42,42,0.5), transparent);
  margin: 40px 0;
  position: relative;
}
.divider::before {
  content: '';
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 24px var(--red);
}

/* ------------------------------------------------------------------
   Reveal animations
------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------------
   Navbar
------------------------------------------------------------------ */
.nav {
  position: sticky; top: 16px; z-index: 50;
  margin: 16px auto 0; max-width: 1280px;
  padding: 0 24px;
  transition: top 0.4s var(--ease-out);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 20px;
  background: rgba(10,10,12,0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out), padding 0.3s var(--ease-out);
}
.nav-inner.scrolled {
  background: rgba(6,6,8,0.82);
  border-color: rgba(255,42,42,0.22);
  box-shadow: 0 16px 50px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,42,42,0.08), inset 0 1px 0 rgba(255,255,255,0.1);
  padding-top: 8px; padding-bottom: 8px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 4px 12px rgba(255,42,42,0.4); }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--fg-2);
  font-weight: 500;
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-spring);
  cursor: pointer;
}
.nav-link:hover { color: var(--fg); background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.nav-link.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255,42,42,0.35), rgba(255,42,42,0.15));
  box-shadow: inset 0 0 0 1px rgba(255,42,42,0.4), 0 4px 16px rgba(255,42,42,0.25);
}

/* Mobile nav toggle — base state hides it; media query below reveals it */
.nav-mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--fg);
  flex-shrink: 0;
}
.nav-mobile-toggle:hover { background: rgba(255,255,255,0.05); border-color: var(--line-2); }
.nav-mobile-toggle:active { transform: scale(0.94); }
.nav-mobile-drawer {
  margin-top: 10px;
  background: rgba(10,10,12,0.95);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: slideUp 0.2s var(--ease);
}
.nav-mobile-drawer .nav-link { display: block; padding: 12px 16px; font-size: 0.95rem; }

/* Mobile: swap desktop link row for hamburger toggle. Placed AFTER the base
   rule above so it wins the cascade (previous ordering was the bug that
   made the hamburger invisible on mobile). */
@media (max-width: 820px) {
  .nav { top: 10px; padding: 0 12px; margin-top: 10px; }
  .nav-inner { padding: 8px 8px 8px 14px; }
  .nav-links { display: none !important; }
  .nav-mobile-toggle {
    display: inline-flex !important;
    background: linear-gradient(180deg, rgba(255,42,42,0.22), rgba(255,42,42,0.08)) !important;
    border-color: rgba(255,42,42,0.45) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255,42,42,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
  }
  .nav-brand span { font-size: 0.95rem; }
  .nav-brand img { width: 28px; height: 28px; }
}

/* ------------------------------------------------------------------
   Hero — big, cinematic
------------------------------------------------------------------ */
.hero {
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  margin-bottom: 28px;
  transition: all 0.3s var(--ease);
}
.hero-eyebrow:hover { border-color: rgba(255,42,42,0.35); transform: translateY(-2px); }
.hero-eyebrow img {
  width: 32px; height: 32px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255,42,42,0.4);
}
.hero-eyebrow .pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #6ee79e;
  box-shadow: 0 0 12px #6ee79e;
  animation: pulse-dot 1.8s ease-in-out infinite;
  margin-left: 4px;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
.hero-eyebrow-text {
  font-size: 0.82rem;
  color: var(--fg-2);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
.hero h1 { color: #ffffff; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: linear-gradient(180deg, #ffffff 30%, #9a9aa4 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #ffffff;
    filter: drop-shadow(0 4px 20px rgba(255,255,255,0.1));
  }
  .hero .accent {
    background: linear-gradient(180deg, #ff6666 0%, #ff2020 50%, #a01010 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 8px 30px rgba(255,42,42,0.6));
  }
}
.hero .accent { color: #ff5b5b; }
.hero-sub { color: var(--muted); max-width: 640px; margin: 24px auto 0; font-size: 1.12rem; }
.hero-cta { margin-top: 40px; display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Hero mascot glow ring */
.hero-mascot-ring {
  position: relative;
  width: 128px; height: 128px;
  margin: 0 auto 24px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 0deg, #ff2a2a, #ff5555, #8b0000, #ff2a2a);
  animation: spin 6s linear infinite;
  box-shadow: 0 20px 60px rgba(255,42,42,0.5), 0 0 0 1px rgba(255,42,42,0.3);
}
.hero-mascot-ring::after {
  content: '';
  position: absolute; inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,42,42,0.4), transparent 65%);
  filter: blur(20px);
  z-index: -1;
}
.hero-mascot-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: block;
  background: #000;
  border: 2px solid rgba(0,0,0,0.9);
  animation: spin 6s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero stat pills row */
.hero-stats {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 32px; flex-wrap: wrap;
}
.hero-stat {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg-2);
}
.hero-stat .hero-stat-value { color: var(--fg); font-weight: 600; }
.hero-stat .hero-stat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }

/* Marquee ticker under hero */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin: 60px 0 0;
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 40px;
  padding-left: 40px;
  animation: scrollx 40s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.marquee-track span::before {
  content: '★';
  color: var(--red);
  margin-right: 12px;
}
@keyframes scrollx {
  to { transform: translateX(-50%); }
}

/* ------------------------------------------------------------------
   Quick nav tiles — richer w/ hover glow
------------------------------------------------------------------ */
.quick-nav {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 56px;
}
@media (max-width: 720px) { .quick-nav { grid-template-columns: repeat(2, 1fr); } }
.quick-tile {
  padding: 24px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  min-height: 140px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.quick-tile::before {
  /* corner glow */
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,42,42,0.3), transparent 70%);
  opacity: 0; transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.quick-tile:hover::before { opacity: 1; }
.quick-tile .qt-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255,42,42,0.3), rgba(255,42,42,0.08));
  border: 1px solid rgba(255,42,42,0.35);
  color: #ffb3b3;
  box-shadow: 0 6px 20px rgba(255,42,42,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}
.quick-tile h3 { font-size: 1.2rem; }
.quick-tile p { font-size: 0.88rem; color: var(--muted); }
.quick-tile .qt-arrow {
  margin-left: auto;
  opacity: 0; transform: translateX(-6px);
  transition: all 0.3s var(--ease);
  color: var(--red);
}
.quick-tile:hover .qt-arrow { opacity: 1; transform: translateX(0); }

/* ------------------------------------------------------------------
   Card
------------------------------------------------------------------ */
.card { padding: 14px; display: flex; flex-direction: column; gap: 14px; height: 100%; text-decoration: none; color: inherit; }
.card-body { padding: 4px 6px 8px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 1.08rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; transition: color 0.3s var(--ease-out), text-shadow 0.3s var(--ease-out); }
.glass-hover:hover .card-title { color: #fff; text-shadow: 0 0 18px rgba(255,80,80,0.35); }
.card-game { font-size: 0.82rem; color: var(--muted); font-family: var(--font-mono); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.card-views { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--fg-2); transition: color 0.3s var(--ease-out); }
.glass-hover:hover .card-views { color: var(--fg); }
.card-meta .btn.btn-sm { transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-out), background 0.25s var(--ease-out); }
.glass-hover:hover .card-meta .btn-primary { transform: translateX(2px); box-shadow: 0 14px 34px rgba(255,42,42,0.55), inset 0 1px 0 rgba(255,255,255,0.4); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Compact card layout for mobile so 2 fit per row perfectly --- */
@media (max-width: 620px) {
  .card { padding: 8px; gap: 8px; border-radius: 14px; }
  .card-body { padding: 2px 2px 4px; gap: 6px; }
  .card-title {
    font-size: 0.88rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-game { font-size: 0.7rem; }
  .card-views { font-size: 0.72rem; gap: 4px; }
  .card-meta { padding-top: 2px; gap: 4px; flex-wrap: wrap; }
  .card .badge { font-size: 0.6rem; padding: 3px 7px; }
  /* Only show first badge on mobile to keep cards clean */
  .card .card-body .row.gap-8 .badge:nth-child(n+3) { display: none; }
  /* Hide the button text on mobile — keep just the icon so the card breathes */
  .card-meta .btn.btn-sm {
    padding: 6px 8px;
    font-size: 0.7rem;
  }
  .card-meta .btn.btn-sm { gap: 4px; }
  .thumb { aspect-ratio: 16 / 11; border-radius: 10px; }
}
@media (max-width: 380px) {
  .card-meta { flex-direction: column; align-items: stretch; }
  .card-meta .btn.btn-sm { justify-content: center; }
  .card-title { font-size: 0.82rem; }
}

/* Video card */
.video-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; height: 100%; }
.video-card .thumb { border-radius: var(--r-lg) var(--r-lg) 0 0; aspect-ratio: 16/9; }
.video-card .video-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.video-card .video-body .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}
.video-card .video-body .row.between { margin-top: auto; padding-top: 14px; }
.video-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.35s var(--ease);
  z-index: 2;
}
.video-play-overlay > div {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,42,42,0.85);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 10px 40px rgba(255,42,42,0.6), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: scale(0.9);
  transition: transform 0.35s var(--ease);
}
.glass-hover:hover .video-play-overlay > div { transform: scale(1); }

/* ------------------------------------------------------------------
   Youtube channel card
------------------------------------------------------------------ */
.yt-card {
  padding: 28px;
  display: flex; gap: 28px; align-items: stretch;
  overflow: hidden;
}
@media (max-width: 720px) { .yt-card { flex-direction: column; text-align: center; } }
.yt-latest {
  flex: 1.2;
  aspect-ratio: 16/9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.yt-latest iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.yt-info h3 { font-size: 1.6rem; margin-bottom: 6px; }
.yt-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px; border-radius: 999px;
  background: rgba(255,0,0,0.14); color: #ff9c9c;
  border: 1px solid rgba(255,0,0,0.3);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 12px;
  align-self: flex-start;
}
@media (max-width: 720px) { .yt-badge { align-self: center; } }
.yt-badge .live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ff2a2a;
  box-shadow: 0 0 10px #ff2a2a;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* ------------------------------------------------------------------
   Search
------------------------------------------------------------------ */
.search-wrap { position: relative; max-width: 640px; }
.search-wrap .input {
  padding-left: 46px; height: 56px; border-radius: 999px; font-size: 1rem;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.search-wrap .search-ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.chip {
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-size: 0.8rem; font-family: var(--font-mono);
  color: var(--fg-2);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  backdrop-filter: blur(10px);
}
.chip:hover { border-color: var(--line-2); }
.chip.active {
  border-color: var(--red); background: rgba(255,42,42,0.15); color: #ffbcbc;
  box-shadow: 0 4px 12px rgba(255,42,42,0.2);
}

/* ------------------------------------------------------------------
   Detail page
------------------------------------------------------------------ */
.detail { padding: 40px 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: flex-start; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.detail-hero-thumb {
  aspect-ratio: 16/9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,42,42,0.15);
  position: relative;
}
.detail-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4));
  pointer-events: none;
}
.detail-side { padding: 28px; align-self: flex-start; position: sticky; top: 110px; }
@media (max-width: 960px) { .detail-side { position: static; } }
.detail-title { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; }
.detail-features { padding: 26px; }
.detail-features ul { margin: 0; padding-left: 0; list-style: none; }
.detail-features li {
  color: var(--fg-2); padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.detail-features li:last-child { border-bottom: 0; }
.detail-features li::before {
  content: '';
  position: absolute; left: 4px; top: 14px;
  width: 12px; height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 0 12px rgba(255,42,42,0.5);
}

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.footer {
  margin-top: 80px;
  padding: 60px 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  filter: blur(1px);
}

/* ------------------------------------------------------------------
   Admin
------------------------------------------------------------------ */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-side {
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(140% 60% at 0% 0%, rgba(255,42,42,0.08), transparent 60%),
    rgba(0,0,0,0.55);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  min-height: 100vh;
  position: sticky; top: 0;
  display: flex; flex-direction: column;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
}
/* Mobile-only chrome — kept out of the layout on desktop so it can't
   steal a grid track from the shell (which broke the PC layout). */
.admin-topbar { display: none; }
.admin-scrim  { display: none; }
.admin-menu-btn { display: none; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed;
    top: 0; left: 0;
    height: 100dvh;
    width: 280px;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.28s var(--ease);
    border-right: 1px solid var(--line);
    background: rgba(8,8,10,0.96);
  }
  .admin-side.open { transform: translateX(0); box-shadow: 0 20px 60px rgba(0,0,0,0.7); }
  .admin-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    position: sticky; top: 0; z-index: 50;
    background: rgba(8,8,10,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
  }
  .admin-topbar .admin-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
  .admin-topbar .admin-brand img { width: 30px; height: 30px; border-radius: 8px; }
  .admin-menu-btn {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(255,42,42,0.22), rgba(255,42,42,0.08));
    border: 1px solid rgba(255,42,42,0.4);
    border-radius: 10px; color: #fff; cursor: pointer;
    box-shadow: 0 4px 12px rgba(255,42,42,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
    flex-shrink: 0;
  }
  .admin-menu-btn:active { transform: scale(0.94); }
  .admin-scrim {
    display: block;
    position: fixed; inset: 0; z-index: 80;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .admin-scrim.open { opacity: 1; pointer-events: auto; }
  .admin-side [data-mobile-close] { display: inline-flex !important; }
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  cursor: pointer; transition: color 0.25s var(--ease-out), background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-spring);
  position: relative;
}
.admin-nav a svg { transition: filter 0.25s var(--ease-out), transform 0.25s var(--ease-spring); }
.admin-nav a:hover { color: var(--fg); background: rgba(255,255,255,0.04); transform: translateX(2px); }
.admin-nav a.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255,42,42,0.2), rgba(255,42,42,0.07));
  box-shadow: inset 0 0 0 1px rgba(255,42,42,0.4), 0 4px 18px rgba(255,42,42,0.18);
}
.admin-nav a.active svg { filter: drop-shadow(0 0 6px rgba(255,60,60,0.7)); color: var(--red-hot); }
.admin-nav a.active::before {
  content: '';
  position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 18px; border-radius: 4px;
  background: linear-gradient(180deg, var(--red-hot), var(--red-dark));
  box-shadow: 0 0 10px var(--red-glow);
}
.admin-main { padding: 40px; overflow-x: hidden; }
@media (max-width: 900px) { .admin-main { padding: 20px 16px 32px; } }
@media (max-width: 720px) { .admin-main { padding: 16px 14px 32px; } .admin-main h1 { font-size: 1.5rem !important; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid { gap: 10px; } .stat { padding: 16px; } .stat .stat-value { font-size: 1.5rem; } .stat .stat-label { font-size: 0.66rem; } }

/* Admin page header actions — full-width buttons on mobile */
@media (max-width: 620px) {
  .admin-page-head .admin-head-actions { width: 100%; }
  .admin-page-head .admin-head-actions .btn { flex: 1; text-align: center; justify-content: center; }
}

/* ------------------------------------------------------------------
   Admin Dashboard — Recent lists (redesigned)
------------------------------------------------------------------ */
.admin-recent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
@media (max-width: 1080px) { .admin-recent-grid { grid-template-columns: 1fr; } }

.recent-card { padding: 22px; overflow: hidden; }
@media (max-width: 620px) { .recent-card { padding: 16px; } }

.recent-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.recent-list { display: flex; flex-direction: column; gap: 6px; }

.recent-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  transition: background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.recent-item:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border-color: rgba(255,255,255,0.06);
  transform: translateX(2px);
}

.recent-thumb-wrap { position: relative; flex-shrink: 0; }
.recent-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a0808, #0a0a0d);
  border: 1px solid rgba(255,255,255,0.06);
  display: block;
}
.recent-thumb-fallback {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2);
}
.recent-pop {
  position: absolute;
  top: -6px; right: -6px;
  font-size: 12px;
  background: linear-gradient(180deg, rgba(255,42,42,0.9), rgba(180,20,20,0.9));
  border-radius: 999px;
  padding: 2px 6px;
  box-shadow: 0 4px 12px rgba(255,42,42,0.4);
  line-height: 1;
}

.recent-body { min-width: 0; }
.recent-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.recent-sub {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.recent-game { font-family: var(--font-mono); }
.recent-type {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-2);
}
.recent-platforms { font-family: var(--font-mono); }
.recent-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
}
.recent-dot-green {
  background: #6ee79e;
  box-shadow: 0 0 8px #6ee79e;
}
.recent-tier {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 600;
}
.recent-tier.free { background: rgba(46,204,113,0.14); color: #7cf0a8; border: 1px solid rgba(46,204,113,0.35); }
.recent-tier.paid { background: rgba(255,255,255,0.06); color: var(--fg-2); border: 1px solid var(--line); }

.recent-stats { text-align: right; flex-shrink: 0; }
.recent-views {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  display: inline-flex; align-items: center; gap: 6px;
}
.recent-views svg { color: var(--muted); }
.recent-views-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-top: 2px;
}

.recent-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--line-2);
}
.recent-empty-ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,42,42,0.1);
  border: 1px solid rgba(255,42,42,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}
.recent-empty > div:nth-child(2) { flex: 1; min-width: 0; }

/* Mobile refinements */
@media (max-width: 620px) {
  .recent-head { margin-bottom: 14px; padding-bottom: 12px; }
  .recent-head h3 { font-size: 1.15rem; }
  .recent-item { padding: 8px; gap: 10px; grid-template-columns: auto 1fr auto; }
  .recent-thumb { width: 46px; height: 46px; border-radius: 9px; }
  .recent-title { font-size: 0.9rem; }
  .recent-sub { font-size: 0.72rem; gap: 6px; }
  .recent-views { font-size: 0.85rem; }
  .recent-views-label { font-size: 0.6rem; }
}
@media (max-width: 400px) {
  .recent-sub .recent-type,
  .recent-sub .recent-platforms { display: none; }
}
.stat { padding: 22px; position: relative; overflow: hidden; }
.stat::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,42,42,0.16), transparent 65%);
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out);
}
.stat.glass-hover:hover::before { transform: scale(1.3); opacity: 1.3; }
.stat-icon-chip {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255,42,42,0.28), rgba(255,42,42,0.08));
  border: 1px solid rgba(255,42,42,0.32);
  color: #ffb3b3;
  box-shadow: 0 6px 18px rgba(255,42,42,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.stat .stat-label { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.stat .stat-value { font-family: var(--font-mono); font-size: 2.15rem; font-weight: 700; margin-top: 10px; letter-spacing: -0.02em; }
.stat .stat-delta { font-size: 0.8rem; color: #6ee79e; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.stat .stat-delta.down { color: #ff8b8b; }
.stat-spark { margin-top: 14px; height: 34px; }
.stat-spark svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* ------------------------------------------------------------------
   Analytics — dashboard charts (client-computed, no schema changes)
------------------------------------------------------------------ */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 1080px) { .analytics-grid { grid-template-columns: 1fr; } }

.chart-card { padding: 24px; }
.chart-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.chart-card-head h3 { font-size: 1.05rem; margin: 0; }
.chart-card-sub { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.chip-tab-row { display: flex; gap: 6px; }
.chip-tab {
  padding: 5px 12px; border-radius: 999px; font-size: 0.72rem;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em;
  border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,0.03);
}
.chip-tab.active { color: #fff; border-color: rgba(255,42,42,0.45); background: rgba(255,42,42,0.16); }

/* Area / line chart (SVG, hand-drawn — no chart lib dependency) */
.area-chart { width: 100%; height: 190px; overflow: visible; }
.area-chart .grid-line { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.area-chart .axis-label { fill: var(--muted-2); font-size: 10px; font-family: var(--font-mono); }
.area-chart .line-path { fill: none; stroke: var(--red-hot); stroke-width: 2.5; filter: drop-shadow(0 0 8px rgba(255,60,60,0.55)); }
.area-chart .area-fill { opacity: 0.9; }
.area-chart .dot { fill: #fff; stroke: var(--red-hot); stroke-width: 2; }

/* Horizontal bar list (top content) */
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.bar-row-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.86rem; color: var(--fg-2);
  min-width: 0;
}
.bar-row-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row-value { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg); flex-shrink: 0; }
.bar-track {
  grid-column: 1 / -1;
  height: 9px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-hot));
  box-shadow: 0 0 12px rgba(255,60,60,0.5);
  transition: width 1s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), transparent 60%);
}
.bar-rank {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-family: var(--font-mono); font-weight: 700;
  background: rgba(255,255,255,0.06); color: var(--muted);
  border: 1px solid var(--line);
}
.bar-rank.top { color: #fff; background: linear-gradient(180deg, rgba(255,42,42,0.4), rgba(255,42,42,0.15)); border-color: rgba(255,42,42,0.5); }

/* Donut chart */
.donut-card { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut-wrap { position: relative; width: 148px; height: 148px; flex-shrink: 0; }
.donut-wrap svg { transform: rotate(-90deg); filter: drop-shadow(0 4px 18px rgba(255,42,42,0.25)); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center .donut-total { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; }
.donut-center .donut-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 2px; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
.legend-value { font-family: var(--font-mono); color: var(--muted); margin-left: auto; font-size: 0.82rem; }

.analytics-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .analytics-secondary-grid { grid-template-columns: 1fr; } }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table .row-thumb { width: 56px; height: 40px; border-radius: 6px; object-fit: cover; background: #222; }

/* ------------------------------------------------------------------
   Modal
------------------------------------------------------------------ */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
  animation: fadeIn 0.25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: linear-gradient(180deg, rgba(20,20,24,0.98), rgba(12,12,16,0.98));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 30px;
  width: 100%; max-width: 640px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,42,42,0.1);
  animation: slideUp 0.35s var(--ease);
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ------------------------------------------------------------------
   Login
------------------------------------------------------------------ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 2; }
.login-card { padding: 44px 40px; width: 100%; max-width: 440px; position: relative; overflow: hidden; }
.login-card::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,42,42,0.25), transparent 65%);
  pointer-events: none;
}
.login-logo {
  width: 72px; height: 72px; border-radius: 18px;
  margin: 0 auto 20px; display: block;
  box-shadow: 0 14px 40px rgba(255,42,42,0.5), 0 0 0 1px rgba(255,42,42,0.3);
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------
   Empty state
------------------------------------------------------------------ */
.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  background: rgba(0,0,0,0.2);
}
.empty h3 { color: var(--fg-2); margin-bottom: 8px; }

/* ------------------------------------------------------------------
   Toast
------------------------------------------------------------------ */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 18px;
  background: rgba(20,20,24,0.95);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  min-width: 260px;
  animation: slideUp 0.3s var(--ease);
}
.toast.ok { border-color: rgba(46,204,113,0.4); }
.toast.err { border-color: rgba(255,42,42,0.4); }

/* ------------------------------------------------------------------
   Loader
------------------------------------------------------------------ */
.spinner {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--red);
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.page-fade { animation: pageFade 0.5s var(--ease); }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,42,42,0.5); }

.page { padding-top: 24px; padding-bottom: 60px; }

/* ------------------------------------------------------------------
   Subtle floating orbs behind sections
------------------------------------------------------------------ */
.orb {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,42,42,0.15), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, -30px); }
}
.orb-1 { top: 200px; left: -100px; }
.orb-2 { top: 800px; right: -80px; animation-delay: -6s; }
.orb-3 { top: 1400px; left: 30%; animation-delay: -3s; }

/* ------------------------------------------------------------------
   Final polish pass
------------------------------------------------------------------ */
::selection { background: rgba(255,42,42,0.35); color: #fff; }

.quick-tile { transition: transform 0.5s var(--ease-spring), border-color 0.4s var(--ease-out), box-shadow 0.5s var(--ease-out); }

.data-table tbody tr { transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out); }
.data-table tbody tr:hover { background: rgba(255,42,42,0.05); transform: translateX(2px); }

/* Login card gets the same liquid sheen as the rest of the app */
.login-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,0.06), transparent 60%);
}

/* Smooth everything by default so new state changes never feel abrupt */
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
