:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0ea5e9;
  --brand-2: #2563eb;
  --accent: #f97316;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

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

img {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe 50%, #f1f5f9);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.site-nav {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.35);
}

.brand-text {
  font-size: 22px;
}

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

.nav-link {
  padding: 9px 14px;
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0369a1;
  background: #e0f2fe;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eff6ff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #0369a1;
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  padding: 0 24px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

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

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
}

.hero-shell {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  margin: 8px 0 34px;
}

.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  min-height: 560px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(14, 165, 233, 0.36), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
  color: #fff;
}

.hero-kicker,
.page-kicker {
  color: #38bdf8;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 620px;
  margin-top: 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.94;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero-desc {
  max-width: 640px;
  margin-top: 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
}

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

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

.primary-btn,
.inline-search button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.primary-btn:hover,
.inline-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.36);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  color: #fff;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.54);
  transform: translateY(-50%);
  font-size: 28px;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 52px;
  bottom: 32px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
  width: 30px;
  background: #38bdf8;
}

.hero-side {
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-side-title {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 900;
}

.hero-side-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  transition: 0.2s ease;
}

.hero-side-item:hover {
  background: #f1f5f9;
  transform: translateX(3px);
}

.hero-side-item img {
  width: 74px;
  height: 94px;
  border-radius: 16px;
  object-fit: cover;
}

.hero-side-item span {
  font-weight: 850;
  line-height: 1.45;
}

.search-panel,
.page-hero,
.toolbar,
.content-section,
.split-section,
.ranking-list,
.detail-content,
.player-section {
  margin-top: 28px;
}

.search-panel {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 18px;
  align-items: center;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.search-panel h2,
.section-head h2,
.rank-panel-head h2,
.story-card h2 {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.search-panel p,
.section-head p,
.page-hero p,
.movie-line,
.story-card p,
.category-card-body p,
.ranking-card p {
  color: var(--muted);
  line-height: 1.75;
}

.inline-search {
  display: flex;
  gap: 10px;
}

.inline-search input,
.toolbar-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  outline: none;
}

.inline-search input:focus,
.toolbar-search input:focus {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

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

.section-more,
.rank-panel-head a {
  color: #0284c7;
  font-weight: 900;
}

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

.category-pill {
  min-height: 118px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid #e0f2fe;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.category-pill:hover,
.movie-card:hover,
.category-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.12);
}

.category-pill strong {
  font-size: 18px;
  font-weight: 950;
}

.category-pill span {
  color: var(--muted);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #dbeafe;
}

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

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

.play-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: #fff;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  font-size: 17px;
  font-weight: 950;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-top: 4px;
  color: #0ea5e9;
  font-size: 13px;
  font-weight: 800;
}

.movie-line {
  margin-top: 8px;
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
}

.movie-card .tag-row {
  margin-top: 12px;
  max-height: 28px;
  overflow: hidden;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.rank-panel-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  padding: 11px 6px;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: #f97316;
  font-weight: 950;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 44px;
  display: flex;
  align-items: center;
  border-radius: 30px;
  color: #fff;
  background: radial-gradient(circle at 72% 20%, rgba(125, 211, 252, 0.45), transparent 28%), linear-gradient(135deg, #0f172a, #075985 55%, #1d4ed8);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 780px;
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.page-hero p:last-child {
  max-width: 680px;
  margin-top: 14px;
  color: #dbeafe;
}

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

.category-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 45% minmax(0, 1fr);
  min-height: 250px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 8px;
  background: #eff6ff;
}

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

.category-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-card-body h2 {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-card-body span {
  margin-top: 18px;
  color: #0284c7;
  font-weight: 900;
}

.toolbar {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-buttons button,
.episode-bar button,
.episode-bar a {
  padding: 8px 13px;
  color: #334155;
  border-radius: 999px;
  background: #f1f5f9;
  font-weight: 850;
}

.filter-buttons button.is-active,
.episode-bar .is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 64px 94px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  transition: 0.22s ease;
}

.ranking-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 950;
}

.ranking-card img {
  width: 94px;
  height: 126px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-card h3 {
  font-size: 20px;
  font-weight: 950;
}

.ranking-card span:last-child {
  display: inline-block;
  margin-top: 8px;
  color: #0284c7;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.68) 54%, rgba(15, 23, 42, 0.3));
}

.detail-hero-inner {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 52px;
  color: #fff;
}

.detail-poster img {
  width: 280px;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  margin-top: 12px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-meta {
  margin-top: 16px;
  color: #bae6fd;
  font-weight: 850;
}

.detail-line {
  max-width: 760px;
  margin-top: 18px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.player-section {
  padding: 18px;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.62));
  transition: 0.2s ease;
}

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

.player-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 42px rgba(14, 165, 233, 0.36);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 20px;
}

.episode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
}

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

.story-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.story-card:nth-child(1) {
  grid-column: 1;
}

.story-card:nth-child(2) {
  grid-column: 1;
}

.info-card {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.story-card p {
  margin-top: 12px;
}

.info-card dl {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  font-weight: 800;
}

.detail-tags {
  margin-top: 18px;
}

.site-footer {
  margin-top: 48px;
  padding: 36px 24px;
  background: #0f172a;
  color: #e2e8f0;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
}

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

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

.footer-links a {
  color: #7dd3fc;
  font-weight: 800;
}

.is-hidden-by-filter {
  display: none !important;
}

@media (max-width: 1180px) {
  .hero-shell,
  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-side,
  .rank-panel {
    position: relative;
    top: auto;
  }

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

  .hero-side-title {
    grid-column: 1 / -1;
  }

  .info-card,
  .story-card:nth-child(1),
  .story-card:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
  }

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

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

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

  .menu-toggle {
    display: flex;
  }

  main {
    padding: 16px;
  }

  .hero-shell {
    min-height: auto;
    display: block;
  }

  .hero-main,
  .hero-content {
    min-height: 520px;
  }

  .hero-content {
    padding: 34px 24px 72px;
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    left: 24px;
  }

  .hero-side {
    margin-top: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-panel,
  .detail-hero-inner,
  .category-card {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    padding: 28px;
  }

  .detail-poster img {
    width: 210px;
  }

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

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

  .ranking-card {
    grid-template-columns: 44px 76px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-card img {
    width: 76px;
    height: 104px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-nav {
    padding: 0 16px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero-main,
  .hero-content {
    min-height: 500px;
  }

  .hero-content h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.045em;
  }

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

  .movie-info {
    padding: 11px;
  }

  .movie-line {
    display: none;
  }

  .inline-search {
    flex-direction: column;
  }

  .page-hero {
    padding: 30px 24px;
  }
}
