:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --orange: #f97316;
  --shadow: 0 20px 45px 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: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
  font-size: 16px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(241, 245, 249, 0.9);
  border-radius: 999px;
}

.nav-link,
.mobile-link,
.quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link {
  padding: 9px 16px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: var(--blue);
}

.quick-nav {
  border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.quick-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.quick-link {
  white-space: nowrap;
  padding: 7px 13px;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  font-size: 13px;
}

.quick-link:hover {
  color: #ffffff;
  background: #0f766e;
}

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

.menu-button span {
  width: 18px;
  height: 2px;
  background: var(--blue);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.mobile-link {
  padding: 12px;
  border-radius: 16px;
  background: #f1f5f9;
}

.mobile-link.is-active {
  color: #ffffff;
  background: var(--blue);
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.35), transparent 36%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.80), rgba(15, 23, 42, 0.45));
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  min-height: 620px;
  margin: 0 auto;
  padding: 72px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.6fr);
  align-items: center;
  gap: 42px;
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  padding: 8px 14px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero-content h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-content h1 span {
  display: block;
  color: #67e8f9;
}

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.8;
}

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

.primary-button,
.secondary-button,
.section-link,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button {
  padding: 13px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.secondary-button {
  padding: 13px 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-card {
  position: relative;
  padding: 12px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
}

.hero-card-info {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  padding: 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.hero-card-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.hero-card-info span {
  color: #cbd5e1;
  font-size: 14px;
}

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

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

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

.page-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 70px;
}

.full-section {
  padding: 58px 0;
}

.tint-section {
  margin: 58px 0;
  padding: 58px 0;
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
}

.tint-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: #0f172a;
}

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

.section-link {
  flex: 0 0 auto;
  padding: 10px 18px;
  color: var(--blue);
  background: #dbeafe;
}

.section-link:hover {
  color: #ffffff;
  background: var(--blue);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: 0.24s ease;
}

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

.movie-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #cbd5e1, #e2e8f0);
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge,
.poster-year,
.poster-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  font-size: 12px;
}

.poster-year {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  font-size: 12px;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  backdrop-filter: blur(10px);
  transition: 0.25s ease;
}

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

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

.movie-card-body h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 46px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta-row span:last-child {
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 9px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.rank-feature {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 30px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.rank-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.94));
}

.rank-feature-content {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  color: #ffffff;
}

.rank-feature-content h3 {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 950;
}

.rank-feature-content p {
  color: #dbeafe;
  line-height: 1.8;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: 0.22s ease;
}

.mini-card:hover {
  transform: translateX(6px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.10);
}

.mini-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.mini-thumb img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.rank-number {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  border-radius: 10px;
  font-weight: 950;
}

.mini-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-info p {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-info span {
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  color: #ffffff;
  border-radius: 26px;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.22);
  transition: 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7c3aed, #d946ef);
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.75;
}

.page-hero {
  margin-bottom: 32px;
  padding: 44px;
  color: #ffffff;
  border-radius: 32px;
  background:
    radial-gradient(circle at 85% 20%, rgba(103, 232, 249, 0.35), transparent 30%),
    linear-gradient(135deg, #0f172a, #1d4ed8 55%, #0e7490);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.filter-bar,
.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.search-panel input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  outline: none;
  color: #0f172a;
  background: #f8fafc;
}

.filter-bar input:focus,
.search-panel input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.search-button {
  height: 48px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--blue);
}

.hidden-card {
  display: none;
}

.empty-state {
  display: none;
  padding: 44px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  border-radius: 24px;
}

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

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

.player-panel,
.detail-panel,
.side-panel {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.player-box {
  position: relative;
  background: #020617;
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.30);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.35);
  font-size: 30px;
}

.detail-panel {
  padding: 28px;
  margin-top: 22px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

.detail-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-subtitle {
  margin: 16px 0 22px;
  color: #64748b;
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 8px 12px;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.detail-content h2 {
  margin: 28px 0 12px;
  font-size: 26px;
  font-weight: 950;
}

.detail-content p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.95;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.side-panel {
  padding: 20px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 950;
}

.side-panel .mini-card {
  grid-template-columns: 92px minmax(0, 1fr);
  padding: 10px;
  box-shadow: none;
}

.side-panel .mini-info p {
  display: none;
}

.search-results {
  margin-top: 28px;
}

.search-results .movie-grid {
  margin-top: 18px;
}

.site-footer {
  margin-top: 70px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  max-width: 620px;
  margin: 12px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 22px;
}

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

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

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

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

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

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

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

  .quick-nav-inner {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .hero-slider,
  .hero-inner {
    min-height: 720px;
  }

  .hero-inner {
    padding-top: 48px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-content p {
    font-size: 17px;
  }

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

  .movie-card-body {
    padding: 14px;
  }

  .section-heading,
  .footer-inner,
  .filter-bar,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-inner {
    display: flex;
  }

  .page-hero {
    padding: 30px;
    border-radius: 26px;
  }

  .mini-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

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

  .horizontal-scroll {
    grid-auto-columns: 82%;
  }

  .hero-actions {
    flex-direction: column;
  }

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