:root {
  --color-bg: #f8fafc;
  --color-panel: #ffffff;
  --color-panel-soft: #f0fdfa;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-primary: #0f766e;
  --color-primary-bright: #06b6d4;
  --color-dark: #0f172a;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-bright));
  box-shadow: 0 10px 25px rgba(20, 184, 166, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong,
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 13px;
  color: #475569;
  font-weight: 650;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background: #ecfeff;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 9px 13px;
  color: var(--color-primary);
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #07111f;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.25) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 92px;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.20);
  color: #99f6e4;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-bright));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.28);
}

.btn-secondary {
  color: #e0f2fe;
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.hero-poster {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  padding: 0;
}

.hero-dot.active {
  width: 36px;
  background: #2dd4bf;
}

.quick-search {
  position: relative;
  z-index: 4;
  margin-top: -42px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.search-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  outline: none;
  background: #ffffff;
  color: var(--color-text);
  padding: 13px 16px;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
}

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

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

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-lead {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--color-muted);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(20, 184, 166, 0.38);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
  transform: translateY(-6px);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.card-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .card-poster img {
  transform: scale(1.05);
  filter: brightness(0.82);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  height: 34px;
  padding: 0 14px;
  background: rgba(8, 145, 178, 0.88);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: #cbd5e1;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

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

.card-body p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

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

.tag-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.category-card span {
  margin-top: 18px;
  color: var(--color-primary);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 94px minmax(0, 1fr) 132px;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 12px;
  box-shadow: var(--shadow-card);
}

.rank-index {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #06b6d4);
  color: #ffffff;
  font-weight: 900;
}

.rank-thumb img {
  width: 94px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.rank-info p {
  margin: 0;
  color: var(--color-muted);
}

.rank-score {
  text-align: right;
  color: var(--color-primary);
  font-size: 24px;
  font-weight: 900;
}

.page-hero {
  background: radial-gradient(circle at top left, rgba(45, 212, 191, 0.20), transparent 30%), linear-gradient(135deg, #0f172a, #134e4a 58%, #083344);
  color: #ffffff;
  padding: 74px 0;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 12px;
  margin-bottom: 28px;
}

.empty-state {
  display: none;
  border: 1px dashed #99f6e4;
  border-radius: var(--radius-md);
  background: #f0fdfa;
  color: var(--color-primary);
  padding: 22px;
  text-align: center;
  font-weight: 700;
}

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

.detail-hero {
  background: linear-gradient(135deg, #0f172a, #0f766e 64%, #0891b2);
  color: #ffffff;
  padding: 62px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.26);
}

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

.detail-copy p {
  color: #dbeafe;
  font-size: 17px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 7px 12px;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bae6fd;
  font-size: 14px;
}

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

.player-section {
  padding: 58px 0 30px;
  background: #ffffff;
}

.player-shell {
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

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

.player-button {
  position: relative;
  z-index: 3;
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #06b6d4);
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 22px 45px rgba(8, 145, 178, 0.36);
}

.content-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  background: #ffffff;
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--shadow-card);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 24px;
  color: #334155;
  white-space: pre-line;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

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

.site-footer p {
  max-width: 460px;
  color: #94a3b8;
}

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

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

.footer-bottom {
  margin-top: 38px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 20px;
  text-align: center;
  color: #94a3b8;
}

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

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

  .hero-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
    padding: 12px;
    box-shadow: var(--shadow-soft);
  }

  .nav-links.open {
    display: flex;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 58px 0 88px;
  }

  .search-panel,
  .filter-bar,
  .detail-grid,
  .rank-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

  .rank-score {
    text-align: left;
  }
}

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

  .brand-text small {
    display: none;
  }

  .container-custom {
    width: min(100% - 24px, 1180px);
  }
}
