:root {
  --bg: #0d0b12;
  --bg-2: #15121d;
  --card: #1b1725;
  --line: #2a2438;
  --text: #ece8f4;
  --muted: #9b93ad;
  --accent: #e5383b;
  --accent-2: #ff7a45;
  --twitch: #9146ff;
  --ok: #3ddc97;
  --radius: 14px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 11, 18, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: .12em; }
.logo:hover { text-decoration: none; }
nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); background: var(--card); text-decoration: none; }

/* hero */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(800px 360px at 15% 0%, rgba(229, 56, 59, .22), transparent 60%),
    radial-gradient(600px 300px at 90% 20%, rgba(145, 70, 255, .16), transparent 60%);
  border-bottom: 1px solid var(--line);
}
.hero h1 { font-size: clamp(40px, 8vw, 76px); line-height: 1; margin: 12px 0 16px; letter-spacing: .04em; }
.hero p.lead { font-size: 19px; color: #cfc8dc; max-width: 640px; margin: 0 0 28px; }
.page-head { padding-top: 48px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; max-width: 680px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--card); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 600; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 15px;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); margin-left: 8px; }
.btn.twitch { background: var(--twitch); }

/* sections */
section { padding: 52px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: 28px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 28px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat b { display: block; font-size: 30px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .thumb { aspect-ratio: 16 / 9; width: 100%; }
.card .body { padding: 16px 18px 20px; flex: 1; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card h3 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.meta { font-size: 13px; color: var(--muted); margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); margin-right: 6px; }

/* twitch embeds */
.embed { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 30% 20%, rgba(145, 70, 255, .35), transparent 60%), var(--bg-2);
  color: var(--text); text-align: center; padding: 16px;
}
.embed .poster b { font-size: 22px; }
.embed .poster small { color: var(--muted); }
.card .embed { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
.featured { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.featured .side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.featured .side h3 { margin-top: 0; }
.featured .side p { color: #cfc8dc; font-size: 15px; }

/* schedule */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; background: var(--card); }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.table th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr.today td { background: rgba(229, 56, 59, .08); }
.table tr.today td:first-child::after { content: " · сегодня"; color: var(--accent-2); font-size: 13px; }
.off { color: var(--muted); }

/* setup */
.list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.item small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.item div { font-weight: 600; margin-top: 4px; }
.item p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* articles */
.prose { max-width: 740px; }
.prose p, .prose li { color: #d6d0e2; font-size: 17px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose blockquote { margin: 24px 0; padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 10px 10px 0; color: #cfc8dc; }
.prose code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 15px; }
.post-meta { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 14px; margin-top: 20px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer b { color: var(--text); }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }

/* 404 */
.nf { min-height: 50vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.nf h1 { font-size: 96px; margin: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 820px) {
  .featured { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
  nav a { padding: 6px 8px; font-size: 14px; }
  .hero { padding: 48px 0 40px; }
  .btn.ghost { margin: 10px 0 0; }
  .grid { grid-template-columns: 1fr; }
}

.embed button.poster { border: 0; cursor: pointer; font: inherit; width: 100%; }
.card .tag + h3 { margin-top: 10px; }

/* ---------- art ---------- */
body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(229, 56, 59, .08), transparent 70%),
    var(--bg);
}
.hero.art {
  position: relative; overflow: hidden; padding: 96px 0 88px; min-height: 560px;
  background:
    linear-gradient(90deg, rgba(13, 11, 18, .96) 0%, rgba(13, 11, 18, .82) 40%, rgba(13, 11, 18, .25) 75%, rgba(13, 11, 18, .45) 100%),
    var(--art) center 35% / cover no-repeat;
}
.hero.art::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}
.hero.art .wrap { position: relative; z-index: 2; }
.hero .render {
  position: absolute; z-index: 1; right: max(-80px, calc((100vw - var(--wrap)) / 2 - 140px)); bottom: -90px;
  width: min(640px, 58vw); pointer-events: none;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6));
}
.hero h1 { text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.kicker { color: var(--accent-2); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; margin: 18px 0 0; }

/* card covers: panorama + hero render */
.cover {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 11, 18, .1), rgba(13, 11, 18, .7)), var(--art) var(--x, 50%) 40% / cover no-repeat;
}
.cover img { position: absolute; left: 50%; bottom: -14%; width: 60%; transform: translateX(-50%); transition: transform .35s ease; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
.card:hover .cover img { transform: translateX(-50%) scale(1.05); }
.card .portrait { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.card { transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: #3b3350; }

/* heroes strip */
.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.hero-tile { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.hero-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.hero-tile:hover img { transform: scale(1.06); }
.hero-tile > div { padding: 10px 12px 12px; }
.hero-tile b { display: block; font-size: 15px; }
.hero-tile span { color: var(--muted); font-size: 13px; }
.bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* streamer posters with hero art */
.embed .poster .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; filter: saturate(1.2); transition: opacity .3s ease, transform .4s ease; }
.embed .poster::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(13, 11, 18, .2), rgba(13, 11, 18, .85)); }
.embed .poster > :not(.bg) { position: relative; z-index: 2; }
.embed .poster:hover .bg { opacity: .6; transform: scale(1.04); }

/* page banners */
.banner {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(13, 11, 18, .95) 0%, rgba(13, 11, 18, .7) 55%, rgba(13, 11, 18, .3) 100%),
    var(--art) var(--x, 50%) var(--y, 40%) / cover no-repeat;
}
.banner .page-head { position: relative; z-index: 2; padding-top: 64px; padding-bottom: 48px; }
.banner .render { position: absolute; z-index: 1; right: max(-40px, calc((100vw - var(--wrap)) / 2)); bottom: -70px; width: min(380px, 42vw); pointer-events: none; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); }
.banner p { color: #d6d0e2; }

.figure { margin: 28px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.figure img { width: 100%; }
.figure figcaption { padding: 10px 14px; font-size: 14px; color: var(--muted); background: var(--card); }
.inline-items { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.inline-items img { width: 66px; border-radius: 8px; border: 1px solid var(--line); }

@media (max-width: 760px) {
  .hero.art { min-height: 0; padding: 64px 0 220px; }
  .hero .render { width: 320px; right: 50%; transform: translateX(50%); bottom: -60px; opacity: .9; }
  .banner .render { opacity: .35; }
}

/* live player on the home page */
.live { background: linear-gradient(180deg, rgba(145, 70, 255, .07), transparent 70%); }
.live-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #ff3b3b; margin-right: 10px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(255, 59, 59, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 59, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); } }
#live-player { position: absolute; inset: 0; }
#live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.live-wait .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.live-wait span { position: relative; background: rgba(13, 11, 18, .75); padding: 8px 14px; border-radius: 8px; }
.live-next button { background: none; border: 1px solid var(--line); color: var(--muted); padding: 8px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.live-next button:hover { color: var(--text); border-color: #3b3350; }
#live-name { font-size: 22px; }
.live-wait[hidden] { display: none; }
