:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-100: #ccfbf1;
  --teal-50: #f0fdfa;
  --cyan-700: #0e7490;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --amber-400: #fbbf24;
  --rose-500: #f43f5e;
  --shadow-soft: 0 18px 60px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: var(--slate-50);
  line-height: 1.6;
}

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.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 15px;
  background: linear-gradient(135deg, var(--teal-500), var(--cyan-600));
  box-shadow: 0 12px 24px rgba(13, 148, 136, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--slate-500);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--slate-600);
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal-700);
  background: var(--teal-50);
}

.nav-search {
  width: 270px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
}

.nav-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--slate-700);
  padding: 7px 8px 7px 12px;
}

.nav-search button {
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-600));
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.mobile-nav-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--slate-700);
  background: var(--slate-100);
  cursor: pointer;
}

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

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.04);
}

.hero-slide img.image-hidden {
  opacity: 0;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(20, 184, 166, 0.34), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.12) 52%, rgba(2, 6, 23, 0.45) 100%);
  z-index: 1;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(80px, 18vw, 260px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 16%, rgba(45, 212, 191, 0.22), transparent 32%),
    linear-gradient(135deg, #0f172a, #0f766e 45%, #0891b2);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 96px 0 78px;
}

.hero-text {
  width: min(720px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--teal-400);
  font-weight: 800;
}

.hero-text h1,
.hero-text h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero-text p {
  width: min(680px, 100%);
  margin: 0 0 24px;
  color: var(--slate-200);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.movie-meta,
.detail-meta,
.filter-row,
.button-row,
.breadcrumb,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.detail-meta span {
  padding: 7px 12px;
  color: var(--slate-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 850;
  transition: 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-500), var(--cyan-600));
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(6, 182, 212, 0.34);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.btn-soft {
  color: var(--teal-700);
  background: var(--teal-50);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.20);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 32px;
  background: var(--white);
}

.section {
  padding: 64px 0;
}

.section.compact-section {
  padding: 42px 0;
}

.section.alt {
  background: linear-gradient(135deg, var(--teal-50), #ecfeff);
}

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

.section-title {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--slate-500);
}

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

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

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

.movie-card {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.15);
}

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

.poster-box {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--teal-700));
}

.poster-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-box img {
  transform: scale(1.07);
}

.poster-box img.image-hidden {
  opacity: 0;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.28);
  font-size: 84px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.poster-year,
.poster-duration {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.poster-year {
  left: 10px;
  top: 10px;
}

.poster-duration {
  right: 10px;
  bottom: 10px;
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.28;
}

.movie-info p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  justify-content: space-between;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

.movie-meta strong {
  color: var(--teal-700);
}

.category-card,
.info-card,
.filter-panel,
.content-card {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.category-card {
  position: relative;
  min-height: 210px;
  padding: 28px;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(6, 182, 212, 0.22));
}

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 24px;
  z-index: 1;
}

.category-card p {
  position: relative;
  margin: 0 0 20px;
  color: var(--slate-500);
  z-index: 1;
}

.category-card strong {
  position: relative;
  display: inline-flex;
  color: var(--teal-700);
  z-index: 1;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.28), transparent 28%),
    linear-gradient(135deg, var(--teal-600), var(--cyan-700));
  padding: 72px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  width: min(760px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--teal-100);
  font-weight: 700;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.filter-panel {
  padding: 22px;
  margin-bottom: 28px;
}

.filter-row {
  gap: 14px;
}

.filter-row input,
.filter-row select {
  min-height: 46px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  padding: 0 14px;
  outline: none;
}

.filter-row input {
  flex: 1;
  min-width: 220px;
}

.filter-row select {
  min-width: 150px;
}

.result-count {
  margin: 14px 0 0;
  color: var(--slate-500);
  font-weight: 700;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.86);
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(20, 184, 166, 0.38);
  transform: translateX(3px);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-500), var(--cyan-600));
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--slate-900);
  font-weight: 850;
}

.rank-detail {
  color: var(--slate-500);
  font-size: 13px;
  white-space: nowrap;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--slate-950);
  box-shadow: var(--shadow-soft);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

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

.video-frame video.image-hidden {
  opacity: 0;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.56));
  transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
}

.player-play {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: var(--teal-700);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  font-size: 30px;
  pointer-events: auto;
  transition: 0.2s ease;
}

.player-play:hover {
  transform: scale(1.08);
}

.player-tools {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-shell:hover .player-tools,
.player-shell:focus-within .player-tools {
  opacity: 1;
}

.player-tools button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  cursor: pointer;
}

.player-tools span {
  margin-left: auto;
  color: var(--slate-300);
  font-size: 13px;
}

.content-card {
  padding: 28px;
  margin-top: 24px;
}

.content-card h1,
.content-card h2,
.content-card h3 {
  margin-top: 0;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.content-card h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.content-card p {
  color: var(--slate-600);
}

.detail-meta {
  margin: 18px 0 22px;
}

.detail-meta span {
  color: var(--slate-700);
  background: var(--slate-100);
  border-color: var(--slate-200);
}

.detail-meta strong {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--teal-700);
  background: var(--teal-50);
}

.tag-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-size: 13px;
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 96px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-card .poster-box {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.side-card h4 {
  margin: 0 0 4px;
  color: var(--slate-900);
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 13px;
}

.no-results {
  display: none;
  padding: 52px 18px;
  text-align: center;
  color: var(--slate-500);
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
}

.no-results.show {
  display: block;
}

.site-footer {
  margin-top: 64px;
  padding: 46px 0;
  color: var(--slate-300);
  background: var(--slate-950);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 32px;
}

.site-footer strong {
  display: block;
  margin-bottom: 10px;
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  margin: 0;
  max-width: 620px;
}

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

.footer-links a {
  color: var(--slate-300);
}

.footer-links a:hover {
  color: var(--teal-400);
}

@media (max-width: 1060px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .mobile-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    padding-top: 12px;
    border-top: 1px solid var(--slate-200);
  }

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

  .nav-link {
    width: 100%;
  }

  .nav-search {
    width: 100%;
    order: 4;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .rank-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-slider,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding: 96px 0 72px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 42px 0;
  }

  .grid,
  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }

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

  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-row input,
  .filter-row select {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-detail {
    grid-column: 2;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
