:root {
  --bg: #070708;
  --bg-soft: #16161a;
  --card: #141418;
  --card-hover: #1d1d22;
  --surface: #0e0e11;
  --line: #2a2a30;
  --line-soft: #1e1e24;
  --text: #f4f2f4;
  --muted: #9a969d;
  --muted-2: #6b6770;
  --accent: #e50914;
  --accent-hover: #ff1f2b;
  --accent-2: #ff3b46;
  --hot: #ff2d3f;
  --grad-brand: linear-gradient(135deg, #ff2d3f 0%, #e50914 48%, #7d060c 100%);
  --grad-a: linear-gradient(135deg, #e50914, #b20710);
  --grad-b: linear-gradient(135deg, #ff3b46, #8a0a12);
  --grad-c: linear-gradient(135deg, #ff5a4d, #c8102e);
  --grad-d: linear-gradient(135deg, #b20710, #3a0308);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow: 0 12px 30px -10px rgba(229, 9, 20, 0.55);
  --radius: 14px;
  --sidebar-w: 208px;
  --topbar-h: 56px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: radial-gradient(
      900px 520px at 0% -6%,
      rgba(190, 10, 20, 0.2),
      transparent 60%
    ),
    radial-gradient(760px 500px at 100% 0%, rgba(110, 8, 14, 0.22), transparent 56%),
    radial-gradient(820px 620px at 50% 112%, rgba(150, 8, 16, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

::selection {
  background: rgba(229, 9, 20, 0.3);
}

/* ==================== Blood drip (all devices) ==================== */
.blood-drip {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(120px, 14vw, 200px);
  object-fit: cover;
  object-position: top center;
  z-index: 45;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 6px 12px rgba(120, 0, 6, 0.6));
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
}

@media (max-width: 640px) {
  .blood-drip {
    height: clamp(105px, 34vw, 150px);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

button {
  font-family: inherit;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== Shared page header (doc pages) ==================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: var(--text);
  flex-shrink: 0;
}

.logo__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--glow);
}

/* ==================== Shell / layout ==================== */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 12px;
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(14px) saturate(150%);
  border-right: 1px solid var(--line-soft);
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 18px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.4px;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--glow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(-8deg) scale(1.08);
}

.brand__mark svg {
  width: 15px;
  height: 15px;
}

.brand__name {
  color: var(--accent-2);
  text-shadow: 0 0 16px rgba(229, 9, 20, 0.35);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  padding: 0 12px;
  height: 42px;
  border: none;
  background: none;
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-weight: 400;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.side-nav__item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}

.side-nav__item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-nav__item:hover {
  background: linear-gradient(
    135deg,
    rgba(229, 9, 20, 0.12),
    rgba(255, 45, 63, 0.12)
  );
  transform: translateX(4px);
}

.side-nav__item:hover svg {
  transform: scale(1.12);
}

.side-nav__item.is-active {
  background: var(--grad-a);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(229, 9, 20, 0.8);
}

.side-nav__item.is-active svg {
  color: #fff;
}

.side-nav__item .pill {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 0, 0, 0.1);
  color: var(--accent);
}

/* ---------- Main column ---------- */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease),
    color 0.3s var(--ease);
}

.icon-btn:hover {
  background: var(--bg-soft);
  color: var(--accent);
  transform: translateY(-1px) scale(1.06);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.search-btn,
.search-back {
  display: none;
}

/* ---------- Drawer scrim (mobile) ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(26, 21, 51, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.scrim.is-on {
  opacity: 1;
  visibility: visible;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.topbar__mark {
  width: 30px;
  height: 21px;
  border-radius: 6px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--glow);
}

.topbar__mark svg {
  width: 13px;
  height: 13px;
}

.topbar__name {
  color: var(--accent-2);
  text-shadow: 0 0 16px rgba(229, 9, 20, 0.35);
}

.topbar__center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.topbar__lang {
  flex-shrink: 0;
}

.search {
  position: relative;
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center;
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 18px 0 44px;
  background: rgba(22, 22, 26, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  outline: none;
  font-size: 15px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}

.search input::placeholder {
  color: var(--muted-2);
}

.search input:focus {
  border-color: transparent;
  background: #16161a;
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.35),
    0 8px 24px -8px rgba(229, 9, 20, 0.5);
}

.search__icon {
  position: absolute;
  left: 16px;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.3s var(--ease);
}

.search:focus-within .search__icon {
  color: var(--accent);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-fav {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn-fav svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.btn-fav:hover {
  background: var(--card-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(255, 45, 63, 0.6);
  color: var(--accent-2);
}

.btn-fav:hover svg {
  transform: scale(1.14);
}

.btn-fav.is-on {
  background: var(--grad-a);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(229, 9, 20, 0.8);
}

.btn-fav.is-on svg {
  color: #fff;
}

.btn-fav__count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--grad-a);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.btn-fav.is-on .btn-fav__count {
  background: #fff;
  color: var(--accent);
}

/* ---------- Content ---------- */
.content {
  padding: 24px 24px 0;
  flex: 1;
}

/* ==================== Hero banner ==================== */
.banner {
  margin-bottom: 32px;
}

.banner__link {
  position: relative;
  display: block;
  min-height: 340px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 24px 60px -30px rgba(229, 9, 20, 0.7);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.banner__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 70px -30px rgba(255, 45, 63, 0.7);
}

.banner__link img,
.banner__link video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.banner__link:hover img,
.banner__link:hover video {
  transform: scale(1.05);
}

.banner__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      90deg,
      rgba(6, 4, 5, 0.94) 0%,
      rgba(30, 4, 8, 0.62) 42%,
      rgba(229, 9, 20, 0.1) 74%,
      rgba(0, 0, 0, 0) 100%
    ),
    linear-gradient(0deg, rgba(6, 4, 5, 0.9), rgba(0, 0, 0, 0) 58%),
    linear-gradient(120deg, rgba(229, 9, 20, 0.32), rgba(125, 6, 12, 0.25));
}

.banner__content {
  position: relative;
  z-index: 2;
  min-height: 340px;
  max-width: 640px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

.banner__rank {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(255, 45, 63, 0.95),
    rgba(125, 6, 12, 0.95)
  );
  box-shadow: 0 8px 20px -8px rgba(229, 9, 20, 0.8);
}

.banner__rank svg {
  width: 15px;
  height: 15px;
}

.banner__title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.banner__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.banner__list li {
  position: relative;
  padding-left: 16px;
  color: #e6e1e3;
  font-size: 13.5px;
}

.banner__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d3f, #7d060c);
}

.banner__cta {
  align-self: flex-start;
  margin-top: 4px;
  height: 42px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--grad-a);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  box-shadow: 0 12px 26px -10px rgba(229, 9, 20, 0.8);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}

.banner__link:hover .banner__cta {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 32px -10px rgba(255, 45, 63, 0.85);
}

.banner__desc {
  max-width: 520px;
  color: #bdb7ba;
  font-size: 13.5px;
  line-height: 1.55;
}

/* Mobile-only hero carousel (hidden on desktop) */
.banner__carousel {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.banner__carousel .banner__slide {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.banner__carousel .banner__slide.is-active {
  opacity: 1;
}

/* ==================== Blocks / sections ==================== */
.block {
  margin-bottom: 36px;
}

.block--deco {
  position: relative;
}

.block__splash {
  position: absolute;
  top: -26px;
  right: 8px;
  width: min(30%, 300px);
  height: auto;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  transform: rotate(-6deg);
  filter: drop-shadow(0 14px 26px rgba(120, 0, 6, 0.5));
}

.block--deco .block__head,
.block--deco .row {
  position: relative;
  z-index: 1;
}

.block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.block__head h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.block__head h2::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 18px;
  margin-right: 10px;
  vertical-align: -3px;
  border-radius: 999px;
  background: var(--grad-a);
}

.block__more {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s var(--ease);
}

.block__more:hover {
  color: var(--accent);
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-a);
  animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(229, 9, 20, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
  }
}

/* ---------- Horizontal poster row ---------- */
.row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.row::-webkit-scrollbar {
  display: none;
}

.row .card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

/* ==================== Category chips (pills) ==================== */
.cats {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 4px;
  scroll-margin-top: 76px;
  scrollbar-width: none;
}

.cats::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  padding: 8px 16px;
  background: rgba(22, 22, 26, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.chip:hover {
  color: var(--accent);
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(229, 9, 20, 0.9);
}

.chip.is-active {
  background: var(--grad-a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(229, 9, 20, 0.85);
}

/* ==================== Video cards ==================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px 16px;
}

.grid-loader {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(229, 9, 20, 0.15);
  border-top-color: var(--accent-2);
  animation: tipSpin 0.8s linear infinite;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
}

.card {
  display: block;
  color: inherit;
  border-radius: var(--radius);
  animation: cardIn 0.5s var(--ease) backwards;
  transition: transform 0.4s var(--ease);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  transform: translateY(-6px);
}

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  transition: box-shadow 0.4s var(--ease);
}

.card:hover .card__thumb {
  box-shadow: 0 22px 46px -20px rgba(229, 9, 20, 0.75),
    0 0 0 2px rgba(229, 9, 20, 0.35);
}

.card__thumb img,
.card__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.card:hover .card__thumb img {
  transform: scale(1.06);
}

.card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 55%,
    rgba(120, 8, 14, 0.55)
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.card:hover .card__thumb::after {
  opacity: 1;
}

.card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.card__badge--hot {
  background: linear-gradient(135deg, #e50914, #7d060c);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(229, 9, 20, 0.9);
}

.card__badge--vip {
  background: linear-gradient(180deg, #ffe08a, #f5b301);
  color: #3a2600;
}

.card__play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  transform: scale(0.85);
}

.card:hover .card__play {
  opacity: 1;
  transform: scale(1);
}

.card__thumb.is-playing .card__play {
  display: none;
}

.card__play svg {
  width: 60px;
  height: 60px;
  padding: 14px;
  box-sizing: border-box;
  color: #fff;
  background: var(--grad-a);
  border-radius: 50%;
  box-shadow: 0 12px 30px -8px rgba(229, 9, 20, 0.9);
}

.card__duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(8, 8, 10, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.card__fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(8, 8, 10, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s var(--ease), background 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.card:hover .card__fav {
  opacity: 1;
}

.card__fav:hover {
  transform: scale(1.15);
  background: rgba(8, 8, 10, 0.85);
}

.card__fav svg {
  width: 17px;
  height: 17px;
}

.card__fav.is-on {
  opacity: 1;
  color: #fff;
  background: var(--grad-a);
  box-shadow: 0 8px 20px -8px rgba(255, 45, 63, 0.9);
}

.card__info {
  display: flex;
  gap: 12px;
  padding: 12px 2px 0;
}

.card__avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card);
  padding: 2px;
  background-image: var(--grad-brand);
  transition: transform 0.4s var(--ease);
}

.card:hover .card__avatar {
  transform: scale(1.08);
}

.card__body {
  min-width: 0;
  flex: 1;
}

.card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s var(--ease);
}

.card:hover .card__title {
  color: var(--accent);
}

.card__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.card__meta .dot-sep {
  margin: 0 4px;
}

.card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.card__like,
.card__dislike {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease), transform 0.3s var(--ease);
}

.card__like:hover,
.card__dislike:hover {
  color: var(--text);
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-1px);
}

.card__like.is-on,
.card__dislike.is-on {
  color: var(--accent-2);
  border-color: rgba(229, 9, 20, 0.55);
  background: rgba(229, 9, 20, 0.12);
}

.card__like svg,
.card__dislike svg {
  width: 15px;
  height: 15px;
}

.card__dislike svg {
  transform: rotate(180deg);
}

.card__like-count,
.card__dislike-count {
  font-variant-numeric: tabular-nums;
}

.card__like-sep {
  width: 1px;
  height: 15px;
  background: currentColor;
  opacity: 0.35;
}

/* ==================== Pagination ==================== */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 56px;
  flex-wrap: wrap;
}

.pager button {
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(22, 22, 26, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.pager button:hover:not(:disabled) {
  color: var(--accent);
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(229, 9, 20, 0.9);
}

.pager button.is-active {
  background: var(--grad-a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(229, 9, 20, 0.85);
}

.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==================== Footer ==================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  color: var(--muted);
  font-size: 13px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.footer__links a {
  transition: color 0.3s var(--ease);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  max-width: 720px;
}

/* ==================== Bottom tab bar (mobile) ==================== */
.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.tabbar__item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s var(--ease);
}

.tabbar__item.is-active {
  color: var(--accent);
}

.tabbar__item.is-active svg {
  transform: translateY(-2px) scale(1.1);
  color: var(--accent-2);
}

@keyframes tipSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== Loading tip (top countdown) ==================== */
.loading-tip {
  position: fixed;
  top: calc(var(--site-langbar-h, 0px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(520px, calc(100% - 24px));
  padding: 10px 16px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(229, 9, 20, 0.94),
    rgba(255, 45, 63, 0.92)
  );
  color: #fff;
  box-shadow: 0 12px 34px rgba(229, 9, 20, 0.4);
  animation: tipIn 0.4s var(--ease);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.loading-tip.is-hidden {
  opacity: 0;
  transform: translate(-50%, -14px);
  pointer-events: none;
}

.loading-tip.is-warn {
  background: linear-gradient(135deg, #f43f5e, #b91c1c);
  animation: tipWarn 0.5s ease;
}

.loading-tip.is-warn .loading-tip__title {
  color: #fff;
}

.loading-tip.is-warn .loading-tip__count b {
  color: #fff;
}

@keyframes tipWarn {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  20% {
    transform: translate(calc(-50% - 7px), 0);
  }
  40% {
    transform: translate(calc(-50% + 7px), 0);
  }
  60% {
    transform: translate(calc(-50% - 5px), 0);
  }
  80% {
    transform: translate(calc(-50% + 5px), 0);
  }
}

.loading-tip__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.loading-tip__title {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.loading-tip__count {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.loading-tip__count b {
  color: #ffe08a;
  font-size: 14px;
}

.loading-tip__spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: tipSpin 0.8s linear infinite;
}

.loading-tip__text {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.5;
}

.loading-tip__text + .loading-tip__text {
  margin-top: 3px;
}

@keyframes tipIn {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ==================== Responsive ==================== */
@media (max-width: 1180px) {
  :root {
    --sidebar-w: 180px;
  }
  .banner__link,
  .banner__content {
    min-height: 300px;
  }
  .banner__title {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    height: 100vh;
    z-index: 80;
    background: rgba(12, 12, 14, 0.98);
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
    box-shadow: 0 0 40px rgba(229, 9, 20, 0.28);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  /* Keep the language chip centered; search field stays hidden until opened */
  .topbar__center {
    display: flex;
    justify-content: center;
  }

  .topbar__center .search,
  .topbar__center .search-back {
    display: none;
  }

  .search-btn {
    display: grid;
  }

  .notif-btn,
  .btn-fav {
    display: none;
  }

  .topbar.is-search-open .topbar__center {
    position: absolute;
    inset: 0;
    z-index: 10;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    background: rgba(12, 12, 14, 0.98);
  }

  .topbar.is-search-open .topbar__center .search-back {
    display: grid;
  }

  .topbar.is-search-open .topbar__center .search {
    display: flex;
    max-width: none;
  }

  .topbar.is-search-open .topbar__lang {
    display: none;
  }

  .content {
    padding: 16px 12px 0;
  }

  .topbar {
    padding: 0 8px;
    gap: 4px;
  }

  .footer {
    padding: 24px 16px;
  }

  .grid {
    gap: 28px 0;
  }
}

@media (max-width: 760px) {
  .banner__link,
  .banner__content {
    min-height: 260px;
  }
  .banner__carousel {
    display: block;
  }
  .banner__img {
    display: none;
  }
  .banner__content {
    padding: 22px 20px;
    gap: 9px;
  }
  .banner__title {
    font-size: 21px;
  }
  .banner__list li {
    font-size: 12.5px;
  }
  .banner__desc {
    font-size: 12.5px;
  }
  .block__head h2 {
    font-size: 18px;
  }
  .block__splash {
    top: -14px;
    right: 0;
    width: 48%;
    opacity: 0.42;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .row .card {
    flex-basis: 260px;
  }
  .btn-fav__label {
    display: none;
  }
  .block__more {
    display: none;
  }
}

@media (max-width: 560px) {
  .grid {
    gap: 22px 0;
  }
}
