* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #dc2626;
  --brand-2: #f97316;
  --brand-3: #facc15;
  --dark: #111827;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  font-size: 24px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.brand-icon.compact {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
}

.brand-text {
  display: grid;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  color: #374151;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: #fee2e2;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input {
  width: 230px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
}

.header-search button,
.big-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: var(--text);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: #ffffff;
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  padding: 10px 16px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #b91c1c 0%, #f97316 55%, #facc15 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.22), transparent 30%), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.18), transparent 34%);
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: 7%;
  top: 12%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(16px);
}

.hero-container {
  position: relative;
  min-height: 560px;
  padding: 72px 0 78px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  gap: 52px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.6s ease both;
}

.hero-copy h1 {
  margin: 16px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 32px;
  color: #fff7ed;
  font-size: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fef3c7;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--brand);
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(127, 29, 29, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.hero-poster,
.category-hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 420px;
  border: 8px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(69, 10, 10, 0.35);
  background: rgba(255, 255, 255, 0.16);
}

.hero-poster::after,
.category-hero-poster::after,
.poster::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.quick-search-panel {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.big-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.big-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 16px 20px;
  background: transparent;
}

.big-search button {
  padding: 0 28px;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-tags a,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 11px;
}

.section-block {
  padding: 54px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading a,
.text-link {
  color: var(--brand);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.compact-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.page-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.movie-card.compact .poster {
  aspect-ratio: 2.9 / 4;
}

.card-content {
  padding: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.card-tags span {
  font-size: 12px;
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card.compact h3 {
  font-size: 16px;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-grid,
.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.category-tile,
.channel-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.category-tile {
  position: relative;
  min-height: 210px;
  padding: 22px;
  color: #ffffff;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: saturate(1.1) brightness(0.72);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(127, 29, 29, 0.78));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin-top: 105px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 8px;
  color: #fee2e2;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full-rank {
  grid-template-columns: 1fr;
}

.rank-row {
  display: grid;
  grid-template-columns: auto 86px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-thumb {
  display: block;
  width: 86px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #fee2e2;
}

.list-rank,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-row p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  color: #9ca3af;
  font-size: 13px;
}

.page-hero,
.category-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

.small-hero .container {
  padding: 70px 0;
}

.small-hero h1,
.category-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.small-hero p,
.category-hero p {
  max-width: 760px;
  margin: 0;
  color: #ffedd5;
  font-size: 18px;
}

.channel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.channel-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 230px;
}

.channel-cover {
  display: block;
  overflow: hidden;
  background: #fee2e2;
}

.channel-body {
  padding: 20px;
}

.channel-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.channel-body p {
  margin: 0 0 14px;
  color: var(--muted);
}

.mini-posters {
  display: flex;
  gap: 6px;
  height: 46px;
  margin-bottom: 12px;
}

.mini-posters img {
  width: 36px;
  border-radius: 8px;
}

.category-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: center;
  padding: 70px 0;
}

.category-hero .primary-btn {
  margin-top: 28px;
}

.category-hero-poster {
  min-height: 360px;
}

.with-filter {
  align-items: center;
}

.category-filter {
  width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 12px 18px;
  background: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 24px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.detail-hero {
  display: grid;
  gap: 28px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #030712;
  box-shadow: 0 28px 70px rgba(3, 7, 18, 0.35);
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.08), rgba(3, 7, 18, 0.46));
  cursor: pointer;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  padding-left: 7px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.36);
  font-size: 38px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-info {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 26px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  border-radius: 22px;
  background: #fee2e2;
}

.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-copy .eyebrow {
  color: var(--brand);
}

.lead {
  max-width: 780px;
  margin: 0 0 20px;
  color: #374151;
  font-size: 19px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.meta-list li {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fafb;
}

.meta-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.meta-list strong {
  display: block;
  margin-top: 4px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 32px;
}

.story-card {
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.search-hero .big-search {
  max-width: 760px;
  margin-top: 28px;
}

.site-footer {
  margin-top: 46px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 48px 0;
}

.site-footer p {
  color: #9ca3af;
  margin: 12px 0 0;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.site-footer a:hover {
  color: #fca5a5;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 16px;
  text-align: center;
  color: #9ca3af;
}

.is-filtered-out {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .movie-grid,
  .page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-grid,
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-container {
    min-height: auto;
    padding: 52px 0 76px;
  }

  .hero-slide,
  .hero-slide.is-active,
  .category-hero-grid,
  .detail-info,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .category-hero-poster {
    min-height: 360px;
  }

  .hero-dots {
    left: 16px;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .channel-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-shell {
    min-height: 64px;
  }

  .brand-text small {
    display: none;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .big-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .big-search button {
    min-height: 48px;
  }

  .movie-grid,
  .compact-grid,
  .page-grid,
  .category-grid,
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .card-content {
    padding: 12px;
  }

  .section-heading,
  .with-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .category-filter {
    width: 100%;
  }

  .channel-card {
    grid-column: span 2;
  }

  .detail-info {
    padding: 16px;
  }

  .detail-poster {
    min-height: 420px;
  }

  .meta-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: auto 72px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-thumb {
    width: 72px;
  }
}
