:root{--bg:#05070f;--card:rgba(255,255,255,.06);--card2:rgba(255,255,255,.04);--stroke:rgba(148,163,184,.22);--t:#e5e7eb;--m:#94a3b8;--a:#38bdf8;--hot:#f97316;--r:18px}
*{box-sizing:border-box}html{color-scheme:dark;scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial;background:radial-gradient(1100px 520px at 15% -10%, rgba(56,189,248,.22), transparent 55%),radial-gradient(900px 520px at 115% 10%, rgba(167,139,250,.16), transparent 60%),linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%),var(--bg);color:var(--t)}
body.menu-open{overflow:hidden}
a{color:inherit;text-decoration:none}
.wrap{max-width:1220px;margin:0 auto;padding:14px}

.site-top{position:sticky;top:0;z-index:90;backdrop-filter:blur(14px);background:rgba(5,7,15,.8);border-bottom:1px solid var(--stroke)}
.header-row{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.compact-header{flex-wrap:nowrap}
.brand{display:flex;align-items:center;gap:10px;font-weight:950;letter-spacing:.3px;min-width:0}
.brand-mark{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg, rgba(56,189,248,.28), rgba(167,139,250,.22));border:1px solid rgba(56,189,248,.35)}

.header-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.header-mini-actions{display:none;align-items:center;gap:8px;flex-shrink:0}
.header-search{min-width:0;flex:1}
.desktop-search{display:flex}

.nav-pill,.footer-btn,.small-pill,.viewsbox{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:999px;border:1px solid var(--stroke);background:rgba(255,255,255,.04);color:var(--m);font-size:13px}
.nav-pill.active,.nav-pill:hover,.footer-btn:hover,.cat-link.active,.cat-link:hover,.mobile-link.active,.mobile-link:hover,.mobile-section-toggle:hover{background:rgba(56,189,248,.14);border-color:rgba(56,189,248,.5);color:var(--t)}

.searchbox{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--stroke);border-radius:999px;background:rgba(255,255,255,.04)}
.searchbox input{border:0;outline:0;background:transparent;color:var(--t);width:100%;min-width:0;font-size:14px}

.cat-row{display:flex;gap:8px;flex-wrap:wrap;padding-top:0;padding-bottom:14px}
.cat-link{padding:8px 12px;border-radius:999px;border:1px solid var(--stroke);background:rgba(255,255,255,.03);font-size:13px;color:var(--m)}

.section-title{font-size:24px;font-weight:950;margin:0 0 12px 0}
.subtle{color:var(--m)}

.ad-wrap{margin:18px 0;padding:14px;border-radius:18px;border:1px dashed rgba(56,189,248,.25);background:rgba(255,255,255,.03);overflow:hidden}

.site-footer{margin-top:28px;border-top:1px solid var(--stroke);background:rgba(5,7,15,.52)}
.footer-grid{display:grid;gap:16px}
.footer-buttons{display:flex;gap:10px;flex-wrap:wrap}
.footer-live{font-size:14px;color:var(--m)}

.filters{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:16px 0}
.f{border:1px solid var(--stroke);background:rgba(255,255,255,.04);color:var(--m);padding:8px 12px;border-radius:999px;font-size:13px}
.f[aria-pressed="true"]{background:rgba(56,189,248,.16);border-color:rgba(56,189,248,.55);color:var(--t)}

.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.col-box{border:1px solid var(--stroke);background:var(--card);border-radius:20px;padding:14px}
.mini-list{display:grid;gap:10px}
.mini-item{padding:12px;border-radius:16px;border:1px solid var(--stroke);background:var(--card2)}
.mini-thumb{width:100%;height:170px;object-fit:cover;border-radius:12px;margin-bottom:10px;background:#0b1220}
.meta{font-size:12px;color:var(--m);margin-top:6px}

.top3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}
.top3-card{position:relative;border-radius:22px;overflow:hidden;border:1px solid rgba(249,115,22,.28);background:linear-gradient(180deg, rgba(249,115,22,.1), rgba(255,255,255,.04));box-shadow:0 0 0 1px rgba(249,115,22,.1), 0 0 32px rgba(249,115,22,.08)}
.top3-card::before{content:"LIVE UPDATE";position:absolute;top:12px;left:12px;font-size:11px;font-weight:900;letter-spacing:.09em;color:#fff;padding:7px 10px;border-radius:999px;background:rgba(249,115,22,.92);box-shadow:0 0 18px rgba(249,115,22,.55);z-index:3}
.top3-thumb{width:100%;height:220px;object-fit:cover;display:block;background:#0b1220}
.top3-content{padding:16px}
.top3-rank{font-size:40px;font-weight:950;color:var(--hot)}
.top3-title{font-size:20px;font-weight:900;line-height:1.15;margin:8px 0}
.top3-meta{font-size:13px;color:var(--m)}

.hot-sticky{position:sticky;top:110px}
.sticky-card{border:1px solid rgba(249,115,22,.24);background:linear-gradient(180deg, rgba(249,115,22,.08), rgba(255,255,255,.03));padding:14px;border-radius:20px}
.hotlist{display:grid;gap:10px}
.hotitem{display:grid;grid-template-columns:32px 1fr;gap:10px;padding:10px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid var(--stroke)}
.hotrank{font-size:20px;font-weight:950;color:var(--hot);text-align:center}

.page-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px}
.article-card{border:1px solid var(--stroke);background:var(--card);border-radius:22px;overflow:hidden}
.article-image{width:100%;max-height:320px;object-fit:cover;display:block;background:#0b1220}
.article-body{padding:16px}
.article-title{font-size:clamp(26px,4vw,40px);font-weight:950;line-height:1.08;margin:0 0 10px}
.article-text{font-size:17px;line-height:1.72;color:rgba(226,232,240,.9);white-space:pre-line}
.article-bottom{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:16px;color:var(--m);font-size:12px}

.related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.related-card,.stream-card{padding:12px;border-radius:16px;border:1px solid var(--stroke);background:rgba(255,255,255,.04)}

.progress{position:fixed;top:0;left:0;z-index:120;height:4px;background:linear-gradient(90deg,var(--a),#a78bfa);width:0}

.rank-list{display:grid;gap:12px}
.rank-row{display:grid;grid-template-columns:64px 120px 1fr auto;gap:12px;align-items:center;padding:14px;border:1px solid var(--stroke);background:var(--card);border-radius:18px}
.rank-thumb{width:120px;height:76px;object-fit:cover;border-radius:12px;background:#0b1220}
.rank-num{font-size:30px;font-weight:950;color:var(--a);text-align:center}
.hero-note{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}

/* compact mobile menu */
.menu-toggle{display:none;position:relative;width:44px;height:44px;border-radius:12px;border:1px solid var(--stroke);background:rgba(255,255,255,.04);color:var(--t);font-size:22px;cursor:pointer;overflow:hidden;flex-shrink:0}
.menu-icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:opacity .25s ease, transform .25s ease}
.menu-icon-close{opacity:0;transform:scale(.8) rotate(-90deg)}
.menu-toggle.open .menu-icon-open{opacity:0;transform:scale(.8) rotate(90deg)}
.menu-toggle.open .menu-icon-close{opacity:1;transform:scale(1) rotate(0)}

.mobile-overlay{position:fixed;inset:0;background:rgba(2,6,23,.62);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .28s ease;z-index:88}
.mobile-overlay.open{opacity:1;pointer-events:auto}

.mobile-menu{position:fixed;top:72px;left:12px;right:12px;z-index:89;border:1px solid var(--stroke);background:rgba(5,7,15,.98);border-radius:18px;box-shadow:0 24px 60px rgba(0,0,0,.45);opacity:0;transform:translateY(-14px) scale(.98);pointer-events:none;transition:opacity .28s ease, transform .28s ease;max-height:calc(100vh - 90px);overflow:auto}
.mobile-menu.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}

.mobile-menu-inner{padding-top:8px;padding-bottom:16px;display:grid;gap:12px}
.mobile-menu-group{display:grid;gap:8px}
.mobile-menu-title{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--m);padding:2px 2px 0}

.mobile-link{display:block;padding:11px 13px;border-radius:14px;border:1px solid var(--stroke);background:rgba(255,255,255,.04);color:var(--t);transition:transform .18s ease, background .18s ease}
.mobile-link:hover{transform:translateY(-1px)}

.mobile-section-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:12px 14px;border-radius:14px;border:1px solid var(--stroke);background:rgba(255,255,255,.04);color:var(--t);cursor:pointer;font-size:14px}
.mobile-section-arrow{transition:transform .25s ease}
.mobile-section-toggle.open .mobile-section-arrow{transform:rotate(180deg)}

.mobile-sections{display:none;gap:8px}
.mobile-sections.open{display:grid}

@media(max-width:980px){
  .grid3,.top3,.related-grid{grid-template-columns:1fr}
  .page-grid{grid-template-columns:1fr}
  .hot-sticky{position:relative;top:auto}
  .rank-row{grid-template-columns:52px 1fr}
  .rank-thumb,.rank-row .viewsbox{grid-column:2/3;justify-self:start;width:100%;max-width:220px;height:auto}

  .desktop-nav,.cat-row,.desktop-search{display:none}
  .header-mini-actions{display:flex;min-width:0;max-width:58%}
  .menu-toggle{display:inline-flex;align-items:center;justify-content:center}
  .header-row{justify-content:space-between;align-items:center;flex-wrap:nowrap}
  .brand{max-width:42%}
  .brand span:last-child{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .site-top{position:sticky;top:0}
  .header-search{width:100%;max-width:160px}
  .header-search input{font-size:13px}
}
/* ===== MOBILE HEADER TIGHTEN ===== */
@media (max-width: 980px) {
  .site-top .wrap {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .compact-header,
  .header-row {
    gap: 8px;
  }

  .brand {
    max-width: 38%;
    gap: 8px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex: 0 0 32px;
  }

  .brand span:last-child {
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-mini-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 62%;
    width: 62%;
  }

  .header-search {
    max-width: none;
    width: calc(100% - 52px);
  }

  .header-search .searchbox,
  .header-search.searchbox {
    padding: 8px 10px;
    min-height: 42px;
  }

  .header-search input,
  #q {
    font-size: 13px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }
}

/* ===== RANKING PAGE MOBILE FIX ===== */
.ranking-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.ranking-title {
  margin: 0;
  font-size: clamp(30px, 7vw, 56px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.ranking-subtitle {
  margin-top: 12px;
  color: var(--m);
  font-size: 16px;
  line-height: 1.35;
  max-width: 760px;
}

.ranking-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rank-list-mobile {
  display: grid;
  gap: 16px;
}

.rank-card-mobile {
  display: block;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.rank-card-top {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
}

.rank-card-num {
  font-size: 46px;
  line-height: 1;
  font-weight: 950;
  color: var(--a);
  text-align: center;
}

.rank-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  background: #0b1220;
}

.rank-card-body {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.rank-card-title {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  color: var(--t);
}

.rank-card-views {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--m);
  font-size: 14px;
  width: fit-content;
  max-width: 100%;
}

.rank-card-meta {
  color: var(--m);
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .ranking-mobile-fix {
    padding-top: 8px;
  }

  .ranking-title {
    font-size: clamp(24px, 8vw, 42px);
    line-height: 0.95;
  }

  .ranking-subtitle {
    font-size: 14px;
    margin-top: 10px;
  }

  .ranking-tabs {
    gap: 8px;
  }

  .ranking-tabs .nav-pill {
    padding: 10px 14px;
    font-size: 14px;
  }

  .rank-card-mobile {
    padding: 14px;
    border-radius: 22px;
  }

  .rank-card-top {
    grid-template-columns: 44px 1fr;
    gap: 10px;
  }

  .rank-card-num {
    font-size: 36px;
  }

  .rank-card-title {
    font-size: 16px;
  }

  .rank-card-meta {
    font-size: 13px;
  }

  .rank-card-views {
    font-size: 13px;
    min-height: 38px;
    padding: 8px 12px;
  }
}

/* прибираємо стару ламану сітку тільки для top page */
.rank-list-mobile .rank-row,
.ranking-mobile-fix .rank-row {
  display: none;
}
/* ===== FIX PROGRESS BAR ===== */
.progress{
  position:fixed;
  top:0;
  left:0;
  z-index:140;
  height:4px;
  width:0;
  background:linear-gradient(90deg,var(--a),#a78bfa);
  pointer-events:none;
  opacity:1;
  transition:width .08s linear;
}

/* ===== MOBILE HEADER COMPACT ===== */
.header-mini-actions{
  display:none;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

.mobile-only-search{
  display:none;
}

.desktop-search{
  display:flex;
}

.menu-toggle{
  display:none;
  position:relative;
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:var(--t);
  font-size:22px;
  cursor:pointer;
  overflow:hidden;
  flex-shrink:0;
}

.menu-icon{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:opacity .25s ease, transform .25s ease;
}

.menu-icon-close{
  opacity:0;
  transform:scale(.8) rotate(-90deg);
}

.menu-toggle.open .menu-icon-open{
  opacity:0;
  transform:scale(.8) rotate(90deg);
}

.menu-toggle.open .menu-icon-close{
  opacity:1;
  transform:scale(1) rotate(0);
}

.mobile-overlay{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,.62);
  backdrop-filter:blur(2px);
  opacity:0;
  pointer-events:none;
  transition:opacity .28s ease;
  z-index:88;
}

.mobile-overlay.open{
  opacity:1;
  pointer-events:auto;
}

.mobile-menu{
  position:fixed;
  top:68px;
  left:12px;
  right:12px;
  z-index:89;
  border:1px solid var(--stroke);
  background:rgba(5,7,15,.98);
  border-radius:18px;
  box-shadow:0 24px 60px rgba(0,0,0,.45);
  opacity:0;
  transform:translateY(-14px) scale(.98);
  pointer-events:none;
  transition:opacity .28s ease, transform .28s ease;
  max-height:calc(100vh - 86px);
  overflow:auto;
}

.mobile-menu.open{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}

.mobile-menu-inner{
  padding-top:8px;
  padding-bottom:16px;
  display:grid;
  gap:12px;
}

.mobile-menu-group{
  display:grid;
  gap:8px;
}

.mobile-menu-title{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--m);
  padding:2px 2px 0;
}

.mobile-link{
  display:block;
  padding:11px 13px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:var(--t);
  transition:transform .18s ease, background .18s ease;
}

.mobile-link:hover{
  transform:translateY(-1px);
}

.mobile-section-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:var(--t);
  cursor:pointer;
  font-size:14px;
}

.mobile-section-arrow{
  transition:transform .25s ease;
}

.mobile-section-toggle.open .mobile-section-arrow{
  transform:rotate(180deg);
}

.mobile-sections{
  display:none;
  gap:8px;
}

.mobile-sections.open{
  display:grid;
}

/* ===== RANKING PAGE MOBILE CLEAN ===== */
.ranking-title{
  margin:0;
  font-size:clamp(30px, 7vw, 56px);
  line-height:.95;
  font-weight:950;
  letter-spacing:-.03em;
}

.ranking-subtitle{
  margin-top:12px;
  color:var(--m);
  font-size:16px;
  line-height:1.35;
}

@media (max-width: 980px){
  .site-top .wrap{
    padding-top:10px;
    padding-bottom:10px;
  }

  .compact-header,
  .header-row{
    gap:8px;
  }

  .desktop-nav,
  .desktop-cats,
  .desktop-search{
    display:none !important;
  }

  .header-mini-actions{
    display:flex;
    min-width:0;
    width:auto;
    max-width:64%;
  }

  .mobile-only-search{
    display:flex;
    min-width:0;
    width:136px;
    padding:7px 10px;
    min-height:40px;
    border-radius:999px;
  }

  .mobile-only-search input{
    font-size:13px;
  }

  .brand{
    max-width:36%;
    gap:8px;
  }

  .brand-mark{
    width:32px;
    height:32px;
    border-radius:10px;
    flex:0 0 32px;
  }

  .brand span:last-child{
    font-size:14px;
    line-height:1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    flex:0 0 40px;
  }

  .ranking-title{
    font-size:clamp(24px, 8vw, 42px);
  }

  .ranking-subtitle{
    font-size:14px;
    margin-top:10px;
  }

  .ranking-tabs .nav-pill{
    padding:9px 13px;
    font-size:14px;
  }
}

/* ===== DESKTOP KEEP OLD LOOK ===== */
@media (min-width: 981px){
  .header-mini-actions{
    display:none !important;
  }

  .desktop-nav{
    display:flex !important;
  }

  .desktop-cats{
    display:flex !important;
  }

  .mobile-menu,
  .mobile-overlay{
    display:none !important;
  }
}
.footer-legal{
  margin-top:8px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.06);
  display:grid;
  gap:8px;
}

.footer-legal-item{
  font-size:12px;
  line-height:1.55;
  color:rgba(148,163,184,.9);
}

.footer-legal-item strong{
  color:rgba(226,232,240,.92);
  font-weight:700;
}

@media (max-width: 767px){
  .footer-legal-item{
    font-size:11px;
    line-height:1.5;
  }
}