:root {
  --page-bg: #f8fafc;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --brand: #f59e0b;
  --brand-dark: #ea580c;
  --brand-soft: #fff7ed;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(234, 88, 12, 0.96));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.22);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 15px;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

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

.header-search input,
.mobile-search input,
.library-search-box input {
  width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  outline: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

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

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #ffffff;
  color: var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  width: 100%;
}

.hero-slider {
  position: relative;
  height: min(74vh, 720px);
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 22%, rgba(245, 158, 11, 0.35), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.74) 45%, rgba(17, 24, 39, 0.28)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fde68a;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-desc {
  width: min(720px, 100%);
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.2vw, 25px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.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: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(234, 88, 12, 0.32);
}

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

.primary-btn.small {
  min-height: 42px;
  padding: 0 18px;
}

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

.text-link {
  min-height: 40px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

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

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

.intro-strip {
  margin-top: -54px;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 32px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.intro-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.04em;
}

.intro-copy p {
  margin: 0;
  color: var(--muted);
}

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

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

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-weight: 900;
}

.heading-line {
  display: block;
  width: 52px;
  height: 5px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px 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(245, 158, 11, 0.34);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.15);
}

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

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

.movie-card:hover .cover-link img,
.category-tile:hover img,
.category-card-large:hover img,
.ranking-cover:hover img {
  transform: scale(1.05);
}

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.card-title a:hover,
.ranking-body a:hover,
.category-card-body a:hover {
  color: var(--brand-dark);
}

.card-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.warm-panel {
  width: min(1180px, calc(100% - 32px));
  padding: 38px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
}

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

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

.movie-card.compact .cover-link {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.compact .card-desc {
  min-height: auto;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: var(--radius-lg);
  background: #111827;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

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

.category-tile:hover img {
  opacity: 0.72;
}

.category-tile span,
.category-tile p {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 70px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  bottom: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.ranking-panel {
  padding-top: 30px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 72px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(6px);
  background: var(--brand-soft);
}

.rank-no,
.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #ffffff;
  font-weight: 900;
}

.rank-no {
  width: 42px;
  height: 42px;
}

.rank-row img {
  width: 72px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 0;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
    linear-gradient(135deg, #111827, #1e293b 55%, #92400e);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 46px;
}

.compact-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.06em;
}

.compact-hero p {
  width: min(720px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.library-search-box input {
  width: min(420px, 72vw);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.no-result {
  display: none;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--muted);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.no-result.is-visible {
  display: block;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
  min-height: 260px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.category-card-cover {
  overflow: hidden;
  background: #111827;
}

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

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

.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

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

.mini-thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.mini-thumbs img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-cards {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 62px 126px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ranking-number {
  width: 50px;
  height: 50px;
}

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

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

.ranking-body h2 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.ranking-body p {
  margin: 0 0 10px;
  color: #4b5563;
}

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

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

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
  z-index: 1;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: #020617;
  cursor: pointer;
}

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

.player-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.play-circle {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 44px rgba(234, 88, 12, 0.36);
}

.detail-copy {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-line {
  margin: 0 0 18px;
  color: #374151;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 800;
  font-size: 13px;
}

.tag-row.large span {
  padding: 7px 12px;
  font-size: 14px;
}

.detail-body {
  padding-top: 42px;
}

.detail-article {
  padding: 34px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.detail-article p {
  margin: 0 0 26px;
  color: #374151;
  font-size: 17px;
  text-align: justify;
}

.detail-article p:last-child {
  margin-bottom: 0;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  gap: 18px;
}

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

.footer-inner p {
  width: min(720px, 100%);
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

.copyright {
  font-size: 14px;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .intro-strip,
  .section-heading,
  .compact-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .split-grid,
  .category-list-large {
    grid-template-columns: 1fr;
  }

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

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

  .category-card-cover {
    height: 260px;
  }

  .ranking-card {
    grid-template-columns: 46px 96px minmax(0, 1fr);
    gap: 14px;
  }

  .ranking-number {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 620px) {
  .header-inner {
    height: 64px;
  }

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

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

  .hero-desc {
    font-size: 17px;
  }

  .content-section,
  .breadcrumb,
  .page-hero,
  .detail-hero {
    width: min(100% - 22px, 1180px);
  }

  .content-section {
    padding: 36px 0;
  }

  .intro-strip,
  .warm-panel,
  .compact-hero,
  .detail-copy,
  .detail-article {
    padding: 22px;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

  .player-card {
    min-height: 300px;
  }

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .ranking-card {
    grid-template-columns: 42px 1fr;
  }

  .ranking-cover {
    display: none;
  }
}
