:root {
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --panel-soft: #f3f4f6;
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #f97316;
  --blue: #2563eb;
  --green: #16a34a;
  --purple: #7c3aed;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
  color: #ffffff;
}

.site-header.is-solid,
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.34);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--amber);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.site-header.is-solid .nav-search,
.site-header.is-scrolled .nav-search {
  border-color: var(--line);
  background: #f3f4f6;
}

.nav-search input {
  width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  padding: 8px 6px 8px 12px;
}

.nav-search input::placeholder {
  color: currentColor;
  opacity: 0.68;
}

.nav-search button,
.mobile-panel button,
.search-form button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--amber);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.mobile-panel button:hover,
.search-form button:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 10px;
}

.site-header.is-solid .menu-toggle,
.site-header.is-scrolled .menu-toggle {
  background: #f3f4f6;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
}

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

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  font-weight: 700;
}

.hero {
  position: relative;
  height: 700px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.68) 44%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 0 78px;
  color: #ffffff;
}

.hero-copy {
  max-width: 780px;
}

.pill-row,
.detail-tags,
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-row span,
.detail-tags span,
.card-badges span,
.card-meta span,
.category-kicker,
.search-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.pill-row span:nth-child(1),
.card-badges span:nth-child(1),
.category-kicker {
  background: var(--amber);
  color: #ffffff;
}

.pill-row span:nth-child(2),
.card-badges span:nth-child(2) {
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
}

.pill-row span:nth-child(3) {
  background: rgba(22, 163, 74, 0.92);
  color: #ffffff;
}

.pill-row span:nth-child(4) {
  background: rgba(124, 58, 237, 0.9);
  color: #ffffff;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  max-width: 900px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  margin: 0 0 28px;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
  background: var(--amber-dark);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.btn-light {
  color: var(--text);
  border-color: var(--line);
  background: #ffffff;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

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

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

.main-section {
  padding: 72px 0;
}

.main-section.soft {
  background: #ffffff;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  font-size: 22px;
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.25);
}

.section-head h1,
.section-head h2,
.section-title h2,
.inner-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.section-head p,
.section-title p,
.inner-hero p,
.category-card p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-card-large .card-cover {
  aspect-ratio: 4 / 5;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  transition: opacity 0.28s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-year {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.card-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .card-badges {
  opacity: 1;
  transform: translateY(0);
}

.card-badges span {
  padding: 5px 8px;
  font-size: 11px;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.small-card:hover h3 {
  color: var(--amber);
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.card-meta span {
  background: #fef3c7;
  color: #92400e;
  padding: 5px 9px;
  font-size: 12px;
}

.card-meta span + span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #f3f4f6;
  color: #4b5563;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: var(--radius);
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.16), rgba(217, 119, 6, 0));
}

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

.category-card h2,
.category-card h3 {
  margin: 22px 0 10px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 18px;
}

.category-link {
  color: var(--amber);
  font-weight: 900;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

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

.small-card {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.small-card a {
  display: grid;
  grid-template-columns: 54px 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.small-rank {
  display: grid;
  place-items: center;
  color: var(--amber);
  font-size: 18px;
}

.small-card img {
  width: 112px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.small-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  transition: color 0.2s ease;
}

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

.small-card span {
  color: #9ca3af;
  font-size: 13px;
}

.inner-hero {
  padding: 136px 0 54px;
  background:
    radial-gradient(circle at 20% 20%, rgba(217, 119, 6, 0.24), transparent 34%),
    linear-gradient(135deg, #111827, #1f2937 60%, #111827);
  color: #ffffff;
}

.inner-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  margin-bottom: 24px;
}

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

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.filter-row button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #4b5563;
  background: #f3f4f6;
  cursor: pointer;
  font-weight: 800;
}

.filter-row button.is-active {
  color: #ffffff;
  background: var(--amber);
}

.search-form {
  display: flex;
  max-width: 760px;
  gap: 12px;
  margin-top: 28px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 15px 18px;
  outline: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-panel {
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin-top: 0;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}

.search-chip {
  background: #fef3c7;
  color: #92400e;
}

.detail-hero {
  position: relative;
  padding: 126px 0 64px;
  color: #ffffff;
  background: #111827;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(2px);
}

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

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #111827 0%, rgba(17, 24, 39, 0.92) 45%, rgba(17, 24, 39, 0.6));
}

.detail-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

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

.detail-title h1 {
  margin: 16px 0;
  color: #ffffff;
}

.detail-title p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.9;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.detail-main {
  padding: 56px 0 72px;
}

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

.content-panel,
.side-panel,
.player-panel {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.content-panel,
.side-panel {
  padding: 28px;
}

.content-panel h2,
.side-panel h2,
.player-panel h2 {
  margin: 0 0 18px;
  font-size: 25px;
}

.content-panel p {
  color: #4b5563;
  line-height: 2;
}

.player-panel {
  overflow: hidden;
  margin-bottom: 28px;
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 20px 44px rgba(217, 119, 6, 0.4);
  font-size: 32px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover .play-circle {
  transform: scale(1.08);
  background: var(--amber-dark);
}

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

.info-list {
  display: grid;
  gap: 12px;
  color: #4b5563;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 12px;
}

.info-list strong {
  color: #111827;
}

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

.site-footer {
  color: #d1d5db;
  background: #111827;
  padding: 54px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 40px;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid a {
  display: block;
  margin: 10px 0;
  color: #d1d5db;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #fbbf24;
}

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

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

.empty-state {
  padding: 48px;
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 610px;
  }

  .hero-content {
    padding-bottom: 64px;
  }

  .hero-control {
    display: none;
  }

  .section-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

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

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

  .nav-wrap {
    min-height: 66px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero {
    height: 560px;
  }

  .hero h1,
  .hero h2 {
    font-size: 36px;
  }

  .hero p {
    font-size: 15px;
  }

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

  .small-card a {
    grid-template-columns: 42px 92px 1fr;
    gap: 10px;
  }

  .small-card img {
    width: 92px;
    height: 64px;
  }

  .search-form {
    flex-direction: column;
  }

  .content-panel,
  .side-panel {
    padding: 22px;
  }
}
