:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #eef2f7;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.12);
  --card: rgba(255, 255, 255, 0.88);
  --dark: #0f172a;
  --teal: #14b8a6;
  --teal-strong: #0d9488;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(51, 65, 85, 0.96), rgba(15, 23, 42, 0.96));
  color: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.35);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: #e2e8f0;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: #2dd4bf;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  margin: 4px 0;
}

.hero-section {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 16%, rgba(20, 184, 166, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - 1280px) / 2));
  padding: 84px 0 138px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  color: #5eead4;
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(94, 234, 212, 0.22);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 22px;
  max-width: 690px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 28px;
}

.hero-meta span,
.detail-meta-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(226, 232, 240, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 16px 34px rgba(20, 184, 166, 0.34);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-thumbs {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(1280px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 8px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(16px);
  cursor: pointer;
  text-align: left;
}

.hero-thumb img {
  width: 58px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.hero-thumb.is-active {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 14px 34px rgba(20, 184, 166, 0.22);
}

.home-search-wrap,
.content-section,
.search-panel {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-wrap {
  margin-top: -34px;
  position: relative;
  z-index: 10;
}

.search-panel {
  margin-top: 28px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.search-panel label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.search-panel input,
.search-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.search-count {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: #0f766e;
  background: #ccfbf1;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #115e59);
  overflow: hidden;
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.05);
}

.movie-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

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

.movie-title {
  display: block;
  min-height: 48px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.movie-title:hover {
  color: var(--teal-strong);
}

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

.movie-one-line {
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.movie-tags span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-panel,
.detail-text-card,
.category-overview-card,
.player-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.rank-panel {
  align-self: start;
  padding: 20px;
}

.compact-heading {
  display: block;
  margin-bottom: 14px;
}

.compact-heading .section-link {
  margin-top: 14px;
}

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

.rank-mini-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 10px;
  background: #f8fafc;
}

.rank-no {
  color: var(--teal-strong);
  font-weight: 900;
}

.rank-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-score {
  color: #f97316;
  font-size: 13px;
}

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

.category-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 18px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.86));
}

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

.category-card span,
.category-card small {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card small {
  margin-top: 6px;
  color: #d1fae5;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.35), transparent 34%), linear-gradient(135deg, #0f172a, #334155);
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  border-radius: 32px;
  padding: clamp(42px, 7vw, 86px);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  line-height: 1.8;
}

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

.category-overview-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 230px 1fr;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  min-height: 220px;
  background: #0f172a;
}

.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.category-overview-body h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.category-overview-body p {
  color: var(--muted);
  line-height: 1.8;
}

.category-overview-body span {
  display: inline-flex;
  margin-top: 10px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 900;
}

.detail-hero {
  min-height: 620px;
}

.detail-bg div {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(20, 184, 166, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.42));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

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

.breadcrumb a:hover {
  color: #5eead4;
}

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

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info {
  max-width: 820px;
}

.detail-one-line {
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.85;
}

.detail-tags span {
  color: #cffafe;
  background: rgba(20, 184, 166, 0.22);
  border: 1px solid rgba(94, 234, 212, 0.24);
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: #020617;
}

.movie-player {
  display: block;
  width: 100%;
  min-height: 420px;
  max-height: 74vh;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 178px;
  height: 178px;
  border: 0;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at 30% 20%, #2dd4bf, #0f766e);
  box-shadow: 0 24px 80px rgba(20, 184, 166, 0.42);
  cursor: pointer;
}

.player-start span {
  font-size: 38px;
  transform: translateX(3px);
}

.player-start strong {
  font-size: 18px;
}

.player-start.is-hidden {
  display: none;
}

.player-status {
  position: absolute;
  left: 20px;
  bottom: 16px;
  z-index: 3;
  margin: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.76);
  font-size: 13px;
}

.detail-text-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}

.detail-text-card {
  padding: 26px;
}

.detail-text-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.detail-text-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 2;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.rank-cover {
  display: block;
  width: 96px;
  height: 130px;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
}

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

.rank-row h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.rank-position {
  color: var(--teal-strong);
  font-weight: 900;
}

.score {
  justify-self: end;
  color: #f97316;
  font-size: 22px;
}

.site-footer {
  margin-top: 42px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 28px;
}

.footer-brand strong {
  color: #ffffff;
  font-size: 24px;
}

.footer-brand p {
  max-width: 620px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 24px 0;
}

.footer-links a:hover {
  color: #5eead4;
}

.copyright {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
}

[data-card].is-hidden {
  display: none !important;
}

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

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

  .two-column-layout,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 20px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .search-panel-inner,
  .detail-layout,
  .category-overview-grid,
  .category-overview-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }

  .rank-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .score {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero-section,
  .hero-slider,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding-bottom: 210px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    max-height: 184px;
    overflow: auto;
  }

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

  .page-hero {
    border-radius: 24px;
    padding: 34px 22px;
  }

  .content-section {
    padding: 30px 0;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    margin-top: 14px;
  }

  .player-shell,
  .movie-player {
    min-height: 300px;
  }

  .player-start {
    width: 140px;
    height: 140px;
  }
}
