* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-soft: #0d111c;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: #111827;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f9fafb;
  --muted: #a3aab8;
  --muted-2: #6b7280;
  --red: #dc2626;
  --red-2: #ef4444;
  --orange: #f97316;
  --yellow: #facc15;
  --blue: #60a5fa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(220, 38, 38, 0.2), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.16), transparent 30rem),
    linear-gradient(180deg, #111827 0%, #05070d 42%, #0a0d14 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.brand-text {
  font-size: clamp(20px, 2.3vw, 28px);
  background: linear-gradient(90deg, #ef4444, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  color: #d1d5db;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.large-search input,
.inline-filter input {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 24, 39, 0.75);
  color: var(--text);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 240px;
  padding: 10px 16px;
}

.header-search input:focus,
.large-search input:focus,
.inline-filter input:focus {
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18);
  background: rgba(17, 24, 39, 0.98);
}

.header-search button,
.large-search button,
.inline-filter button,
.btn-primary,
.btn-secondary,
.text-link {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.large-search button,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.header-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.large-search button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 9px 14px;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.header-categories {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 12px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.header-categories a {
  flex: 0 0 auto;
  color: #cbd5e1;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-categories a:hover {
  color: #fff;
  background: rgba(220, 38, 38, 0.3);
}

.hero-slider {
  position: relative;
  height: min(760px, 76vh);
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.16) 100%),
    linear-gradient(0deg, rgba(5, 7, 13, 1) 0%, rgba(5, 7, 13, 0.4) 42%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2));
  bottom: 90px;
  width: min(760px, calc(100% - 48px));
}

.hero-label,
.detail-label,
.page-hero span,
.section-title span,
.category-panel-copy span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 720px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  margin: 0 0 20px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.hero-tags span {
  color: #f9fafb;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1240px) / 2));
  bottom: 54px;
  display: flex;
  gap: 9px;
}

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--red-2);
}

.hero-search-panel,
.section-wrap,
.page-main,
.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-search-panel {
  position: relative;
  z-index: 3;
  margin-top: -42px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
}

.hero-search-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.hero-search-panel p {
  margin: 0;
  color: var(--muted);
}

.large-search,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.large-search input,
.inline-filter input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.large-search button,
.inline-filter button {
  padding: 14px 20px;
}

.chip-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-top: 4px;
}

.chip-row a {
  flex: 0 0 auto;
  color: #e5e7eb;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.chip-row a:hover {
  background: rgba(220, 38, 38, 0.3);
}

.section-wrap {
  padding: 76px 0 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
}

.section-title h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-title a,
.text-link {
  color: #ffb4a4;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(31, 41, 55, 0.86);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(249, 115, 22, 0.16));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
}

.card-body {
  padding: 16px;
}

.card-kicker,
.card-meta,
.rank-copy div,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
}

.card-kicker a {
  color: #fb923c;
  font-weight: 900;
}

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

.movie-card h3 a:hover,
.rank-copy h3 a:hover {
  color: #fb7185;
}

.movie-card p,
.rank-copy p,
.category-panel p,
.page-hero p,
.detail-one-line,
.detail-content p {
  color: var(--muted);
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.glass-section,
.red-panel {
  margin-top: 76px;
  padding: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.18), rgba(88, 28, 135, 0.14));
  box-shadow: var(--shadow);
}

.red-panel {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.28), rgba(124, 45, 18, 0.18));
}

.compact-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.compact-card {
  flex: 0 0 188px;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.compact-card span {
  display: block;
  color: #f9fafb;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 128px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.7);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(31, 41, 55, 0.85);
  transform: translateY(-2px);
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.rank-copy p {
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-main {
  padding-bottom: 76px;
}

.page-hero {
  margin-top: 38px;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(220, 38, 38, 0.28), transparent 24rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(8, 12, 22, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  font-size: 18px;
}

.category-list {
  display: grid;
  gap: 22px;
}

.category-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.72);
}

.category-panel h2 {
  margin: 14px 0 10px;
  font-size: clamp(24px, 3vw, 40px);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.inline-filter {
  max-width: 720px;
  margin-top: 24px;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(17, 24, 39, 0.72);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 26px 0;
  color: var(--muted);
}

.breadcrumb a {
  color: #fca5a5;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 0%, rgba(220, 38, 38, 0.3), transparent 26rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(3, 7, 18, 0.9));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 5.5vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 850px;
  font-size: 19px;
  margin: 0 0 18px;
}

.detail-meta span,
.card-meta span,
.rank-copy div span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.player-section {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(17, 24, 39, 0.8);
  box-shadow: var(--shadow);
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 36px);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(220, 38, 38, 0.38);
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.72);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  font-size: 17px;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 84px;
  padding: 44px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.9fr;
  gap: 38px;
}

.footer-brand {
  font-size: 24px;
  color: #fff;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
}

.site-footer p {
  margin: 12px 0 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-2);
}

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

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

  .rank-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    order: 3;
    width: 100%;
    display: none;
    margin-left: 0;
    padding: 0 0 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
  }

  .header-categories {
    padding-bottom: 10px;
  }

  .hero-slider {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    bottom: 86px;
  }

  .hero-dots {
    left: 24px;
    right: auto;
  }

  .hero-search-panel {
    grid-template-columns: 1fr;
  }

  .large-search,
  .inline-filter {
    align-items: stretch;
    flex-direction: column;
  }

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

  .category-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 300px;
  }

  .rank-item {
    grid-template-columns: 44px 94px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

@media (max-width: 540px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 600px;
  }

  .hero-content h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .category-preview {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 14px;
  }

  .rank-item {
    grid-template-columns: 38px 1fr;
  }

  .rank-poster {
    display: none;
  }

  .player-section {
    padding: 12px;
  }

  .player-overlay span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
