:root {
  --bg: #080d18;
  --panel: rgba(59, 130, 246, 0.08);
  --panel-2: rgba(59, 130, 246, 0.15);
  --line: rgba(59, 130, 246, 0.18);
  --line-2: rgba(59, 130, 246, 0.32);
  --text: #deeeff;
  --muted: #6a8ab0;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-3: #93c5fd;
  --fire: linear-gradient(120deg, #2563eb 0%, #1d4ed8 45%, #3b82f6 75%, #60a5fa 100%);
  --tg: #229ed9;
  --danger: #f43f5e;
  --radius: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Unbounded', 'Outfit', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 10px; border: 3px solid var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- background ---------- */
.aurora { position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(100px); opacity: 0.22; animation: drift 24s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--accent); top: -28vmax; left: -18vmax; }
.aurora span:nth-child(2) { background: var(--accent-2); bottom: -32vmax; right: -22vmax; animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--accent-3); top: 35%; left: 45%; width: 30vmax; height: 30vmax; opacity: 0.12; animation-delay: -16s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.15); }
  100% { transform: translate(-6vmax, 10vmax) scale(0.95); }
}
#embers { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55)); }

.wrap { max-width: 1280px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 300; background: var(--bg); display: grid; place-items: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.splash.out { opacity: 0; visibility: hidden; }
.splash .ring {
  width: 64px; height: 64px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, var(--accent) 50%, var(--accent-3) 100%);
  -webkit-mask: radial-gradient(circle, transparent 27px, #000 28px); mask: radial-gradient(circle, transparent 27px, #000 28px);
  animation: spin 1s linear infinite;
}
.splash .word { margin-top: 18px; font-family: var(--display); font-size: 12px; letter-spacing: .5em; text-align: center; padding-left: .5em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  background: rgba(8, 13, 24, 0.80);
}
.top::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-3), var(--accent), transparent);
  background-size: 200% 100%; animation: flow 6s linear infinite; opacity: .7;
}
@keyframes flow { to { background-position: -200% 0; } }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; gap: 12px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.34em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.logo i {
  width: 18px; height: 18px; border-radius: 6px; background: var(--fire); position: relative;
  box-shadow: 0 0 16px rgba(37, 99, 235, .7); transform: rotate(45deg);
}
.logo i::after { content: ''; position: absolute; inset: 5px; border-radius: 2px; background: var(--bg); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.status b { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.grad { background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- page transitions ---------- */
#app { animation: enter .6s var(--ease); }
#app.leaving { opacity: 0; transform: translateY(10px); transition: .2s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }

/* ---------- headings ---------- */
.head { padding-block: clamp(26px, 5vw, 46px) clamp(18px, 3vw, 28px); display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent-3); }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--fire); border-radius: 2px; }
.head h2 { margin: 10px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(24px, 4.4vw, 42px); letter-spacing: -0.02em; line-height: 1.05; }
.counts { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px; font-size: 13px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
.pill strong { font-family: var(--display); font-size: 14px; }
.pill svg { width: 15px; height: 15px; color: var(--accent-2); }

/* ---------- category cards ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(14px, 2vw, 24px); padding-bottom: 140px; perspective: 1200px; }
.cat {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); isolation: isolate; display: block;
  transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  box-shadow: 0 20px 40px -24px rgba(0,0,0,.9);
}
.cat .frame { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: #111c35; }
/* animated fire border */
.cat::before {
  content: ''; position: absolute; inset: -1.5px; border-radius: calc(var(--radius) + 1.5px); z-index: -1;
  background: conic-gradient(from var(--ang, 0deg), var(--accent), var(--accent-3), var(--accent-2), var(--accent), transparent 60%, var(--accent));
  opacity: .25; transition: opacity .5s; animation: rotate 5s linear infinite;
}
.cat:hover::before, .cat:focus-visible::before { opacity: 1; }
.cat:hover { box-shadow: 0 40px 70px -28px rgba(37, 99, 235, .7), 0 0 0 1px rgba(96, 165, 250, .15); }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rotate { to { --ang: 360deg; } }

.cat img, .cat .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), filter .6s; }
.cat:hover img { transform: scale(1.1); filter: saturate(1.15); }
.cat .ph { background: radial-gradient(circle at 30% 20%, #1e3a5f, #1a2f55 60%, #0f1d3a); display: grid; place-items: center; }
.cat .ph svg { width: 64px; color: var(--accent-2); opacity: .35; }
.cat .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 30%, transparent 45%, rgba(0,0,0,.96) 100%); }
.cat .shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,230,180,.18) 48%, transparent 56%);
  transform: translateX(-120%); transition: transform 1.1s var(--ease);
}
.cat:hover .shine { transform: translateX(120%); }
.cat .num {
  position: absolute; top: 16px; left: 18px; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .1em;
  padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.1);
}
.cat .info { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 2.4vw, 24px); transform: translateZ(40px); }
.cat h3 { margin: 0 0 12px; font-family: var(--display); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; text-shadow: 0 2px 20px rgba(0,0,0,.8); word-break: break-word; }
.cat .bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: 12px;
  background: rgba(255,255,255,.08); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.1);
}
.chip svg { width: 13px; height: 13px; }
.go {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #ffffff;
  background: var(--fire); box-shadow: 0 8px 22px -6px rgba(37, 99, 235, .7);
  transition: transform .5s var(--ease);
}
.cat:hover .go { transform: rotate(45deg) scale(1.08); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- category page ---------- */
.cat-hero {
  position: relative; border-radius: 28px; overflow: hidden; margin: 18px 0 22px; min-height: clamp(240px, 42vw, 420px);
  display: flex; align-items: end; border: 1px solid var(--line);
}
.cat-hero > img { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; animation: kenburns 20s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.08) translate(-2%, -1%); } }
.cat-hero .ph { position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, #1e3a5f, #1a2f55 60%, #0f1d3a); }
.cat-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 30%, rgba(0,0,0,.95)), linear-gradient(90deg, rgba(0,0,0,.6), transparent 60%); }
.cat-hero .in { position: relative; z-index: 1; padding: clamp(20px, 4vw, 44px); width: 100%; }
.cat-hero h1 { margin: 12px 0 16px; font-family: var(--display); font-size: clamp(32px, 7vw, 74px); line-height: .98; font-weight: 800; letter-spacing: -0.03em; word-break: break-word; }
.back {
  position: absolute; z-index: 2; top: clamp(14px, 2.5vw, 22px); left: clamp(14px, 2.5vw, 22px);
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px 9px 11px; border-radius: 99px; font-size: 14px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.12); transition: .3s var(--ease);
}
.back:hover { background: rgba(0,0,0,.7); transform: translateX(-3px); }

.toolbar {
  position: sticky; top: calc(54px + env(safe-area-inset-top, 0px)); z-index: 10; padding-block: 10px; margin-bottom: 14px;
  display: flex; justify-content: center;
}
.tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 99px; background: rgba(8, 13, 24, .88); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); }
.tabs button { border: 0; background: none; padding: 9px 18px; border-radius: 99px; color: var(--muted); transition: .3s var(--ease); display: inline-flex; gap: 8px; align-items: center; }
.tabs button em { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.06); }
.tabs button.on { background: var(--fire); color: #ffffff; font-weight: 600; box-shadow: 0 6px 20px -6px rgba(37,99,235,.7); }
.tabs button.on em { background: rgba(0,0,0,.15); }

.masonry { columns: 2; column-gap: 14px; padding-bottom: 140px; }
.tile {
  break-inside: avoid; margin: 0 0 14px; border-radius: 16px; overflow: hidden; position: relative;
  border: 1px solid var(--line); background: #111c35; cursor: zoom-in; display: block; width: 100%; padding: 0;
  transition: transform .5s var(--ease), box-shadow .5s, border-color .5s;
}
.tile:hover { transform: translateY(-4px); border-color: rgba(96, 165, 250, .4); box-shadow: 0 24px 40px -20px rgba(37, 99, 235, .6); }
.tile img, .tile video { display: block; width: 100%; height: auto; min-height: 120px; object-fit: cover; transition: transform 1s var(--ease), filter .5s; }
.tile:hover img, .tile:hover video { transform: scale(1.06); }
.tile .ov {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .4s;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.75));
}
.tile:hover .ov { opacity: 1; }
.tile .ov span, .tile .play span {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.14); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25);
  transition: transform .4s var(--ease);
}
.tile .play { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(0,0,0,.1), rgba(0,0,0,.45)); }
.tile .play span { width: 60px; height: 60px; background: var(--fire); border: 0; box-shadow: 0 10px 30px -6px rgba(37,99,235,.8); }
.tile .play span svg { margin-left: 3px; }
.tile:hover .play span { transform: scale(1.12); }
.tile .dur { position: absolute; right: 10px; bottom: 10px; font-size: 12px; font-variant-numeric: tabular-nums; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.65); backdrop-filter: blur(6px); }
.tile .kind { position: absolute; top: 10px; left: 10px; }

.empty { text-align: center; padding: 70px 20px 160px; color: var(--muted); }
.empty .ic { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 26px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); }
.empty .ic svg { width: 36px; color: var(--accent-2); }
.empty h3 { font-family: var(--display); color: var(--text); margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; animation: fade .3s; background: #050a14; }
.lb .bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(.25) saturate(1.3); transition: background-image .4s; }
.lb .bar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; }
.lb .count { font-family: var(--display); font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.lb .count b { color: var(--text); }
.lb .stage { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 clamp(10px, 7vw, 90px); }
.lb .stage img, .lb .stage video { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 40px 100px rgba(0,0,0,.8); animation: zoom .45s var(--ease); }
.lb .ctl {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06); backdrop-filter: blur(10px); display: grid; place-items: center; transition: .25s;
}
.lb .ctl:hover { background: var(--fire); color: #ffffff; border-color: transparent; }
.lb .prev, .lb .next { position: absolute; z-index: 3; top: 50%; translate: 0 -50%; }
.lb .prev { left: 14px; } .lb .next { right: 14px; }
.lb .strip { position: relative; z-index: 2; display: flex; gap: 8px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.lb .strip::-webkit-scrollbar { display: none; }
.lb .strip button { flex: none; width: 58px; height: 58px; border-radius: 12px; overflow: hidden; padding: 0; border: 2px solid transparent; background: #111c35; opacity: .5; transition: .3s var(--ease); display: grid; place-items: center; }
.lb .strip button img { width: 100%; height: 100%; object-fit: cover; }
.lb .strip button svg { width: 22px; color: var(--accent-2); }
.lb .strip button.on { opacity: 1; border-color: var(--accent-2); transform: translateY(-3px); }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom { from { opacity: 0; transform: scale(.94); } }
@media (max-width: 600px) { .lb .prev, .lb .next { display: none; } .lb .strip button { width: 48px; height: 48px; } }

/* ---------- telegram floating button ---------- */
.tg {
  position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  width: 84px; height: 84px; border-radius: 50%; border: 0; padding: 0;
  background: linear-gradient(145deg, #37bbfe, #007dbb);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #fff; font-family: inherit;
  box-shadow: 0 12px 30px -6px rgba(34, 158, 217, .7), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  animation: bob 3.2s ease-in-out infinite;
}
.tg b { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.tg:hover { transform: scale(1.1) rotate(-8deg); animation-play-state: paused; }
.tg svg { width: 30px; height: 30px; margin-left: -3px; }
.tg::before, .tg::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--tg);
  animation: ring 2.4s ease-out infinite; z-index: -1;
}
.tg::after { animation-delay: 1.2s; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-5px); } }
.tg-menu {
  position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(118px + env(safe-area-inset-bottom, 0px)); z-index: 91;
  width: min(300px, calc(100vw - 40px)); padding: 10px; border-radius: 18px;
  background: rgba(10, 16, 32, .96); backdrop-filter: blur(18px); border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,.7); animation: pop .3s cubic-bezier(.2,.8,.2,1); transform-origin: bottom right;
}
.tg-menu p { margin: 6px 10px 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.tg-menu a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; transition: background .2s; }
.tg-menu a:hover { background: rgba(34, 158, 217, .15); }
.tg-menu a .ic { width: 36px; height: 36px; border-radius: 50%; background: var(--tg); display: grid; place-items: center; flex: none; box-sizing: border-box; }
.tg-menu a .ic svg { width: 20px; height: 20px; margin-left: -2px; }
.tg-menu a small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-menu a div { min-width: 0; }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(10px); } }

/* ---------- footer ---------- */
.foot { padding-block: 0 calc(40px + env(safe-area-inset-bottom, 0px)); }
.foot .wrap { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
.foot .wrap::before, .foot .wrap::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

.skeleton { background: linear-gradient(90deg, #0e1a30 0%, #162040 50%, #0e1a30 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #embers { display: none; }
}

.cat.reveal { transition: opacity .8s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease); }
.tile.reveal { transition: opacity .8s var(--ease), transform .5s var(--ease), box-shadow .5s, border-color .5s; }

/* ---------- visit counter ---------- */
.visits {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; margin: 16px auto 0;
  padding: 8px 16px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; backdrop-filter: blur(10px);
}
.visits svg { width: 16px; height: 16px; color: var(--accent-2); }
.visits strong { font-family: var(--display); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.cat .explore { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); }
