:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0b1728;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111c2f;
  --line: rgba(148, 163, 184, 0.18);
  --text: #eef6ff;
  --muted: #9fb1c7;
  --muted-strong: #c7d2e3;
  --brand: #34d399;
  --brand-2: #22d3ee;
  --brand-3: #a78bfa;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 84% 8%, rgba(52, 211, 153, 0.14), transparent 34rem),
    linear-gradient(180deg, #08111f 0%, #0b1324 42%, #07111f 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 17, 31, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.logo span:last-child,
.footer-logo {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.24), rgba(34, 211, 238, 0.24));
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.dropdown-panel a,
.mobile-panel a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-panel a:hover,
.mobile-panel a:hover {
  color: #ffffff;
  background: rgba(52, 211, 153, 0.16);
}

.nav-dropdown {
  position: relative;
}

.dropdown-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 420px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12, 22, 38, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 0 0 1px var(--line);
}

.top-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 10px;
}

.top-search button,
.primary-button,
.secondary-button,
.play-button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
  padding: 8px 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.secondary-button {
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 0 0 1px var(--line);
}

.top-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.play-button:hover,
.search-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.18);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 22, 38, 0.96);
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.main-shell,
.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  width: min(1440px, calc(100% - 32px));
  margin: 28px auto 42px;
  position: relative;
  min-height: 620px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(7, 17, 31, 0.92));
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  min-height: 620px;
  position: relative;
}

.hero-slide.active {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: stretch;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(7, 17, 31, 0.95) 0%, rgba(7, 17, 31, 0.72) 44%, rgba(7, 17, 31, 0.24) 100%),
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.22), transparent 22rem),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.88;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(34px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.13);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.22);
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 18px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-title p {
  margin: 0;
  max-width: 760px;
  color: var(--muted-strong);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.8;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-meta span,
.tag-row span,
.detail-chip,
.movie-meta span,
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.hero-meta span {
  padding: 8px 13px;
}

.hero-side {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 42px;
}

.feature-card {
  width: min(420px, 100%);
  padding: 18px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.feature-card .poster {
  min-height: 430px;
}

.hero-dots {
  position: absolute;
  left: clamp(34px, 5vw, 76px);
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section {
  margin: 42px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.more-link {
  color: #a7f3d0;
  font-weight: 800;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pill {
  padding: 10px 15px;
}

.category-pill.active,
.category-pill:hover {
  color: #06111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.movie-card {
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(52, 211, 153, 0.24);
}

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

.poster {
  position: relative;
  min-height: 290px;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.84)),
    linear-gradient(135deg, rgba(52, 211, 153, 0.34), rgba(34, 211, 238, 0.18), rgba(167, 139, 250, 0.24)),
    var(--poster-image);
  background-size: cover;
  background-position: center;
}

.poster-year,
.poster-type {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.7);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 12px;
}

.poster-type {
  right: 12px;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-meta span,
.tag-row span {
  padding: 6px 9px;
  font-size: 12px;
}

.page-hero {
  margin: 28px 0 34px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.17), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.66));
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}

.page-hero h1 {
  font-size: clamp(32px, 4.8vw, 58px);
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.rank-panel,
.side-panel,
.search-panel,
.detail-panel {
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: inset 0 0 0 1px var(--line);
}

.rank-panel,
.side-panel {
  padding: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.08);
  transition: 0.2s ease;
}

.rank-item:hover {
  background: rgba(52, 211, 153, 0.13);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #06111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

.rank-score {
  color: #a7f3d0;
  font-weight: 900;
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.detail-poster {
  min-height: 520px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}

.detail-title {
  padding: clamp(28px, 4vw, 52px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 0%, rgba(52, 211, 153, 0.14), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.66));
  box-shadow: inset 0 0 0 1px var(--line);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
}

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

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-chip {
  padding: 8px 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.detail-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.cinema-player {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.22), transparent 28rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.64));
  transition: opacity 0.2s ease;
}

.cinema-player.is-playing .player-layer {
  opacity: 0;
}

.play-button {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  font-size: 26px;
  pointer-events: auto;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  color: var(--muted-strong);
  text-align: center;
  pointer-events: none;
}

.detail-panel {
  padding: clamp(20px, 3vw, 30px);
  margin-top: 22px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
}

.detail-panel p {
  color: var(--muted-strong);
  line-height: 1.9;
}

.search-panel {
  padding: 20px;
  margin-bottom: 24px;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 0 0 1px var(--line);
}

.search-panel button {
  padding: 0 22px;
}

.empty-state {
  display: none;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 60px auto 30px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  max-width: 760px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

@media (max-width: 1120px) {
  .top-search {
    display: none;
  }

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

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

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

  .menu-button {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-side {
    display: none;
  }

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

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

  .detail-poster {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .main-shell,
  .page-shell,
  .detail-hero,
  .detail-main,
  .site-footer,
  .hero,
  .mobile-panel {
    width: min(100% - 20px, 1280px);
  }

  .hero-content {
    padding: 28px;
  }

  .hero-dots {
    left: 28px;
  }

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

  .poster {
    min-height: 230px;
  }

  .feature-card .poster {
    min-height: 280px;
  }

  .rank-item {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .rank-info {
    display: none;
  }

  .search-panel form,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
