:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-50: #ecfdf5;
  --accent-600: #059669;
  --accent-700: #047857;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #f9fafb;
  color: var(--secondary-800);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "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;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--secondary-200);
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--secondary-900);
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.25);
}

.logo-text {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--secondary-700);
  font-weight: 650;
}

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

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-600);
}

.header-search {
  position: relative;
  width: min(280px, 28vw);
}

.header-search input,
.inline-search input,
.filter-input {
  width: 100%;
  border: 1px solid var(--secondary-300);
  border-radius: 13px;
  padding: 10px 14px;
  color: var(--secondary-800);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.inline-search input:focus,
.filter-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--secondary-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--secondary-700);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--secondary-200);
  background: var(--white);
}

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

.mobile-panel-inner {
  display: grid;
  gap: 14px;
  padding: 16px 0 22px;
}

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

.mobile-panel a {
  padding: 10px 0;
  color: var(--secondary-700);
  font-weight: 650;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 45%, var(--secondary-900));
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.18;
  pointer-events: none;
}

.hero::before {
  top: -120px;
  right: 12%;
  background: var(--primary-200);
}

.hero::after {
  bottom: -160px;
  left: 4%;
  background: var(--accent-600);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 52px;
  align-items: center;
  padding: 72px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--primary-100);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: var(--primary-200);
}

.hero-desc {
  max-width: 690px;
  margin: 0;
  color: var(--primary-100);
  font-size: 18px;
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-600);
  color: var(--white);
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--primary-700);
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.28);
}

.btn-light {
  background: var(--white);
  color: var(--primary-700);
}

.btn-light:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-tags a,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--secondary-700);
  background: var(--secondary-100);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease;
}

.hero-tags a:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-slider {
  position: relative;
  min-height: 460px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(24px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-card {
  position: relative;
  height: 460px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--secondary-900);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

.hero-card:hover img {
  transform: scale(1.045);
}

.hero-card-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.04));
}

.hero-card-content {
  padding: 28px;
}

.hero-card-content h2 {
  margin: 12px 0 8px;
  font-size: 26px;
  line-height: 1.25;
}

.hero-card-content p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--secondary-300);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.play-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-card:hover .play-orb {
  color: var(--white);
  background: var(--primary-600);
  transform: translate(-50%, -50%) scale(1.08);
}

.hero-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  gap: 8px;
  z-index: 4;
}

.hero-control {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots {
  position: absolute;
  left: 28px;
  bottom: 22px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

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

.hero-dot.is-active {
  width: 26px;
  background: var(--white);
}

.section {
  padding: 58px 0;
}

.section-white {
  background: var(--white);
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  color: var(--secondary-900);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
  margin: 9px 0 0;
  color: var(--secondary-500);
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--secondary-100);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: var(--shadow-card);
}

.movie-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--secondary-900);
}

.movie-cover.landscape {
  aspect-ratio: 16 / 9;
}

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

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

.cover-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

.badge-row {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.badge.primary {
  background: var(--primary-600);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--secondary-900);
  font-size: 17px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--primary-600);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--secondary-500);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--secondary-600);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--secondary-100);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  border-radius: 18px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  color: var(--secondary-900);
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: var(--secondary-600);
}

.page-hero {
  padding: 54px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 48%, var(--secondary-900));
}

.page-title {
  max-width: 860px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--primary-100);
  font-size: 14px;
}

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

.page-hero .page-title h1,
.page-hero .page-title p {
  color: var(--white);
}

.page-hero .page-title p {
  color: var(--primary-100);
}

.list-tools {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-tab {
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--secondary-700);
  background: var(--white);
  font-weight: 750;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.filter-tab.is-active,
.filter-tab:hover {
  border-color: var(--primary-600);
  color: var(--white);
  background: var(--primary-600);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 132px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--secondary-100);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: var(--secondary-900);
}

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

.rank-content h2,
.rank-content h3 {
  margin: 0 0 8px;
  color: var(--secondary-900);
  font-size: 20px;
}

.rank-content p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--secondary-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.player-shell {
  overflow: hidden;
  border-radius: 24px;
  background: var(--secondary-900);
  box-shadow: var(--shadow-card);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.22));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.player-button:hover {
  color: var(--white);
  background: var(--primary-600);
  transform: scale(1.08);
}

.player-titlebar {
  padding: 20px 24px;
  color: var(--white);
  background: var(--secondary-900);
}

.player-titlebar h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
}

.player-titlebar p {
  margin: 0;
  color: var(--secondary-300);
}

.content-card {
  padding: 24px;
  border: 1px solid var(--secondary-100);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.content-card + .content-card {
  margin-top: 22px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--secondary-900);
  font-size: 23px;
}

.content-card p {
  margin: 0;
  color: var(--secondary-700);
  line-height: 1.85;
}

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

.info-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  color: var(--secondary-700);
  font-size: 15px;
}

.info-row strong {
  color: var(--secondary-900);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.side-card {
  position: sticky;
  top: 88px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--secondary-50);
  transition: background 0.2s ease;
}

.related-item:hover {
  background: var(--primary-50);
}

.related-thumb {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  background: var(--secondary-900);
}

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

.related-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--secondary-900);
  font-weight: 800;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.related-meta {
  margin-top: 5px;
  color: var(--secondary-500);
  font-size: 13px;
}

.search-results {
  min-height: 280px;
}

.empty-state {
  padding: 42px;
  border: 1px dashed var(--secondary-300);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--secondary-500);
  text-align: center;
}

.pagination-note {
  margin-top: 22px;
  color: var(--secondary-500);
  text-align: center;
}

.site-footer {
  background: var(--secondary-900);
  color: var(--secondary-300);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-grid h3 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 17px;
}

.footer-grid p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--secondary-400);
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--secondary-300);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-200);
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--secondary-500);
  text-align: center;
}

@media (max-width: 1080px) {
  .hero-inner,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }

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

@media (max-width: 820px) {
  .main-nav,
  .site-header .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-inner {
    padding: 48px 0 58px;
    gap: 34px;
  }

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

  .hero-card {
    height: 390px;
  }

  .section-header,
  .list-tools {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-header {
    display: grid;
  }

  .filter-tabs {
    justify-content: flex-start;
  }

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

  .rank-item {
    grid-template-columns: 44px 100px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    width: fit-content;
  }

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

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

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

  .hero h1 {
    font-size: 34px;
  }

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

  .hero-actions .btn {
    width: 100%;
  }

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

  .hero-card {
    height: 330px;
    border-radius: 22px;
  }

  .hero-card-content {
    padding: 22px;
  }

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

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

  .rank-poster {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 8;
  }

  .player-titlebar h1 {
    font-size: 23px;
  }

  .content-card {
    padding: 20px;
  }
}
