:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-light: #d1fae5;
  --teal: #0d9488;
  --amber: #f59e0b;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.11), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  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;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  box-shadow: 0 14px 24px rgba(5, 150, 105, 0.28);
}

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

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

.nav-link,
.mobile-link {
  color: var(--muted);
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--accent-dark);
  background: var(--accent-light);
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-link {
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
}

main {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  min-height: 670px;
  display: grid;
  align-items: center;
  color: #ffffff;
  background: #0f172a;
  overflow: hidden;
}

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

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

.hero-slide img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.52);
  transform: scale(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.78) 40%, rgba(15, 23, 42, 0.28) 100%),
    radial-gradient(circle at 25% 30%, rgba(16, 185, 129, 0.45), transparent 22rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 104px 20px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  align-items: center;
  gap: 48px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #065f46;
  background: rgba(209, 250, 229, 0.96);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  box-shadow: 0 16px 34px rgba(5, 150, 105, 0.32);
}

.btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.btn-light {
  color: var(--accent-dark);
  background: #ffffff;
  border-color: var(--line);
}

.hero-poster-wrap {
  position: relative;
  justify-self: end;
}

.hero-poster-wrap::before {
  content: "";
  position: absolute;
  inset: 30px -22px -22px 24px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.56), rgba(20, 184, 166, 0.2));
  filter: blur(6px);
}

.hero-poster {
  position: relative;
  width: 320px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-bottom: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tag-row span {
  color: var(--accent-dark);
  background: var(--accent-light);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.hero-search {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: -42px auto 0;
  padding: 0 20px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(16px);
}

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

.search-panel input:focus,
.search-panel select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.section {
  padding: 76px 0;
}

.section-title,
.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-title h2,
.page-title h1 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 22px;
}

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

.movie-card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.34);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

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

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

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

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-meta a {
  color: var(--accent-dark);
}

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

.movie-card p {
  margin: 0 0 12px;
  min-height: 45px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 214px;
  padding: 24px;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -64px;
  bottom: -64px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
}

.category-card strong {
  font-size: 23px;
  letter-spacing: -0.03em;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-card span {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent-dark);
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.info-panel,
.detail-panel {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.rank-panel {
  padding: 20px;
  position: sticky;
  top: 96px;
}

.rank-panel h2,
.info-panel h2,
.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.22s ease, transform 0.22s ease;
}

.rank-item:hover {
  background: var(--panel-soft);
  transform: translateX(3px);
}

.rank-item img {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy strong {
  font-size: 15px;
}

.rank-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.page-hero {
  padding: 68px 0 44px;
  background:
    linear-gradient(135deg, rgba(209, 250, 229, 0.78), rgba(240, 253, 250, 0.82)),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.detail-hero {
  padding: 44px 0 30px;
  background: #0f172a;
  color: #ffffff;
}

.detail-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.detail-cover {
  width: 220px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
  margin: 10px 0 14px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 850px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ecfeff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.watch-section {
  padding: 34px 0 80px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.23);
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: brightness(0.72);
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  box-shadow: 0 18px 44px rgba(5, 150, 105, 0.38);
}

.player-frame.is-playing .player-cover {
  display: none;
}

.detail-panel,
.info-panel {
  padding: 24px;
}

.detail-panel p,
.info-panel p {
  color: var(--muted);
}

.detail-info-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.detail-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-info-list span {
  color: var(--muted);
}

.article-content {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.article-content section {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.article-content h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.article-content p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

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

.search-empty {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.site-footer {
  margin-top: 60px;
  background: #0f172a;
  color: #e2e8f0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 38px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.site-footer p {
  margin: 8px 0 0;
  color: #94a3b8;
}

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

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

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

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

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

  .split-layout,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 90px;
    gap: 32px;
  }

  .hero-poster-wrap {
    justify-self: start;
  }

  .hero-poster {
    width: 220px;
  }

  .search-panel,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-cover {
    width: 180px;
  }

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

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

  .container {
    padding: 0 14px;
  }

  .hero-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .movie-grid,
  .related-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    display: none;
  }
}
