:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --brand: #10b981;
  --brand-2: #14b8a6;
  --brand-3: #059669;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.36);
}

.logo-text,
.footer-logo {
  font-size: 20px;
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #e2e8f0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-button:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.86);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 210px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: #1e293b;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a,
.mobile-links a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e2e8f0;
}

.dropdown-panel a:hover,
.mobile-links a:hover {
  background: #334155;
  color: #fff;
}

.header-search,
.mobile-search {
  display: flex;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  outline: none;
}

.header-search input,
.mobile-search input {
  width: 245px;
  padding: 0 14px;
  color: #fff;
  background: #334155;
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.play-button {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.24);
}

.header-search button,
.mobile-search button {
  padding: 0 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #334155;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.hero-slider {
  position: relative;
  height: min(80vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.14));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  color: #fff;
}

.hero-kicker,
.poster-badge,
.card-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
}

.hero-kicker {
  padding: 7px 14px;
  margin-bottom: 18px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

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

.hero-tags span,
.detail-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(2, 6, 23, 0.52);
  font-size: 36px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  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.6);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.section {
  padding: 74px 0;
}

.section.dark {
  color: #fff;
  background: #0f172a;
}

.section.soft {
  background: linear-gradient(180deg, #f8fafc, #fff);
}

.section.tint {
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

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

.section-title h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.section-title p,
.page-hero p,
.detail-title p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
}

.dark .section-title p {
  color: #cbd5e1;
}

.more-link {
  color: var(--brand-3);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

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

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.76));
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.38;
}

.card-body h3 a:hover {
  color: var(--brand-3);
}

.card-desc {
  min-height: 50px;
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 128px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-num {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 22px;
  font-weight: 900;
}

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

.rank-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

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

.rank-copy em {
  color: #64748b;
  font-style: normal;
}

.rank-copy small {
  color: #94a3b8;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  transition: 0.25s ease;
}

.category-card:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: inherit;
  line-height: 1.7;
}

.page-hero {
  padding: 70px 0;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(20, 184, 166, 0.26), transparent 28%),
    linear-gradient(135deg, #0f172a, #111827 55%, #064e3b);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
}

.breadcrumb a {
  color: #a7f3d0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px 160px;
  gap: 12px;
  margin: 26px 0 30px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.66), rgba(15, 23, 42, 0.28));
}

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

.play-button {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 36px;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.35);
}

.detail-card,
.side-card {
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-title {
  margin: 28px 0;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #065f46;
  background: #d1fae5;
  font-weight: 700;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  color: #334155;
  line-height: 2;
}

.side-card {
  position: sticky;
  top: 96px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 88px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  margin-bottom: 4px;
}

.side-link small {
  color: #64748b;
}

.site-footer {
  padding: 46px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  max-width: 560px;
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: #1e293b;
}

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .container,
  .header-inner,
  .mobile-panel {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content {
    padding: 74px 0 42px;
    justify-content: flex-end;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .section-title,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-cards,
  .grid-cards.large,
  .category-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .rank-item img {
    width: 96px;
    height: 62px;
  }

  .section {
    padding: 52px 0;
  }
}
