:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --cyan: #0891b2;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand-name {
  font-size: 19px;
  white-space: nowrap;
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: #ecfeff;
}

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--ink);
}

.sub-nav {
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 9px 16px;
  color: #64748b;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.8);
}

.sub-nav a:hover {
  color: var(--brand);
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 40%, rgba(37, 99, 235, 0.22), transparent 26%), linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.66) 46%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  margin-left: max(16px, calc((100% - 1180px) / 2));
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-content .eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  letter-spacing: 0;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  color: #fff;
  line-height: 1.08;
  font-size: clamp(32px, 6vw, 58px);
  letter-spacing: -0.04em;
}

.hero-movie-title {
  margin-top: 12px !important;
  font-size: clamp(24px, 3vw, 36px) !important;
  color: #bfdbfe !important;
}

.hero-desc {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.tag-row span {
  color: #1d4ed8;
  background: #dbeafe;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.button.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.32);
}

.button.primary:hover {
  background: var(--brand-dark);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.button.ghost.light {
  background: rgba(255, 255, 255, 0.16);
}

.button.text {
  color: #dbeafe;
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: rgba(2, 6, 23, 0.52);
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.76);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 28px;
  background: #fff;
}

.section {
  padding: 56px 0;
}

.white-section {
  background: #fff;
}

.soft-section {
  background: var(--soft);
}

.section-head,
.movie-grid,
.category-grid,
.ranking-layout,
.ranking-page-grid,
.detail-layout,
.footer-inner,
.search-panel,
.filter-bar,
.page-hero > div,
.watch-inner {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

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

.section-head h2,
.page-hero h1,
.detail-card h2,
.side-card h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.section-head p:not(.section-kicker) {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--brand);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
  overflow: hidden;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-dot {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.75);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

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

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

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

.meta-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  margin: 9px 0 12px;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.4s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.category-card span {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.category-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.category-card em {
  display: block;
  margin-top: 8px;
  color: #dbeafe;
  font-style: normal;
  font-size: 13px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.ranking-main,
.ranking-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.movie-card-wide .poster-link {
  aspect-ratio: auto;
  height: 100%;
  min-height: 170px;
}

.ranking-side,
.side-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: #eff6ff;
  transform: translateX(2px);
}

.compact-card img {
  width: 112px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
}

.compact-info strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.compact-info em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.small-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.page-hero {
  padding: 70px 0;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  color: #fff;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 52px);
}

.page-hero p:not(.section-kicker) {
  max-width: 780px;
  margin: 12px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.category-page-hero {
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(135deg, #0891b2, #1d4ed8 48%, #0f172a);
}

.ranking-hero {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.search-hero {
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

.filter-bar,
.search-panel {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.filter-bar label {
  flex: 1;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-panel input {
  flex: 1;
}

.watch-shell {
  background: radial-gradient(circle at 80% 16%, rgba(37, 99, 235, 0.26), transparent 25%), #020617;
  color: #fff;
  padding: 24px 0 40px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
  margin: 10px 0 20px;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  aspect-ratio: 16 / 9;
}

.player-card video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-button {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-size: 34px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.player-button:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: #fff;
}

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

.watch-titlebar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-top: 26px;
}

.watch-titlebar h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.watch-titlebar p:not(.section-kicker) {
  max-width: 820px;
  color: #dbeafe;
  margin: 10px 0 0;
}

.detail-section {
  background: #f8fafc;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
}

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

.detail-card,
.side-card {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 18px 42px rgba(15, 23, 42, 0.08);
  padding: 24px;
}

.intro-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.detail-cover {
  width: 240px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #e2e8f0;
}

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

.info-list div {
  border-radius: 14px;
  padding: 12px;
  background: #f8fafc;
}

.info-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-list dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.detail-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: #475569;
  white-space: pre-line;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 104px;
}

.mobile-related {
  display: none;
}

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

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

.footer-logo {
  color: #fff;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.site-footer a:hover {
  color: #67e8f9;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 13px;
}

@media (max-width: 980px) {
  .movie-grid,
  .category-grid,
  .ranking-main,
  .ranking-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-layout,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    display: none;
  }

  .mobile-related {
    display: block;
  }

  .intro-card {
    grid-template-columns: 180px 1fr;
  }

  .detail-cover {
    width: 180px;
  }
}

@media (max-width: 760px) {
  .site-nav {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .brand-name {
    font-size: 16px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 0 6px;
  }

  .site-header.menu-open .nav-menu {
    display: flex;
  }

  .sub-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    width: min(100% - 32px, 720px);
    margin-left: 16px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 38px 0;
  }

  .section-head,
  .watch-titlebar,
  .filter-bar,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .ranking-main,
  .ranking-page-grid {
    grid-template-columns: 1fr;
  }

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

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

  .detail-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

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

  .player-card {
    border-radius: 16px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
