:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f0f9ff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px 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.65;
}

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

img {
  display: block;
  max-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;
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.96), rgba(236, 254, 255, 0.96), rgba(240, 253, 250, 0.96));
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.footer-brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

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

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

.nav-dropdown {
  position: relative;
  padding: 12px 0;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 190px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

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

.dropdown-panel a:hover {
  background: #eff6ff;
  color: var(--blue);
}

.site-search,
.hero-search,
.wide-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search input,
.hero-search input,
.wide-search input,
.filter-search input,
.filter-bar select {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input {
  width: 230px;
  border-radius: 999px;
  padding: 10px 14px;
}

.site-search button,
.hero-search button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  cursor: pointer;
  font-weight: 700;
}

.site-search input:focus,
.hero-search input:focus,
.wide-search input:focus,
.filter-search input:focus,
.filter-bar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel a {
  display: block;
  padding: 11px 0;
  color: #334155;
  font-weight: 700;
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 78px 0 70px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 52%, #f0fdfa 100%);
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  opacity: 0.24;
  filter: blur(40px);
  animation: pulseGlow 5s ease-in-out infinite;
}

.hero-glow-one {
  top: 34px;
  left: 6%;
  background: #60a5fa;
}

.hero-glow-two {
  right: 4%;
  bottom: 20px;
  background: #22d3ee;
  animation-delay: 1s;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.08);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: 56px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 7px 12px;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-copy h1 span {
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #334155;
  font-size: 20px;
}

.hero-search {
  width: min(560px, 100%);
  padding: 8px;
  margin: 0 0 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  padding: 13px 16px;
}

.hero-search button {
  padding: 13px 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.button-outline {
  color: var(--blue);
  background: #fff;
  border: 2px solid rgba(37, 99, 235, 0.5);
}

.full-button {
  width: 100%;
}

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

.hero-pills a {
  padding: 8px 12px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(13, 148, 136, 0.16);
  border-radius: 999px;
  font-weight: 700;
}

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

.hero-card {
  position: relative;
  min-height: 208px;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #0f172a;
  transform: translateZ(0);
}

.hero-card-large {
  grid-column: span 2;
  min-height: 280px;
}

.hero-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.76));
}

.hero-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
}

.hero-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.hero-info small {
  color: #dbeafe;
}

.hero-play {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.72);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-card:hover .hero-play {
  opacity: 1;
  transform: scale(1.04);
}

.info-strip {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 28px 0;
}

.info-grid div {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
}

.info-grid strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

.info-grid span {
  color: var(--muted);
}

.section {
  padding: 58px 0;
}

.soft-section {
  background: linear-gradient(180deg, #fff, #f0f9ff);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading,
.category-preview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h2,
.panel-heading h2,
.category-preview-head h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.category-preview-head p {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
}

.section-more,
.category-preview-head a {
  min-width: max-content;
  color: var(--blue);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-card-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 999px;
  font-weight: 800;
}

.movie-card:hover .movie-card-overlay {
  opacity: 1;
}

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

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

.movie-meta-line span {
  padding: 3px 8px;
  background: #f1f5f9;
  border-radius: 999px;
}

.movie-card h3 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.detail-tags span span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow-soft);
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, #0891b2, #0d9488);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
}

.category-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
}

.category-card strong {
  position: absolute;
  left: 24px;
  bottom: 22px;
}

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

.ranking-panel,
.detail-card,
.side-card,
.player-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 74px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.rank-number {
  color: var(--blue);
  font-weight: 900;
  font-size: 20px;
  text-align: center;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #0f172a;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.rank-content strong {
  color: var(--text);
}

.rank-content small {
  color: var(--muted);
}

.rank-score {
  color: #f59e0b;
  font-weight: 900;
  text-align: right;
}

.rank-list-large .rank-row {
  grid-template-columns: 58px 120px minmax(0, 1fr) 70px;
  padding: 14px;
}

.page-hero,
.detail-hero {
  padding: 58px 0;
  background: linear-gradient(135deg, #eff6ff, #ecfeff, #f0fdfa);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

.filter-bar,
.search-page-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.filter-search {
  flex: 1;
}

.filter-search input,
.filter-bar select,
.wide-search input {
  width: 100%;
  border-radius: 16px;
  padding: 13px 14px;
}

.filter-bar select {
  max-width: 240px;
}

.wide-search {
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.empty-state {
  display: none;
  padding: 40px 20px;
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

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

.category-preview-list {
  display: grid;
  gap: 36px;
}

.category-preview {
  padding: 24px;
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
  background: #020617;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.35);
  font-size: 30px;
}

.player-card.is-playing .player-overlay {
  display: none;
}

.detail-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.detail-type {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-weight: 800;
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
  margin: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-weight: 700;
}

.lead-text {
  color: #334155;
  font-size: 18px;
}

.detail-text-block h2 {
  margin: 26px 0 10px;
  font-size: 24px;
}

.detail-text-block p {
  margin: 0;
  color: var(--muted-strong);
}

.detail-tags {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.detail-tags div {
  display: grid;
  gap: 8px;
}

.detail-tags strong {
  color: var(--text);
}

.detail-tags div > span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.detail-side > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.side-card p {
  color: var(--muted-strong);
}

.site-footer {
  margin-top: 30px;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

.footer-bottom button {
  border: 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
}

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

  .mobile-toggle {
    display: block;
  }

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

  .ranking-panel,
  .detail-side {
    position: static;
  }

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

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

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

  .hero-section,
  .page-hero,
  .detail-hero {
    padding: 42px 0;
  }

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

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

  .hero-search,
  .wide-search,
  .filter-bar,
  .section-heading,
  .category-preview-head,
  .detail-title-row,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero-card-large {
    grid-column: span 1;
  }

  .info-grid,
  .catalog-grid,
  .movie-grid,
  .compact-grid,
  .preview-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar select {
    max-width: none;
  }

  .rank-row,
  .rank-list-large .rank-row {
    grid-template-columns: 42px 78px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }
}
