:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #10b981;
  --accent-2: #14b8a6;
  --accent-dark: #059669;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
}

.brand-text,
.footer-brand {
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

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

.nav-link:hover,
.nav-link.is-active,
.nav-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  border-radius: 16px;
  background: #1e293b;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

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

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 14px;
  outline: 0;
}

.header-search input {
  width: 220px;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.header-search input::placeholder,
.mobile-panel input::placeholder {
  color: #94a3b8;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  min-height: 40px;
  padding: 0 18px;
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(16, 185, 129, 0.35);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  background: #1e293b;
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #e2e8f0;
}

.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-panel input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(620px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 20px 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

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

.hero-tags span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 800;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--accent);
}

.content-section,
.page-shell,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.content-section.alt {
  width: 100%;
  padding: 64px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(180deg, #f1f5f9, #fff);
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(28px, 4vw, 42px);
}

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

.section-more {
  color: var(--accent-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

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

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-body {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 16px;
}

.movie-card-compact .card-body {
  min-height: 176px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.card-body h2,
.rank-card h2 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-card h2 a:hover,
.prose-card a:hover {
  color: var(--accent-dark);
}

.card-body p {
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
}

.card-body .tag-row {
  margin-top: auto;
}

.card-body .tag-row span,
.meta-pill {
  background: #ecfdf5;
  color: #047857;
}

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

.category-tile {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #047857);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: #d1fae5;
  font-size: 14px;
}

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-no {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

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

.rank-card h2 {
  margin-top: 0;
}

.rank-card p {
  margin: 0 0 10px;
  color: #475569;
  font-size: 14px;
}

.page-hero {
  padding: 54px 0 34px;
  background: radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.14), transparent 28%), linear-gradient(180deg, #fff, #f8fafc);
}

.page-shell {
  padding-bottom: 64px;
}

.page-title {
  margin-bottom: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #047857;
  font-weight: 700;
}

.filter-card {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 130px;
  gap: 12px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
}

.filter-bar button {
  min-height: 46px;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  color: #64748b;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #020617;
  color: #fff;
}

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

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
  filter: blur(8px) saturate(1.15);
  transform: scale(1.04);
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.78));
}

.detail-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  padding: 54px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.46);
}

.detail-title h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-title p {
  color: #cbd5e1;
  font-size: 18px;
}

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.player-card,
.prose-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.player-card {
  padding: 18px;
  margin-bottom: 26px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.play-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 22px 55px rgba(16, 185, 129, 0.38);
  font-size: 34px;
  padding-left: 5px;
}

.prose-card {
  padding: 28px;
}

.prose-card + .prose-card {
  margin-top: 26px;
}

.prose-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.prose-card p {
  margin: 0 0 16px;
  color: #334155;
}

.side-card {
  padding: 20px;
  margin-bottom: 22px;
}

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

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

.side-item img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.side-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}

.side-item p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 22px;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
}

.site-footer p {
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

.site-footer li {
  list-style: none;
  margin: 7px 0;
}

.site-footer a:hover {
  color: #34d399;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

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

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

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

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-slide::after {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.95));
  }

  .hero-content {
    left: 20px;
    top: auto;
    bottom: 86px;
    transform: none;
  }

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

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

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

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

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

  .detail-shell {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

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

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

  .brand-text {
    font-size: 18px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .content-section,
  .page-shell,
  .detail-layout,
  .detail-shell {
    width: min(100% - 24px, 1180px);
  }

  .content-section,
  .content-section.alt {
    padding-top: 44px;
    padding-bottom: 44px;
  }

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

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

  .rank-card {
    grid-template-columns: 86px 1fr;
  }

  .card-body {
    min-height: auto;
  }

  .prose-card {
    padding: 20px;
  }
}
