:root {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --panel: #ffffff;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --text: #111827;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --cyan: #0891b2;
  --cyan-bright: #06b6d4;
  --cyan-soft: #ecfeff;
  --blue-soft: #eff6ff;
  --danger: #dc2626;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

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

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.3);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--cyan-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
}

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

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--slate);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(15, 23, 42, 0.75), transparent 46%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  transform: translateY(-50%);
  width: min(640px, calc(100% - 48px));
  color: #ffffff;
}

.hero-kicker,
.feature-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-kicker span,
.feature-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.86);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 580px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-tags span,
.tag-cloud span {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 7px 13px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
}

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

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 900;
  transition: all 0.25s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 18px 36px rgba(8, 145, 178, 0.35);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(16px);
}

.hero-controls button {
  border: 0;
  color: #ffffff;
  background: transparent;
}

.hero-controls > button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.hero-controls > button:hover {
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.48;
  background: #ffffff !important;
}

.hero-dot.is-active {
  width: 28px;
  opacity: 1;
  background: var(--cyan-bright) !important;
}

.quick-search,
.content-section,
.detail-content {
  padding: 54px 0;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.text-panel h2,
.side-panel h2,
.rank-panel h2 {
  margin: 0;
  color: var(--slate);
  letter-spacing: -0.04em;
}

.quick-search h2,
.section-heading h2 {
  font-size: clamp(28px, 4vw, 38px);
}

.quick-search p,
.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 18px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

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

.section-heading > div:first-child {
  position: relative;
  padding-left: 48px;
}

.section-icon {
  position: absolute;
  left: 0;
  top: 2px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.25);
}

.section-more {
  flex: 0 0 auto;
  color: var(--cyan);
  font-weight: 900;
}

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

.feature-card-large {
  grid-column: span 2;
}

.feature-card,
.movie-card,
.rank-panel,
.text-panel,
.side-panel,
.category-card-wide,
.filter-panel,
.player-card,
.detail-info {
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.feature-link {
  position: relative;
  display: block;
  min-height: 300px;
  color: #ffffff;
}

.feature-card-large .feature-link {
  min-height: 420px;
}

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

.feature-card:hover img {
  transform: scale(1.06);
}

.feature-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.12));
}

.feature-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
}

.feature-content h3 {
  margin: 14px 0 8px;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.08;
}

.feature-content p {
  margin: 0 0 10px;
  color: #e2e8f0;
}

.feature-genre {
  color: #cbd5e1;
  font-size: 13px;
}

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

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

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--slate-soft);
}

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

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--slate);
  font-size: 17px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-2);
  font-size: 12px;
}

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

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

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

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.category-grid,
.category-wide-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, var(--cyan-soft));
  transition: all 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 145, 178, 0.35);
  box-shadow: var(--shadow-soft);
}

.category-tile span {
  color: var(--slate);
  font-size: 19px;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted);
}

.rank-panel {
  padding: 22px;
}

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

.rank-panel-head a {
  color: var(--cyan);
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 32px 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.25s ease;
}

.rank-row:hover {
  background: var(--cyan-soft);
}

.rank-index {
  color: var(--danger);
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 52px;
  height: 66px;
  border-radius: 10px;
  object-fit: cover;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 12px;
}

.dark-section {
  margin-top: 30px;
  padding: 62px 0;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.24), transparent 32%), linear-gradient(135deg, var(--slate), var(--slate-soft));
}

.dark-section .section-heading h2,
.dark-section .section-heading p {
  color: #ffffff;
}

.dark-section .section-heading p {
  opacity: 0.74;
}

.movie-card-dark {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-card-dark .card-body h3 {
  color: #ffffff;
}

.movie-card-dark .card-body p,
.movie-card-dark .card-meta {
  color: #cbd5e1;
}

.page-shell {
  min-height: 70vh;
}

.page-hero {
  padding: 58px 0 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-weight: 900;
}

.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(36px, 6vw, 62px);
}

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

.category-card-wide a {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 180px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--slate);
}

.category-preview img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}

.category-card-body {
  padding: 24px;
}

.category-card-body h2 {
  margin: 0 0 8px;
  color: var(--slate);
}

.category-card-body p {
  margin: 0 0 18px;
  color: var(--muted);
}

.category-card-body span {
  color: var(--cyan);
  font-weight: 900;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: #475569;
  background: #ffffff;
  font-weight: 800;
}

.filter-row button:hover,
.filter-row button.is-active {
  color: #ffffff;
  border-color: var(--cyan);
  background: var(--cyan);
}

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

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

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
  gap: 26px;
  padding: 26px 0 44px;
  align-items: stretch;
}

.player-card {
  padding: 14px;
  background: var(--slate);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  filter: blur(1px);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(8, 145, 178, 0.22), rgba(2, 6, 23, 0.6));
}

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

.play-circle {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.45);
}

.detail-info {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px;
}

.detail-poster {
  width: 140px;
  height: 190px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--slate-soft);
}

.detail-copy h1 {
  margin-top: 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.06;
}

.detail-copy p {
  margin: 14px 0 0;
  color: var(--muted);
}

.detail-meta {
  margin-top: 16px;
}

.detail-meta span {
  background: #e0f2fe;
  color: var(--cyan);
}

.detail-copy .tag-cloud span {
  border-color: var(--line);
  color: var(--muted);
  background: #f8fafc;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
}

.text-panel,
.side-panel {
  padding: 28px;
}

.text-panel h2,
.side-panel h2 {
  font-size: 26px;
}

.text-panel p {
  margin: 14px 0 26px;
  color: #334155;
  font-size: 17px;
}

.side-panel dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.side-panel div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.side-panel dt {
  color: var(--muted);
  font-size: 13px;
}

.side-panel dd {
  margin: 0;
  color: var(--slate);
  font-weight: 800;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: var(--slate);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
}

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

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .rank-panel {
    order: -1;
  }
}

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

  .mobile-menu-button {
    display: flex;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    top: auto;
    bottom: 96px;
    transform: none;
  }

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

  .quick-search,
  .feature-grid,
  .category-wide-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .content-section,
  .detail-content {
    padding: 36px 0;
  }

  .feature-card-large {
    grid-column: auto;
  }

  .feature-link,
  .feature-card-large .feature-link {
    min-height: 320px;
  }

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

  .category-card-wide a,
  .detail-info {
    grid-template-columns: 1fr;
  }

  .category-preview {
    grid-template-columns: repeat(4, 1fr);
  }

  .category-preview img {
    height: 110px;
  }

  .detail-poster {
    width: 100%;
    height: 360px;
  }

  .rank-row {
    grid-template-columns: 30px 48px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .max-wrap,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .footer-copy {
    width: min(100% - 22px, 1180px);
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 38px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

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

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

  .detail-poster {
    height: 260px;
  }
}
