:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: inherit;
  line-height: 1.7;
}

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

img {
  display: block;
  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: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1f2937 48%, #0f172a);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
}

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

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #06281d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.32);
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.03em;
}

.brand-text small {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
}

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

.desktop-nav a,
.mobile-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  color: #e2e8f0;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav.is-open {
  display: flex;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  color: #ffffff;
  background: #0f172a;
}

.hero-stage {
  position: relative;
  min-height: 650px;
}

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

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

.hero-backdrop,
.category-hero,
.detail-hero {
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.86)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-backdrop::after,
.detail-hero::after,
.category-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 28%, rgba(16, 185, 129, 0.24), transparent 30%), linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 54px;
  align-items: center;
  min-height: 650px;
  padding: 72px 0 96px;
}

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

.hero-summary,
.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #065f46;
  background: rgba(209, 250, 229, 0.95);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-btn {
  color: #06281d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 9px 16px;
  color: #06281d;
  background: var(--accent-2);
  border-radius: 999px;
  font-weight: 900;
}

.hero-nav {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-nav button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.is-active {
  width: 32px;
  background: var(--accent-2);
  border-radius: 999px;
}

.intro-band {
  padding: 28px 0;
  color: #ffffff;
  background: linear-gradient(90deg, #064e3b, #0f766e);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.intro-grid h2,
.intro-grid p {
  margin: 0;
}

.search-panel {
  padding: 34px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
}

.search-inner h2,
.section-head h2,
.ranking-card h2,
.detail-article h2,
.detail-side-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

.muted-section {
  background: #eef2f7;
}

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

.section-head a {
  color: #047857;
  font-weight: 900;
}

.compact-head {
  margin-bottom: 20px;
}

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

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

.movie-card {
  min-width: 0;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card.is-hidden {
  display: none;
}

.movie-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.36);
  box-shadow: var(--shadow);
}

.cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0f172a, #047857);
}

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

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

.cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(15, 23, 42, 0.72));
  opacity: 0.8;
}

.play-mark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #06281d;
  background: rgba(52, 211, 153, 0.92);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card-link:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 16px;
}

.movie-info strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.movie-info em {
  color: #047857;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.movie-desc {
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  margin-top: auto;
}

.tag-row span {
  min-height: 24px;
  font-size: 11px;
}

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  color: #ffffff;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.9)), var(--tile-image);
  background-position: center;
  background-size: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-tile span {
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 900;
}

.category-tile strong {
  color: #dbeafe;
  font-size: 14px;
}

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

.ranking-card,
.ranking-page-card,
.detail-side-card,
.detail-article,
.category-overview-card a {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ranking-card,
.ranking-page-card {
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
  background: #ecfdf5;
  transform: translateX(4px);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: #0f172a;
  border-radius: 12px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  color: var(--text);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  grid-column: 2 / 3;
  overflow: hidden;
  margin-top: -12px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  grid-column: 3 / 4;
  grid-row: 1 / 3;
  color: #047857;
  font-size: 18px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.simple-hero,
.ranking-hero {
  background: radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.18), transparent 34%), linear-gradient(135deg, #0f172a, #1f2937);
}

.category-hero {
  position: relative;
}

.category-hero .container,
.detail-hero-grid {
  position: relative;
  z-index: 2;
}

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

.category-overview-card a {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-covers img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
}

.category-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.category-copy strong {
  font-size: 26px;
  font-weight: 900;
}

.category-copy em {
  color: var(--muted);
  font-style: normal;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  color: #ffffff;
}

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

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

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

.breadcrumb em {
  color: #ffffff;
  font-style: normal;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.detail-meta-grid span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.detail-meta-grid strong {
  color: #a7f3d0;
  font-size: 12px;
}

.player-section {
  padding-bottom: 40px;
  background: #0b1120;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  color: #ffffff;
  background: #0f172a;
  border: 0;
  cursor: pointer;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.06);
}

.player-cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.82));
}

.player-cover-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: #06281d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  font-size: 32px;
  box-shadow: 0 20px 44px rgba(16, 185, 129, 0.34);
}

.player-cover strong {
  position: relative;
  z-index: 2;
  margin-top: 126px;
  font-size: 22px;
}

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

.detail-article,
.detail-side-card {
  padding: 28px;
}

.detail-article p {
  color: #334155;
  font-size: 17px;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 0;
}

.detail-side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-side-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.detail-side-card a {
  color: #047857;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 34px;
  padding: 46px 0;
}

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

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

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

.footer-links a {
  padding: 6px 10px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.2);
}

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

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

  .menu-toggle {
    display: flex;
  }

  .hero-content,
  .detail-hero-grid,
  .split-grid,
  .detail-content-grid,
  .search-inner,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-cover {
    max-width: 360px;
  }

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

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

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

  .brand-text small {
    display: none;
  }

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

  .hero-slider,
  .hero-stage,
  .hero-content {
    min-height: 590px;
  }

  .hero-content {
    padding-top: 44px;
  }

  .hero-poster {
    display: none;
  }

  .section-block {
    padding: 48px 0;
  }

  .section-head,
  .search-controls {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-head {
    display: grid;
  }

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

  .category-overview-card a {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    padding: 48px 0;
  }

  .detail-cover {
    max-width: 240px;
  }

  .player-shell {
    border-radius: 18px;
  }

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