:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --cyan: #0891b2;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --card: #ffffff;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.35);
  font-size: 14px;
}

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

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--emerald);
}

.header-search,
.mobile-search,
.big-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input: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);
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: #ffffff;
  background: var(--emerald);
  font-weight: 700;
  cursor: pointer;
}

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

.menu-toggle span {
  width: 19px;
  height: 2px;
  background: #374151;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  display: block;
  padding: 12px 0;
  color: #374151;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background-image: linear-gradient(135deg, rgba(5, 150, 105, 0.86), rgba(13, 148, 136, 0.78), rgba(8, 145, 178, 0.82)), var(--cover);
  background-size: cover;
  background-position: center;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.14));
}

.hero-inner,
.hero-inner-simple {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 1200px;
  min-height: 520px;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.detail-tags,
.card-meta,
.hero-actions,
.detail-actions,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.detail-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 13px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

.primary-btn,
.ghost-btn,
.ghost-light-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  padding: 13px 20px;
  background: #ffffff;
  color: var(--emerald-dark);
  box-shadow: var(--shadow);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ghost-btn {
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.ghost-light-btn {
  padding: 12px 18px;
  border: 1px solid var(--line);
  color: var(--emerald-dark);
  background: #ffffff;
}

.text-link {
  color: var(--emerald);
  gap: 6px;
}

.text-link:hover {
  color: var(--emerald-dark);
}

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

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

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

.section-wrap {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 36px;
}

.section-eyebrow {
  margin: 0 0 10px;
  color: var(--emerald);
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-wrap h2,
.page-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-wrap p {
  color: var(--muted);
}

.big-search {
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.big-search input {
  flex: 1;
  min-width: 0;
  border-color: transparent;
}

.big-search button {
  padding-left: 24px;
  padding-right: 24px;
}

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

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

.featured-grid .movie-card:first-child {
  grid-column: span 1;
}

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

.movie-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover,
.feature-cover,
.ranking-cover,
.detail-poster,
.player-poster {
  position: relative;
  display: block;
  background-image: linear-gradient(135deg, rgba(5, 150, 105, 0.9), rgba(8, 145, 178, 0.74)), var(--cover);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-cover {
  height: 218px;
}

.card-cover::after,
.feature-cover::after,
.ranking-cover::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.08);
  transition: background 0.25s ease;
}

.movie-card:hover .card-cover::after,
.feature-row:hover .feature-cover::after,
.ranking-item:hover .ranking-cover::after {
  background: rgba(0, 0, 0, 0.34);
}

.play-float,
.feature-cover span {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--emerald-dark);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-float,
.feature-row:hover .feature-cover span {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--emerald);
}

.card-body p {
  display: -webkit-box;
  min-height: 45px;
  margin: 8px 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  color: #6b7280;
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: #9ca3af;
}

.soft-section {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

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

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

.category-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 22px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(5, 150, 105, 0.25);
  box-shadow: var(--shadow);
}

.tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d1fae5;
  color: var(--emerald-dark);
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  font-size: 18px;
}

.category-tile em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

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

.ranking-card {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f3f4f6;
}

.rank-no {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf5;
  color: var(--emerald-dark);
  font-weight: 900;
  font-size: 13px;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-meta {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.full-btn {
  width: 100%;
  background: var(--emerald);
  color: #ffffff;
}

.feature-list {
  display: grid;
  gap: 24px;
}

.feature-row {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.feature-cover {
  min-height: 280px;
}

.feature-copy {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-copy span {
  color: var(--emerald);
  font-weight: 800;
}

.feature-copy h3 {
  margin: 10px 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.feature-copy p {
  margin: 0 0 20px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
  color: #ffffff;
}

.page-hero .section-wrap {
  position: relative;
  z-index: 2;
}

.page-hero h1,
.page-hero p,
.page-hero .section-eyebrow {
  color: #ffffff;
}

.small-hero .section-wrap {
  padding-top: 76px;
  padding-bottom: 76px;
}

.category-hero {
  background-image: linear-gradient(135deg, rgba(5, 150, 105, 0.88), rgba(8, 145, 178, 0.82)), var(--cover);
  background-size: cover;
  background-position: center;
}

.hero-inner-simple {
  padding-top: 90px;
  padding-bottom: 90px;
}

.toolbar-section {
  padding-top: 36px;
}

.filter-bar {
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-bar input {
  flex: 1;
}

.filter-bar select {
  min-width: 150px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.ranking-cover {
  min-height: 115px;
  border-radius: 16px;
}

.ranking-cover span {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--emerald-dark);
  font-weight: 900;
}

.ranking-info h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  min-height: 520px;
  background-image: linear-gradient(135deg, rgba(5, 150, 105, 0.86), rgba(8, 145, 178, 0.82)), var(--cover);
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.detail-head {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 64px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  height: 405px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.detail-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
}

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

.detail-actions {
  margin-top: 28px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-top: 42px;
}

.player-card,
.info-card,
.text-panel {
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  background: #000000;
}

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

.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.64)), var(--cover);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-card.is-started .player-poster {
  display: none;
}

.player-poster span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--emerald-dark);
  box-shadow: var(--shadow-lg);
  font-size: 28px;
}

.player-toolbar {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #111827;
}

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

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

.info-card,
.text-panel {
  padding: 30px;
}

.info-card h2,
.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.info-card p,
.text-panel p {
  margin: 0;
  color: #374151;
  line-height: 1.85;
}

.meta-panel dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px 20px;
  margin: 0;
}

.meta-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.meta-panel dd {
  margin: 0;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-links a {
  color: var(--emerald);
  font-weight: 800;
}

.search-page-form {
  max-width: 720px;
  margin-top: 28px;
}

.text-panel {
  margin-top: 38px;
  margin-bottom: 36px;
}

.quick-links {
  margin-top: 24px;
}

.site-footer {
  margin-top: 60px;
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 34px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 44px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 540px;
  color: #d1d5db;
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

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

.copyright {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

  .ranking-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-shell {
    height: 66px;
  }

  .brand {
    font-size: 19px;
  }

  .hero,
  .hero-inner {
    min-height: 560px;
  }

  .section-wrap {
    width: min(100% - 32px, 1200px);
    padding: 46px 0;
  }

  .card-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .category-grid.large,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row,
  .detail-grid,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: 240px;
    height: 340px;
  }

  .filter-bar,
  .big-search {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar select,
  .big-search button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    padding: 0 16px;
  }

  .mobile-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .card-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .category-grid.large,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-cover {
    height: 230px;
  }

  .feature-copy,
  .info-card,
  .text-panel {
    padding: 22px;
  }

  .player-toolbar {
    flex-wrap: wrap;
  }

  .meta-panel dl {
    grid-template-columns: 1fr;
  }
}
