:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --dark: #020617;
  --emerald: #10b981;
  --emerald-deep: #059669;
  --teal: #0d9488;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 22px 45px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.nav-wrap,
.wide-wrap,
.footer-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark,
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #334155;
  font-weight: 600;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--emerald-deep);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  padding: 8px 16px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 11px 4px;
  color: #334155;
  font-weight: 650;
}

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

.hero-slider {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--dark);
}

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

.hero-slide.is-active {
  opacity: 1;
  z-index: 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 20% 40%, rgba(16, 185, 129, 0.28), transparent 32%),
    linear-gradient(to top, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero-copy {
  width: min(760px, 100%);
  color: #ffffff;
}

.hero-tags,
.detail-meta,
.tag-row,
.filter-row,
.detail-tags div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}

.hero-copy h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions,
.search-box,
.section-heading,
.rank-card a {
  display: flex;
  align-items: center;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.section-more,
.category-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  border: 0;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.category-enter:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.full-btn {
  width: 100%;
  margin-top: 16px;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 38px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.home-search {
  margin-top: -36px;
  position: relative;
  z-index: 6;
}

.search-box,
.search-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.search-box {
  padding: 18px;
  justify-content: space-between;
}

.search-box strong {
  display: block;
  font-size: 18px;
}

.search-box span,
.section-heading p,
.page-hero span,
.movie-meta,
.match-count {
  color: var(--muted);
  font-size: 14px;
}

.search-box label {
  flex: 1;
  min-width: 220px;
}

.search-box input,
.search-panel input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--soft);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
}

.search-box input:focus,
.search-panel input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.page-stack {
  padding: 52px 0;
}

.standard-page {
  padding-top: 34px;
}

.content-section + .content-section,
.category-grid + .content-section {
  margin-top: 58px;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

.section-heading p {
  margin: 3px 0 0;
}

.section-more {
  color: var(--emerald-deep);
  min-height: auto;
  padding: 0;
}

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

.compact-grid {
  gap: 18px;
}

.movie-card {
  min-width: 0;
}

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.movie-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #115e59);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.70), transparent 46%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-link:hover .movie-cover::after {
  opacity: 1;
}

.year-badge,
.play-badge,
.rank-mark {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  background: var(--emerald);
  color: #ffffff;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(255, 255, 255, 0.88);
  color: var(--emerald-deep);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-link:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-mark {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #f59e0b;
  color: #ffffff;
}

.movie-info {
  padding: 13px;
}

.movie-info h3 {
  margin: 0 0 7px;
  min-height: 42px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-link:hover h3 {
  color: var(--emerald-deep);
}

.movie-meta,
.movie-line {
  margin: 0;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin-top: 7px;
  color: #475569;
  font-size: 13px;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}

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

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

.rank-card a {
  min-height: 112px;
  align-items: stretch;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-card img {
  width: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-card h3 {
  margin: 6px 0 4px;
  font-size: 16px;
}

.rank-card p,
.rank-card span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rank-card span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-num {
  width: 38px;
  min-width: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ecfdf5;
  color: var(--emerald-deep);
  font-size: 18px;
  font-weight: 900;
}

.page-hero {
  border-radius: 28px;
  padding: 44px;
  background: linear-gradient(135deg, #064e3b, #0f766e 50%, #0f172a);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.page-hero p {
  margin: 0 0 10px;
  color: #a7f3d0;
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.page-hero span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

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

.breadcrumb a:hover {
  color: var(--emerald-deep);
}

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

.breadcrumb.dark strong,
.breadcrumb.dark a:hover {
  color: #ffffff;
}

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

.category-card-inner {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-image {
  display: block;
  min-height: 100%;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

.category-body {
  padding: 22px 22px 22px 0;
}

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

.category-title-link:hover h2 {
  color: var(--emerald-deep);
}

.category-card p {
  margin: 0 0 14px;
  color: #475569;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.category-samples a {
  display: inline-flex;
  min-height: auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
}

.category-samples a:hover {
  background: #ecfdf5;
  color: var(--emerald-deep);
}

.category-enter {
  margin-top: 16px;
  padding: 0;
  color: var(--emerald-deep);
}

.search-panel {
  padding: 20px;
}

.search-panel label span {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-weight: 800;
}

.filter-row {
  margin-top: 14px;
}

.filter-chip {
  border: 1px solid var(--soft);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  padding: 8px 13px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--emerald);
  background: #ecfdf5;
  color: #047857;
}

.match-count {
  min-height: 20px;
  margin: 12px 0 0;
}

.detail-head {
  padding: 34px 0 42px;
  background: radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.28), transparent 30%), #0f172a;
  color: #ffffff;
}

.detail-head h1 {
  max-width: 900px;
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
}

.detail-head p {
  max-width: 900px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.detail-main {
  min-width: 0;
}

.player-card,
.detail-panel,
.side-card {
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16));
  transition: opacity 0.25s ease;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.34);
}

.detail-panel {
  margin-top: 24px;
  padding: 26px;
}

.detail-panel h2,
.info-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-panel p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 16px;
}

.detail-tags {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.detail-tags strong {
  margin-right: 4px;
  color: #0f172a;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 18px;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
}

.info-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.info-card dt {
  color: #64748b;
}

.info-card dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
}

.info-card a {
  color: var(--emerald-deep);
}

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

.footer-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo,
.footer-logo span:last-child {
  color: #ffffff;
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-slider {
    height: 560px;
  }

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

  .rank-section .rank-list,
  .category-grid,
  .footer-wrap,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .category-card-inner {
    grid-template-columns: 150px 1fr;
  }
}

@media (max-width: 720px) {
  .nav-wrap,
  .wide-wrap,
  .footer-wrap,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .hero-slider {
    height: 530px;
  }

  .hero-content {
    width: min(100% - 24px, 1280px);
    padding-bottom: 66px;
  }

  .hero-actions,
  .search-box,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-dots {
    left: 12px;
    right: auto;
    bottom: 28px;
  }

  .home-search {
    margin-top: 14px;
  }

  .search-box {
    padding: 16px;
  }

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

  .movie-info {
    padding: 11px;
  }

  .movie-line {
    min-height: 40px;
  }

  .page-hero {
    padding: 28px 20px;
    border-radius: 22px;
  }

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

  .category-card img {
    height: 240px;
  }

  .category-body {
    padding: 20px;
  }

  .rank-card a {
    gap: 10px;
  }

  .rank-card img {
    width: 74px;
  }

  .rank-num {
    width: 32px;
    min-width: 32px;
  }

  .detail-head p {
    font-size: 16px;
  }

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

  .play-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}

@media (max-width: 430px) {
  .movie-grid {
    gap: 12px;
  }

  .movie-info h3 {
    font-size: 14px;
  }

  .year-badge {
    top: 8px;
    right: 8px;
  }
}
