:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #06b6d4;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.15), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0%, #eef7f7 45%, #f8fafc 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.28);
}

.brand-text {
  font-size: 1.3rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--primary);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.header-search input,
.mobile-search input,
.filter-input,
.search-large input {
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
}

.header-search input {
  width: 180px;
  padding: 8px 4px 8px 12px;
}

.header-search button,
.mobile-search button,
.search-large button,
.primary-btn,
.secondary-btn,
.hero-dot,
.player-overlay {
  border: 0;
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.search-large button,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.24);
}

.header-search button {
  padding: 8px 14px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 8px 12px;
}

.mobile-search button {
  padding: 8px 16px;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  margin: 28px auto 42px;
  overflow: hidden;
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  align-items: end;
  padding: 58px;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

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

.hero-content {
  width: min(670px, 100%);
  color: white;
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(204, 251, 241, 0.95);
  font-size: 0.86rem;
  font-weight: 900;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn {
  min-height: 46px;
  padding: 0 22px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.13);
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-panel {
  position: absolute;
  right: 34px;
  bottom: 34px;
  width: min(420px, calc(100% - 68px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(20px);
  z-index: 3;
}

.hero-panel-title {
  margin: 0 0 12px;
  color: white;
  font-weight: 900;
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-thumb {
  position: relative;
  overflow: hidden;
  min-height: 88px;
  border-radius: 16px;
  opacity: 0.68;
  background-position: center;
  background-size: cover;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.hero-thumb span {
  position: absolute;
  inset: auto 8px 8px;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 56px;
  background: white;
}

.section-block {
  margin: 42px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 10px 0 0;
  color: var(--text);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.section-heading p,
.page-hero p,
.detail-title p,
.category-card p,
.movie-card p,
.rank-info p,
.detail-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.more-link {
  color: var(--primary);
  font-weight: 900;
}

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

.category-chip,
.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover,
.category-card:hover,
.movie-card:hover,
.rank-item:hover,
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-chip {
  padding: 22px;
}

.category-chip b,
.category-card h2 {
  display: block;
  margin-bottom: 8px;
  font-size: 1.14rem;
}

.category-chip span,
.movie-meta-line,
.breadcrumbs {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-poster img,
.rank-thumb img,
.related-card img,
.detail-poster img,
.category-sample img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img,
.rank-item:hover .rank-thumb img,
.related-card:hover img,
.category-card:hover .category-sample img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.8rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #94a3b8;
}

.movie-card h3,
.rank-info h3,
.related-card h3 {
  margin: 8px 0;
  color: var(--text);
  font-size: 1.07rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.related-card h3 a:hover {
  color: var(--primary);
}

.movie-card p {
  min-height: 72px;
  margin: 0 0 12px;
  font-size: 0.94rem;
}

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

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 130px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 950;
}

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

.rank-info h3,
.rank-info p {
  margin: 0 0 6px;
}

.page-hero {
  margin: 34px 0 28px;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 253, 250, 0.92));
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.page-hero p {
  max-width: 760px;
  margin: 12px 0 0;
}

.filter-bar,
.search-large {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 24px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.filter-input,
.search-large input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
}

.search-large button {
  min-height: 48px;
  padding: 0 24px;
}

.category-card {
  padding: 20px;
}

.category-sample {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.category-sample a {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 16px;
}

.breadcrumbs a {
  color: var(--primary);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.detail-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
}

.detail-title h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.detail-title p {
  font-size: 1.04rem;
}

.player-section {
  margin: 34px 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.62));
  z-index: 3;
}

.player-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 2rem;
  box-shadow: 0 22px 45px rgba(13, 148, 136, 0.35);
}

.player-overlay b {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.detail-copy,
.related-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
}

.detail-copy h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.detail-copy p {
  margin: 0 0 18px;
  font-size: 1rem;
}

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

.related-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card a:first-child {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.related-card h3,
.related-card p {
  margin: 0 0 6px;
}

.related-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 22px;
  color: var(--muted);
  background: white;
  text-align: center;
}

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

.site-footer {
  margin-top: 56px;
  padding: 42px 0 28px;
  background: #0f172a;
  color: #cbd5e1;
}

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

.footer-brand {
  color: white;
  font-size: 1.25rem;
}

.footer-inner p {
  max-width: 620px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  min-width: 160px;
}

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

.footer-copy {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 0.92rem;
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-slide {
    padding: 36px;
  }

  .hero-panel {
    display: none;
  }

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

  .rank-list,
  .detail-layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }
}

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

  .brand-text {
    font-size: 1.08rem;
  }

  .hero-carousel {
    min-height: 520px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 26px;
  }

  .hero-dots {
    left: 26px;
    bottom: 20px;
  }

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

  .category-strip,
  .category-grid,
  .movie-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 46px 96px 1fr;
    gap: 12px;
  }

  .filter-bar,
  .search-large {
    align-items: stretch;
    flex-direction: column;
    border-radius: 20px;
  }

  .search-large button {
    width: 100%;
  }

  .detail-hero,
  .detail-copy,
  .related-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .related-card {
    grid-template-columns: 100px 1fr;
  }
}
