:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --teal-500: #14b8a6;
  --white: #ffffff;
  --black: #000000;
  --shadow-xl: 0 22px 45px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f1f5f9 100%);
  min-height: 100vh;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-800), var(--slate-950), var(--slate-800));
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.25);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.42);
}

.logo-text,
.footer-logo {
  font-size: 22px;
  background: linear-gradient(90deg, var(--emerald-400), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.dropdown-button {
  border: 0;
  color: #e2e8f0;
  background: transparent;
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow-xl);
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.dropdown-panel a:hover {
  color: var(--white);
  background: rgba(16, 185, 129, 0.18);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(300px, 26vw);
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.header-search input,
.mobile-search input,
.hero-search input,
.live-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.header-search input {
  width: 100%;
  padding: 9px 12px;
  color: var(--white);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #cbd5e1;
}

.header-search button,
.mobile-search button,
.hero-search button,
.live-search button,
.cta-button,
.outline-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.hero-search button,
.cta-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.24);
}

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

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.cta-button:hover,
.outline-button:hover {
  transform: translateY(-1px);
}

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

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: var(--slate-900);
}

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

.mobile-link {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  color: #e2e8f0;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-search input {
  flex: 1;
  padding: 10px;
  color: var(--white);
}

.mobile-search button {
  padding: 10px 16px;
}

.hero {
  position: relative;
  height: 80vh;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 45%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 92%);
  padding-top: 34px;
}

.hero-label,
.kicker,
.detail-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--white);
  background: var(--emerald-500);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
}

.kicker {
  color: var(--emerald-700);
  background: #d1fae5;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.hero-meta span {
  padding: 7px 11px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.24);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 30px 0;
}

.cta-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
}

.outline-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-search {
  display: flex;
  width: min(560px, 100%);
  padding: 6px;
  border-radius: 999px;
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.hero-search input {
  flex: 1;
  padding: 14px 16px;
}

.hero-search button {
  padding: 12px 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--emerald-500);
}

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

.main-section.soft {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

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

.section-head h1,
.section-head h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-head a {
  color: var(--emerald-700);
  font-weight: 800;
}

.lead {
  max-width: 760px;
  color: var(--slate-600);
  line-height: 1.8;
  font-size: 17px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0) 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.type-badge {
  top: 12px;
  left: 12px;
}

.year-badge {
  right: 12px;
  bottom: 12px;
}

.rank-badge {
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span {
  padding: 4px 8px;
  background: #ecfdf5;
}

.card-title {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.card-title a:hover {
  color: var(--emerald-700);
}

.card-body p {
  min-height: 48px;
  margin: 0;
  color: var(--slate-600);
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-size: 12px;
}

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

.category-tile {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 154px;
  background: var(--slate-900);
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-copy {
  padding: 20px;
}

.category-copy h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-copy p {
  margin: 0 0 16px;
  color: var(--slate-600);
  line-height: 1.7;
}

.category-copy span {
  color: var(--emerald-700);
  font-weight: 800;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: var(--radius-lg);
  padding: 22px;
  background: var(--slate-900);
  color: var(--white);
  box-shadow: var(--shadow-xl);
}

.rank-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 32px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(16, 185, 129, 0.18);
  transform: translateX(2px);
}

.rank-num {
  color: var(--emerald-400);
  font-weight: 900;
  font-size: 18px;
}

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  margin-top: 5px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 12px;
}

.page-hero {
  padding: 62px 0 42px;
  color: var(--white);
  background: radial-gradient(circle at 18% 12%, rgba(16, 185, 129, 0.42), transparent 28%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero h1 {
  max-width: 860px;
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 18px;
}

.breadcrumb {
  padding-top: 22px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #d1fae5;
}

.live-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(680px, 100%);
  margin: 28px 0 0;
  padding: 8px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.live-search input {
  flex: 1;
  padding: 14px 16px;
  color: var(--slate-900);
}

.live-search button {
  padding: 13px 22px;
  color: var(--white);
  background: var(--slate-900);
}

.filter-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.filter-chip {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--slate-700);
  background: var(--white);
  cursor: pointer;
}

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

.detail-hero {
  position: relative;
  color: var(--white);
  background: var(--slate-950);
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  transform: scale(1.08);
  opacity: 0.34;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74)), linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 45%);
}

.detail-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  padding: 58px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

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

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-copy .one-line {
  max-width: 830px;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.75;
}

.detail-meta {
  margin: 24px 0;
}

.detail-meta span {
  padding: 8px 12px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.player-section {
  padding: 54px 0 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--slate-950);
  box-shadow: var(--shadow-xl);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--black);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16), rgba(2, 6, 23, 0.7));
}

.play-button {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.42);
  cursor: pointer;
}

.play-button span {
  margin-left: 5px;
  font-size: 32px;
  line-height: 1;
}

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

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

.article-panel,
.side-panel {
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.article-panel p {
  color: var(--slate-700);
  line-height: 1.92;
  font-size: 17px;
}

.info-table {
  display: grid;
  gap: 12px;
}

.info-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  color: var(--slate-700);
}

.info-row strong {
  color: var(--slate-900);
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.related-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.related-card strong {
  display: block;
  padding: 12px;
  font-size: 15px;
  line-height: 1.45;
}

.hidden-card {
  display: none !important;
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: var(--slate-950);
}

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

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

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

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

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

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

  .ranking-layout,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

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

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

  .hero-content {
    align-items: flex-end;
    padding: 118px 0 92px;
  }

  .hero-search,
  .live-search {
    border-radius: 22px;
    flex-direction: column;
    align-items: stretch;
  }

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

  .detail-grid {
    grid-template-columns: 1fr;
    padding: 36px 0;
  }

  .detail-poster {
    max-width: 270px;
  }

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

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

  .category-covers {
    height: 180px;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    gap: 16px;
  }

  .related-strip {
    grid-template-columns: 1fr;
  }

  .article-panel,
  .side-panel {
    padding: 20px;
  }
}
