* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #38bdf8;
  --success: #16a34a;
  --warning: #f59e0b;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 34rem), var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.logo-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary-dark));
  border-radius: 13px;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.26);
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary);
}

.header-search {
  display: flex;
  width: 280px;
  padding: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.header-search input,
.mobile-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 9px 12px;
  color: var(--text);
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  background: var(--primary);
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #e0f2fe;
  border-radius: 14px;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary-dark);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 0;
  overflow: hidden;
  color: #ffffff;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #0369a1);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.90), rgba(2, 132, 199, 0.66), rgba(14, 165, 233, 0.22)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.38), transparent 34rem);
}

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

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.lead-text {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.20);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary-dark));
  box-shadow: 0 16px 32px rgba(14, 165, 233, 0.32);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-btn.dark {
  color: var(--primary-dark);
  background: #e0f2fe;
  border-color: #bae6fd;
}

.primary-btn:hover,
.ghost-btn:hover,
.wide-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #0ea5e9, #0f172a);
}

.hero-poster span {
  display: block;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 800;
}

.hero-control {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-control button {
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 28px !important;
  background: #ffffff;
}

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

.section-heading {
  margin-bottom: 24px;
}

.section-heading span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.12em;
}

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

.compact-heading h2 {
  font-size: 26px;
}

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

.category-tile,
.category-card,
.content-card,
.rank-panel,
.detail-info,
.player-card {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.category-tile {
  padding: 24px;
  min-height: 210px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-card span {
  color: var(--primary);
  font-weight: 900;
}

.category-tile strong,
.category-card h2 {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.category-tile p,
.category-card p,
.movie-body p,
.content-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-tile em {
  display: block;
  margin-top: 18px;
  color: #0f172a;
  font-style: normal;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0ea5e9, #0f172a);
}

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

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

.movie-rating,
.movie-duration {
  position: absolute;
  bottom: 10px;
  z-index: 2;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.movie-rating {
  left: 10px;
}

.movie-duration {
  right: 10px;
}

.movie-body {
  padding: 16px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-body h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.movie-body p {
  min-height: 54px;
  margin: 0 0 12px;
  font-size: 14px;
}

.rank-panel {
  padding: 22px;
}

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

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

.rank-item:hover {
  background: #f0f9ff;
}

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

.rank-item img {
  width: 54px;
  height: 42px;
  object-fit: cover;
  background: linear-gradient(135deg, #0ea5e9, #0f172a);
  border-radius: 12px;
}

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

.rank-extra {
  grid-column: 3;
  color: var(--muted);
  font-size: 12px;
}

.wide-link {
  width: 100%;
  margin-top: 16px;
  color: var(--primary-dark);
  background: #e0f2fe;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0284c7);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.page-hero > div {
  padding: 64px 72px;
}

.slim-hero p,
.rank-hero p {
  max-width: 760px;
}

.rank-hero {
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.90), rgba(2, 132, 199, 0.64)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 15px !important;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbeafe;
  outline: 0;
  background: #f8fafc;
  border-radius: 14px;
  padding: 0 14px;
}

.empty-state {
  display: none;
  padding: 36px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border-radius: 20px;
}

.empty-state.is-visible {
  display: block;
}

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

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

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: linear-gradient(135deg, #0ea5e9, #0f172a);
  border-radius: 14px;
}

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

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

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  gap: 26px;
  align-items: stretch;
}

.player-card,
.detail-info {
  padding: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 430px;
  background: #020617;
  border-radius: 24px;
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  background: #020617;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--accent), var(--primary-dark));
  border-radius: 50%;
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.35);
  font-size: 34px;
}

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

.detail-info h1 {
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
}

.detail-info .eyebrow {
  color: var(--primary);
}

.lead-text {
  color: var(--muted);
}

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

.info-grid div {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.info-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.info-grid span {
  font-weight: 800;
}

.large-tags span {
  font-size: 13px;
}

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

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

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

.movie-card.compact .movie-body p {
  min-height: auto;
}

.long-rank {
  max-height: 1050px;
  overflow: auto;
  padding-right: 4px;
}

.sticky-rank {
  position: sticky;
  top: 92px;
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-logo {
  color: #ffffff;
}

.footer-inner p {
  max-width: 420px;
  color: #94a3b8;
  line-height: 1.8;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

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

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

  .hero-content,
  .split-layout,
  .detail-main,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 52px;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .site-logo,
  .footer-logo {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    min-height: 560px;
    padding: 36px 24px 80px;
  }

  .hero-copy p,
  .page-hero p,
  .lead-text {
    font-size: 16px;
  }

  .hero-control {
    left: 24px;
    right: 24px;
  }

  .section {
    margin: 42px auto;
  }

  .movie-grid,
  .related-grid,
  .dense-grid,
  .category-grid,
  .category-overview,
  .detail-section {
    grid-template-columns: 1fr;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .page-hero > div {
    padding: 42px 24px;
  }

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

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