:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #edf7ff;
  --text: #102033;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #0891b2;
  --accent: #f97316;
  --danger: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 25px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

button,
input {
  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, #2563eb, #1d4ed8 48%, #0891b2);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
}

.nav-bar {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.25);
}

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

.nav-link {
  font-weight: 700;
  opacity: 0.88;
  padding: 8px 0;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #bfdbfe;
  opacity: 1;
}

.top-search {
  width: 290px;
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.top-search input,
.mobile-panel input,
.big-search input,
.inline-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.top-search input {
  color: #ffffff;
  padding: 10px 82px 10px 18px;
}

.top-search input::placeholder,
.mobile-panel input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.top-search button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  border: 0;
  border-radius: 999px;
  color: #1d4ed8;
  background: #ffffff;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
}

.menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px 16px 18px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  color: #ffffff;
  border-radius: 999px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel button {
  border: 0;
  color: #1d4ed8;
  background: #ffffff;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
}

.hero-shell {
  background: #08122b;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.65s ease, transform 0.85s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-copy {
  width: min(680px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  color: #ffffff;
  padding: 96px 0 160px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #dbeafe;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.88), rgba(8, 145, 178, 0.88));
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-actions,
.section-heading,
.movie-meta-line,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 14px;
  margin-top: 26px;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, #ef4444, #f97316);
  box-shadow: 0 15px 30px rgba(239, 68, 68, 0.34);
}

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

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.rank-action:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hero-dot {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  border-radius: 18px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.hero-dot.is-active {
  border-color: rgba(96, 165, 250, 0.9);
  background: rgba(37, 99, 235, 0.52);
}

.hero-dot img {
  width: 58px;
  height: 66px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-dot span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 800;
}

.quick-search-block,
.section-soft {
  background: linear-gradient(180deg, #eef7ff, #ffffff);
}

.search-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 30px;
  align-items: center;
  margin-top: -34px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.story-card h2,
.story-side-card h2 {
  margin: 10px 0 0;
  color: var(--text);
  line-height: 1.15;
}

.big-search,
.inline-filter {
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.big-search input,
.inline-filter input {
  color: var(--text);
  padding: 0 14px;
}

.big-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 900;
  cursor: pointer;
}

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

.section-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2 {
  flex: 1 1 100%;
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading a,
.text-link {
  color: var(--primary);
  font-weight: 900;
}

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

.category-card,
.category-overview-card,
.movie-card,
.rank-item,
.story-card,
.story-side-card,
.detail-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.category-card {
  overflow: hidden;
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover,
.rank-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-covers,
.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.category-covers img,
.category-cover-strip img {
  width: 100%;
  height: 108px;
  border-radius: 14px;
  object-fit: cover;
}

.category-card h2,
.category-overview-card h2,
.movie-card h2,
.movie-card h3,
.rank-info h2 {
  margin: 0;
  line-height: 1.25;
}

.category-card p,
.category-overview-card p,
.movie-card p,
.rank-info p,
.page-hero p,
.story-card p,
.site-footer p {
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card-compact .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.region-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.rank-badge {
  left: auto;
  right: 12px;
  background: linear-gradient(90deg, var(--danger), var(--accent));
}

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  opacity: 0;
  background: rgba(15, 23, 42, 0.45);
  transition: opacity 0.25s ease;
}

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

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

.movie-card-body h2,
.movie-card-body h3 {
  font-size: 18px;
}

.movie-card-body h2 a:hover,
.movie-card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--primary);
}

.movie-card-body p {
  min-height: 48px;
  margin: 9px 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta-line {
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-row {
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  color: #1e3a8a;
  background: #dbeafe;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.large-tags span {
  font-size: 14px;
  padding: 7px 12px;
}

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

.compact-rank {
  grid-template-columns: repeat(2, 1fr);
}

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--danger), var(--accent));
  border-radius: 16px;
  font-weight: 900;
}

.rank-thumb img {
  width: 96px;
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h2 {
  font-size: 18px;
}

.rank-info p {
  margin: 5px 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.rank-action {
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.page-main {
  background: linear-gradient(180deg, #eff6ff, #f8fafc 320px, #f8fafc);
}

.page-hero {
  padding: 64px 0 44px;
  background: radial-gradient(circle at 16% 0%, rgba(59, 130, 246, 0.28), transparent 35%), linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(32px, 5vw, 56px);
  max-width: 820px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 780px;
  font-size: 18px;
}

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

.breadcrumb a:hover {
  color: #bfdbfe;
}

.inline-filter {
  width: min(720px, 100%);
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.96);
}

.inline-filter input {
  min-height: 46px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-cover-strip {
  margin: 0;
}

.category-cover-strip img {
  height: 148px;
}

.player-section {
  color: #ffffff;
  background: radial-gradient(circle at 15% 5%, rgba(37, 99, 235, 0.4), transparent 32%), linear-gradient(135deg, #081122, #0f172a 48%, #083344);
  padding: 40px 0 66px;
}

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

.detail-title-row h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.detail-title-row p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.player-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2), rgba(0, 0, 0, 0.42));
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--danger), var(--accent));
  font-size: 36px;
  box-shadow: 0 18px 45px rgba(239, 68, 68, 0.42);
}

.detail-panel {
  padding: 16px;
  color: var(--text);
}

.detail-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.detail-panel dl {
  margin: 16px 0 0;
}

.detail-panel div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-panel dt {
  color: var(--muted);
}

.detail-panel dd {
  margin: 0;
  font-weight: 800;
}

.detail-content-block {
  padding-top: 54px;
}

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

.story-card,
.story-side-card {
  padding: 26px;
}

.story-card h2 + p {
  margin-top: 10px;
}

.story-card p {
  font-size: 17px;
}

.story-side-card ul,
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-side-card li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.story-side-card span {
  color: var(--muted);
}

.story-side-card a,
.story-side-card strong {
  color: var(--primary-dark);
  text-align: right;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
  padding: 54px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.2fr;
  gap: 34px;
}

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

.site-footer p {
  color: #cbd5e1;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #60a5fa;
}

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

  .top-search {
    margin-left: auto;
  }

  .menu-button {
    display: block;
  }

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

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

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

  .detail-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }
}

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

  .nav-bar {
    height: 60px;
  }

  .brand {
    font-size: 18px;
  }

  .top-search {
    display: none;
  }

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

  .hero-copy {
    padding: 70px 0 230px;
  }

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

  .hero-controls {
    grid-template-columns: repeat(2, 1fr);
    bottom: 18px;
  }

  .search-panel,
  .category-overview-card,
  .rank-item,
  .detail-panel {
    grid-template-columns: 1fr;
  }

  .big-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .big-search input {
    min-height: 44px;
  }

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

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

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

  .movie-card-body h2,
  .movie-card-body h3 {
    font-size: 16px;
  }

  .rank-item {
    gap: 12px;
  }

  .rank-action {
    width: fit-content;
  }

  .player-shell,
  .player-video {
    min-height: 260px;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .hero-controls {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 800px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .category-covers img,
  .category-cover-strip img {
    height: 92px;
  }
}
