:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #10b981;
  --brand-dark: #059669;
  --dark: #020617;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  color: #fff;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

.desktop-nav {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  color: #334155;
  font-size: 14px;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--brand-dark);
}

.header-search {
  display: flex;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.header-search input,
.quick-search-panel input,
.category-hero-panel input,
.ranking-search,
.search-page-form input {
  width: 100%;
  border: 0;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.header-search input {
  padding: 10px 14px;
}

.header-search button,
.search-page-form button {
  border: 0;
  padding: 0 16px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #334155;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1000ms ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(16, 185, 129, 0.30), transparent 26%),
    linear-gradient(to top, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
}

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: white;
}

.hero-label {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.1;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-actions,
.detail-meta-row,
.movie-meta,
.footer-links,
.pill-group,
.hero-dots {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-button {
  padding: 13px 24px;
  background: var(--brand);
  color: #fff;
}

.primary-button:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.ghost-button {
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-dots {
  position: absolute;
  right: 40px;
  bottom: 36px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 220ms ease, background 220ms ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--brand);
}

.quick-search-panel,
.content-section,
.page-shell,
.detail-shell {
  width: min(1280px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 20px;
  align-items: center;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.quick-search-panel strong {
  display: block;
  font-size: 20px;
}

.quick-search-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.quick-search-panel input,
.category-hero-panel input,
.ranking-search,
.search-page-form input {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

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

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.section-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  color: #fff;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.30);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
}

.section-heading p {
  margin: 2px 0 0;
  color: var(--muted);
}

.section-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.more-link {
  padding: 9px 14px;
  color: var(--brand-dark);
  background: #ecfdf5;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.14);
}

.poster-link,
.related-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.35), transparent 36%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-link {
  aspect-ratio: 2 / 3;
}

.poster-link img,
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, opacity 220ms ease;
}

.poster-link:hover img,
.related-item:hover img {
  transform: scale(1.06);
}

.poster-missing::after {
  content: "高清影片";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  letter-spacing: 0.2em;
}

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-year {
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
  color: white;
  font-size: 12px;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: white;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

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

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

.movie-meta {
  color: #64748b;
  font-size: 12px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.movie-tags span,
.pill-group span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
}

.movie-category-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

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

.ranking-card,
.ranking-line,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.ranking-card {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.ranking-card span,
.rank-number {
  color: var(--brand-dark);
  font-weight: 900;
}

.ranking-card em,
.ranking-line em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-shell {
  padding: 42px 0 70px;
}

.page-title-block,
.category-hero-panel {
  margin-bottom: 28px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  box-shadow: var(--shadow);
}

.page-title-block h1,
.category-hero-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 44px);
}

.page-title-block p,
.category-hero-panel p {
  margin: 0;
  color: var(--muted);
}

.category-hero-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 20px;
  align-items: end;
}

.category-hero-panel span {
  color: var(--brand-dark);
  font-weight: 800;
}

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

.category-overview-card {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

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

.category-overview-card strong {
  color: var(--brand-dark);
}

.category-overview-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: #475569;
}

.category-overview-card li + li {
  margin-top: 6px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--brand-dark);
}

.breadcrumb.dark {
  color: rgba(255, 255, 255, 0.62);
}

.breadcrumb.dark strong {
  color: #fff;
}

.detail-top {
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.24), transparent 28%),
    linear-gradient(135deg, #020617, #0f172a 60%, #111827);
  color: #fff;
}

.detail-top-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
}

.detail-top h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 48px);
}

.detail-top p {
  max-width: 860px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
}

.detail-meta-row span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.86);
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 26px;
  padding: 30px 0 0;
}

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.video-player {
  position: relative;
  overflow: hidden;
  background: #000;
}

.video-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.26), transparent 30%),
    rgba(0, 0, 0, 0.62);
  color: white;
  text-align: center;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play-button {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.38);
}

.player-tools {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent);
}

.player-tools button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
}

.detail-card,
.side-card {
  padding: 24px;
}

.detail-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.pill-group {
  margin: 0 0 16px;
}

.pill-group strong {
  margin-right: 4px;
}

.text-block {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.text-block h3 {
  margin: 0 0 10px;
}

.text-block p {
  margin: 0;
  color: #334155;
}

.detail-sidebar {
  align-self: start;
  position: sticky;
  top: 92px;
}

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

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

.related-thumb {
  width: 112px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}

.related-info strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.detail-more {
  padding-bottom: 72px;
}

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

.ranking-line {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
}

.ranking-line:hover {
  border-color: rgba(16, 185, 129, 0.45);
}

.ranking-line b {
  color: var(--brand-dark);
  font-size: 13px;
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.search-page-form button {
  border-radius: 14px;
  min-width: 110px;
}

.search-status {
  margin: 18px 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.footer-inner p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .mobile-nav.is-open {
    display: block;
  }

  .hero {
    height: 520px;
  }

  .quick-search-panel,
  .category-hero-panel,
  .detail-shell,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

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

  .ranking-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .ranking-line {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .ranking-line em,
  .ranking-line b {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 12px 16px;
  }

  .site-logo {
    font-size: 17px;
  }

  .hero {
    height: 500px;
  }

  .hero-copy {
    bottom: 78px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
  }

  .quick-search-panel,
  .content-section,
  .page-shell,
  .detail-shell,
  .detail-top-inner,
  .footer-inner {
    width: min(100% - 28px, 1280px);
  }

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

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

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

  .player-tools {
    position: static;
    background: #020617;
  }

  .player-tools button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
  }
}
