:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --panel: #ffffff;
  --night: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  font-size: 24px;
  line-height: 1;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--red);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.btn,
.player-cover span,
.filter-panel button {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.22);
}

.header-search button,
.mobile-search button {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--red);
}

.mobile-menu {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 12px 4px;
  font-weight: 700;
  color: #374151;
}

.mobile-link.is-active {
  color: var(--red);
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.mobile-search input {
  min-width: 0;
  padding: 10px 14px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: var(--night);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide:focus {
  outline: none;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 35%, rgba(249, 115, 22, 0.28), transparent 35%), linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.3) 100%);
}

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

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0 130px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.rank-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.3);
}

.btn.is-ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 46px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--red), var(--orange));
}

main {
  min-height: 70vh;
}

.section {
  padding: 74px 0;
}

.section.is-tight {
  padding-top: 42px;
}

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

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

.section-heading p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--red);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: var(--shadow);
}

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

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

.movie-card:hover .poster-link img,
.category-card:hover img {
  transform: scale(1.05);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  font-weight: 900;
  text-align: center;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span {
  padding: 3px 8px;
  background: #f3f4f6;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body h2 a:hover {
  color: var(--red);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--red-dark);
  background: #fee2e2;
  font-size: 12px;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 168px;
  overflow: hidden;
  background: var(--night);
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  transition: transform 0.35s ease;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card-body p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-card-body span {
  color: var(--red);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px auto;
  gap: 12px;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 16px;
}

.filter-panel button {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 34px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

.page-hero {
  padding: 72px 0 54px;
  color: #fff;
  background: radial-gradient(circle at 84% 20%, rgba(249, 115, 22, 0.45), transparent 28%), linear-gradient(135deg, #111827 0%, #7f1d1d 58%, #f97316 100%);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #fee2e2;
  font-size: 19px;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.rank-card {
  display: grid;
  grid-template-columns: 88px 132px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

.rank-poster {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-content h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.rank-content p {
  margin: 10px 0 0;
  color: var(--muted);
}

.rank-action {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--red);
  background: #fee2e2;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #fecaca;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero {
  padding: 54px 0;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  aspect-ratio: 3 / 4;
  background: #111827;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-title p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: 19px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.content-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.content-panel {
  padding: 28px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 18px;
  color: #374151;
}

.side-panel {
  padding: 20px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 74px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.32);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #020617;
  cursor: pointer;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: blur(1px);
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}

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

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

.compact-card .card-body h2 {
  font-size: 16px;
}

.site-footer {
  margin-top: 70px;
  padding: 54px 0 0;
  color: #e5e7eb;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
}

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

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 17px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #9ca3af;
}

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

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

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

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

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .brand-text {
    font-size: 20px;
  }

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

  .hero-content {
    padding: 70px 0 120px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

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

  .card-body {
    padding: 13px;
  }

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

  .rank-card {
    grid-template-columns: 54px 88px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 18px;
  }

  .rank-action {
    grid-column: 2 / -1;
    text-align: center;
  }

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

  .detail-cover {
    width: 220px;
  }

  .content-panel {
    padding: 20px;
  }

  .player-cover span {
    width: 72px;
    height: 72px;
  }

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

@media (max-width: 440px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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