:root {
  color-scheme: dark;
  --bg-0: #020617;
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 44%, var(--bg-0));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.42);
}

.brand-copy strong,
.footer-brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--soft);
  transition: 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #67e8f9;
  background: rgba(51, 65, 85, 0.7);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-search-form {
  position: relative;
}

.site-search-form input,
.filter-input,
.search-panel input,
.search-panel select {
  width: 240px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--text);
  outline: none;
  background: rgba(30, 41, 59, 0.72);
  transition: 0.2s ease;
}

.site-search-form input:focus,
.filter-input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.72);
}

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

.mobile-panel[hidden] {
  display: none;
}

.mobile-search input {
  width: 100%;
}

.mobile-nav {
  margin-top: 12px;
  align-items: stretch;
  flex-direction: column;
}

.page-main {
  min-height: 60vh;
}

.hero-slider {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: var(--bg-0);
}

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

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

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

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-slide::before {
  background: linear-gradient(0deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.62) 44%, rgba(15, 23, 42, 0.12));
}

.hero-slide::after {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.76));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  min-height: 74vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 100px 0 88px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin-top: 10px;
  font-size: clamp(30px, 4.8vw, 58px);
}

.hero-copy p {
  width: min(680px, 100%);
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.breadcrumb,
.detail-meta,
.card-meta,
.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin: 20px 0 28px;
}

.hero-meta span,
.detail-meta span,
.rank-num,
.card-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 45px rgba(34, 211, 238, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.38);
}

.btn-secondary {
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.btn-secondary:hover {
  color: #67e8f9;
  background: rgba(51, 65, 85, 0.78);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

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

.hero-dot {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
}

.hero-arrows {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  color: #67e8f9;
  background: rgba(30, 41, 59, 0.86);
}

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

.section.tint {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100% - 1180px) / 2));
  background: rgba(30, 41, 59, 0.34);
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
}

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 28px 80px rgba(34, 211, 238, 0.12), var(--shadow);
}

.card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #020617;
}

.movie-card-wide .poster-wrap,
.mini-card img,
.rank-card img {
  aspect-ratio: 16 / 9;
}

.poster-wrap img,
.category-card img,
.mini-card img,
.rank-card img,
.search-result img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.mini-card:hover img,
.rank-card:hover img,
.search-result:hover img {
  transform: scale(1.08);
}

.poster-wrap::after,
.rank-card figure::after,
.category-shade {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.1));
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: white;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin: 8px 0 0;
  font-size: 13px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  color: #a5f3fc;
  font-size: 12px;
  background: rgba(8, 145, 178, 0.16);
}

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

.category-card {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 20px;
}

.category-copy strong {
  display: block;
  font-size: 22px;
}

.category-copy em {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-style: normal;
  font-size: 14px;
  line-height: 1.55;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-num {
  width: 44px;
  height: 44px;
  justify-content: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
}

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

.rank-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  position: relative;
  padding: 78px max(16px, calc((100% - 1180px) / 2));
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 34%), linear-gradient(120deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
}

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

.page-hero p {
  width: min(760px, 100%);
  margin: 16px 0 0;
  color: var(--soft);
  line-height: 1.8;
  font-size: 17px;
}

.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.filter-input {
  width: min(460px, 100%);
}

.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.breadcrumb {
  margin-bottom: 22px;
  font-size: 14px;
}

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

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: end;
  margin-bottom: 32px;
}

.detail-header h1 {
  margin: 12px 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-header p {
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-poster {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

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

.player-shell {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 26px 90px rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.22));
  cursor: pointer;
  transition: 0.25s ease;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: white;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.42);
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 4;
  color: #fee2e2;
  text-align: center;
  font-size: 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 32px;
}

.content-card {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.68);
}

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

.content-card h2,
.content-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.88;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: 0.22s ease;
}

.mini-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
}

.mini-card img {
  border-radius: 14px;
}

.mini-card strong {
  display: block;
  line-height: 1.4;
}

.mini-card em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.search-results {
  display: grid;
  gap: 16px;
}

.search-result {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.68);
}

.search-result img {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
}

.search-result h2 {
  margin: 0;
  font-size: 22px;
}

.search-result p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state {
  padding: 38px;
  text-align: center;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #020617);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1fr 1.3fr;
  gap: 28px;
}

.footer-brand p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  align-items: flex-start;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  padding: 6px 0;
  margin-right: 18px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 1120px) {
  .desktop-nav,
  .nav-actions .site-search-form {
    display: none;
  }

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

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

  .detail-header,
  .content-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(340px, 100%);
  }
}

@media (max-width: 700px) {
  .nav-shell {
    height: 68px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .hero-slider,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding: 86px 0 78px;
  }

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

  .hero-arrows {
    display: none;
  }

  .section,
  .section.tint {
    padding-top: 46px;
    padding-bottom: 46px;
  }

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

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

  .rank-card,
  .search-result {
    grid-template-columns: 1fr;
  }

  .rank-card figure,
  .search-result img {
    width: 100%;
  }

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

  .play-button {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
