:root {
  --color-primary: #1e3a8a;
  --color-primary-dark: #172554;
  --color-primary-light: #1d4ed8;
  --color-accent: #0ea5e9;
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-secondary: #64748b;
  --color-border: #e2e8f0;
  --color-footer: #0f172a;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-light));
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.24);
}

.brand-text {
  font-size: 22px;
  letter-spacing: -0.02em;
}

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

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

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

.nav-link-active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-primary);
}

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

.header-search input,
.mobile-nav input,
.filter-control,
.filter-select {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-control:focus,
.filter-select:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.header-search button,
.mobile-nav button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--color-primary);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #eef2ff;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--color-primary);
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: #f1f5f9;
  color: var(--color-primary);
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #172554 0%, #1e3a8a 52%, #1d4ed8 100%);
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.42), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.05));
  pointer-events: none;
}

.hero-shell {
  position: relative;
  min-height: 580px;
  display: grid;
  align-items: center;
  padding: 62px 0;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.62fr);
  gap: 44px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.45s ease both;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 22px 0 10px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  color: #bfdbfe;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.15;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 19px;
}

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

.hero-tags span,
.footer-badges span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn-primary {
  color: var(--color-primary-dark);
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-plain:hover {
  transform: translateY(-2px);
}

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

.btn-plain {
  color: #fff;
  background: var(--color-primary);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.36), transparent 55%);
}

.hero-play,
.video-card-play,
.player-overlay-button {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.hero-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  font-size: 30px;
}

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

.hero-controls button {
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 25px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 99px;
  padding: 0;
  opacity: 0.52;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
  opacity: 1;
}

.main-content {
  padding: 54px 0 78px;
}

.content-section {
  margin-bottom: 64px;
}

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

.section-title,
.page-title {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-subtitle,
.page-subtitle {
  margin: 8px 0 0;
  color: var(--color-text-secondary);
}

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

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

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

.video-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(30, 58, 138, 0.28);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.video-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #dbeafe;
}

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

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

.video-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.44), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.video-card:hover .video-card-media::after {
  opacity: 1;
}

.video-card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.video-card:hover .video-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.badge-rating,
.rank-mark {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(14, 165, 233, 0.94);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.22);
}

.rank-mark {
  left: 12px;
  right: auto;
  background: rgba(15, 23, 42, 0.80);
}

.video-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.video-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.video-card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: auto;
  color: #64748b;
  font-size: 12px;
}

.badge-region,
.badge-year,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.badge-region {
  color: #1e3a8a;
  background: #dbeafe;
}

.badge-year {
  color: #0369a1;
  background: #e0f2fe;
}

.video-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-pill {
  color: #475569;
  background: #f1f5f9;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: -38px;
  margin-bottom: 58px;
  position: relative;
  z-index: 5;
}

.stat-card {
  border-radius: 22px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  color: var(--color-primary);
  font-size: 30px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-weight: 700;
}

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

.category-tile {
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  min-height: 162px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-light));
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(30, 58, 138, 0.22);
}

.category-tile h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: #dbeafe;
}

.category-count {
  display: inline-flex;
  margin-top: 18px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  padding: 56px 0;
}

.page-hero .page-title,
.page-hero .page-subtitle {
  color: #fff;
}

.page-hero .page-subtitle {
  color: #dbeafe;
  max-width: 800px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(120px, 170px));
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.filter-control,
.filter-select {
  width: 100%;
  padding: 11px 12px;
}

.result-count {
  margin: -8px 0 22px;
  color: var(--color-text-secondary);
  font-weight: 700;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.ranking-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--color-primary);
  font-size: 18px;
  font-weight: 900;
}

.ranking-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
}

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

.ranking-copy h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-copy p {
  margin: 0;
  color: var(--color-text-secondary);
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

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

.player-card,
.detail-card,
.side-card,
.text-page-card {
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.player-card {
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.18));
  z-index: 5;
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.player-overlay-button {
  width: 78px;
  height: 78px;
  font-size: 28px;
}

.player-overlay-text {
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  font-weight: 800;
}

.detail-card {
  padding: 26px;
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #334155;
  background: #f1f5f9;
  font-weight: 800;
  font-size: 13px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #334155;
  white-space: pre-line;
}

.side-card {
  overflow: hidden;
}

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

.side-card-body {
  padding: 18px;
}

.side-card-body h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.side-card-body dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.side-card-body dt {
  color: var(--color-text-secondary);
  font-weight: 800;
}

.side-card-body dd {
  margin: 0;
  color: var(--color-text);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 700;
}

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

.text-page-card {
  padding: 30px;
  max-width: 920px;
}

.text-page-card h2 {
  margin: 28px 0 10px;
}

.text-page-card h2:first-child {
  margin-top: 0;
}

.text-page-card p,
.text-page-card li {
  color: #334155;
}

.text-page-card ul {
  padding-left: 1.2em;
}

.site-footer {
  color: #cbd5e1;
  background: var(--color-footer);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 34px;
  padding: 48px 0 36px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 20px 0;
}

.footer-bottom p {
  font-size: 14px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .video-grid,
  .video-grid.compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-shell {
    min-height: auto;
    padding: 42px 0 54px;
  }

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

  .hero-poster {
    max-width: 360px;
    margin: 0 auto;
    transform: none;
  }

  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
  }

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

  .side-card {
    max-width: 420px;
  }

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

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

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

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .section-heading,
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .video-grid,
  .video-grid.compact-grid,
  .category-grid,
  .stat-strip,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 52px 78px minmax(0, 1fr);
  }

  .ranking-item .btn-plain {
    grid-column: 1 / -1;
  }

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