:root {
  --brand: #0891b2;
  --brand-dark: #0e7490;
  --brand-deep: #155e75;
  --accent: #22d3ee;
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #ffffff;
  --soft: #f1f5f9;
  --line: #e2e8f0;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--brand-deep));
  box-shadow: 0 8px 28px rgba(8, 145, 178, 0.24);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--brand-deep);
  background: white;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35), 0 8px 22px rgba(0,0,0,0.12);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a {
  color: rgba(255,255,255,0.92);
  transition: color .2s ease, transform .2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: white;
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search,
.search-inline {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.search-inline input,
.page-search input {
  width: 260px;
  border: 1px solid rgba(255,255,255,0.35);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  color: white;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

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

.header-search input:focus,
.search-inline input:focus {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.72);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(255,255,255,0.18);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 16px 0 20px;
}

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

.mobile-links {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.hero {
  position: relative;
  height: min(720px, 70vh);
  min-height: 520px;
  overflow: hidden;
  color: white;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08);
}

.hero-slide img.image-missing {
  opacity: 0;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.16)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12) 50%, rgba(2, 6, 23, 0.2));
  z-index: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f172a, #155e75 42%, #0e7490 100%);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: var(--brand);
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 900px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 0 0 26px;
  max-width: 720px;
  color: rgba(255,255,255,0.86);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: var(--brand);
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.32);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-ghost {
  color: white;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 76px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 99px;
  background: rgba(255,255,255,0.38);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.hero-dot.active {
  width: 34px;
  background: white;
}

.section {
  padding: 54px 0;
}

.section-tight {
  padding: 34px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.link-more {
  color: var(--brand-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(8, 145, 178, 0.34);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #164e63, #0f172a 70%);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .2s ease;
}

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

.poster img.image-missing {
  opacity: 0;
}

.poster-label {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(2,6,23,0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px;
  flex: 1;
}

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--brand-deep);
  background: #cffafe;
  font-weight: 750;
}

.movie-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 750;
}

.category-card {
  padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

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

.page-hero {
  padding: 58px 0 38px;
  color: white;
  background:
    radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #155e75 46%, #0891b2);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255,255,255,0.84);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  margin-top: -24px;
  position: relative;
  z-index: 5;
}

.filter-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow);
}

.page-search input {
  width: 100%;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--soft);
}

.page-search input::placeholder {
  color: #94a3b8;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  background: white;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
}

.empty-state {
  display: none;
  padding: 44px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: white;
}

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

.player-card {
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(8,145,178,0.18), rgba(2,6,23,0.48));
  transition: opacity .2s ease;
}

.player-box.is-playing .player-overlay {
  opacity: 0;
}

.play-button {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--brand);
  box-shadow: 0 16px 34px rgba(8,145,178,0.35);
  cursor: pointer;
  pointer-events: auto;
}

.play-button svg {
  margin-left: 4px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  max-width: calc(100% - 36px);
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,0.92);
  background: rgba(2,6,23,0.68);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.player-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  background: #020617;
}

.player-tool {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  min-height: 38px;
  padding: 0 14px;
  color: white;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
}

.detail-title {
  margin: 20px 0 12px;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.detail-lead {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.content-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}

.content-card h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 25px;
  letter-spacing: -0.02em;
}

.content-card p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.9;
}

.info-panel {
  padding: 22px;
}

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

.info-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list dt {
  color: var(--muted);
  font-weight: 750;
}

.info-list dd {
  margin: 0;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 76px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #164e63, #0f172a);
}

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

.rank-thumb img.image-missing {
  opacity: 0;
}

.rank-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

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

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

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 14px;
  color: white;
}

.footer-grid p,
.footer-grid li {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(148,163,184,0.18);
  padding: 20px 0;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: auto;
    min-height: 580px;
  }

  .hero-content {
    padding-bottom: 92px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 38px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .brand {
    font-size: 19px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-copy {
    padding-top: 80px;
  }

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

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

  .card-body {
    padding: 14px;
  }

  .movie-title {
    font-size: 16px;
  }

  .movie-desc {
    -webkit-line-clamp: 2;
  }

  .category-card,
  .content-card,
  .info-panel {
    padding: 20px;
  }

  .rank-card {
    grid-template-columns: 44px 64px 1fr;
  }

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