:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.28);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), var(--white));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.25);
  font-size: 13px;
}

.brand-text {
  color: var(--slate-900);
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--slate-700);
  font-size: 15px;
  font-weight: 700;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--emerald-600);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--slate-900);
  background: var(--slate-100);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.mobile-nav a {
  display: block;
  padding: 12px;
  border-radius: 12px;
  color: var(--slate-700);
  font-weight: 700;
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 48px;
  padding: 92px 0 86px;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.hero-badges,
.hero-tags,
.detail-meta,
.ranking-meta,
.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-badges span,
.hero-badges strong,
.eyebrow,
.tag-row span,
.detail-meta span,
.ranking-meta span,
.card-meta span {
  border-radius: 999px;
}

.hero-badges span {
  background: var(--emerald-500);
  color: var(--white);
  padding: 6px 13px;
  font-size: 14px;
  font-weight: 800;
}

.hero-badges strong {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  padding: 6px 13px;
  font-size: 14px;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags span,
.large-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  padding: 7px 12px;
  font-weight: 700;
  font-size: 14px;
}

.hero-actions,
.detail-copy .primary-btn {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.28);
}

.ghost-btn {
  color: var(--white);
  margin-left: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.ranking-item:hover {
  transform: translateY(-3px);
}

.hero-poster {
  height: 430px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

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

.content-section,
.search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.search-panel {
  padding: 34px;
  margin-top: -44px;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 8px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.category-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--slate-900);
  letter-spacing: -0.04em;
}

.search-panel h2 {
  font-size: clamp(24px, 4vw, 36px);
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 0 20px;
  outline: none;
  font-size: 16px;
  color: var(--slate-800);
  background: var(--slate-50);
}

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

.search-box button {
  border: 0;
  min-width: 86px;
  border-radius: 999px;
  color: var(--white);
  background: var(--slate-900);
  font-weight: 800;
}

.search-results {
  display: none;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.search-results.open {
  display: grid;
}

.search-result-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.search-result-item:hover {
  transform: translateY(-2px);
  border-color: var(--emerald-500);
}

.search-result-item img {
  width: 58px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.search-result-item strong {
  display: block;
  color: var(--slate-900);
  line-height: 1.3;
}

.search-result-item span {
  display: block;
  color: var(--slate-500);
  font-size: 13px;
  margin-top: 3px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading a {
  color: var(--emerald-700);
  font-weight: 900;
}

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

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

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

.movie-card {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow-md);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--slate-100), var(--emerald-50));
  overflow: hidden;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--slate-900);
  background: var(--amber-400);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

.card-meta span {
  color: var(--slate-500);
  background: var(--slate-100);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.card-body h2 {
  margin: 10px 0 8px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.3;
}

.card-body p {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: var(--emerald-700);
  background: var(--emerald-50);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.content-band {
  background: linear-gradient(90deg, var(--emerald-50), #f0fdfa);
  padding: 42px 0;
}

.no-pad {
  padding: 0;
}

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 22px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.category-card:hover {
  box-shadow: var(--shadow-md);
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.split-section {
  background: var(--slate-900);
  color: var(--white);
}

.split-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 30px;
}

.split-section .section-heading h2,
.split-section .card-body h2,
.ranking-panel h2,
.ranking-panel .ranking-info h2 a {
  color: var(--white);
}

.split-section .movie-card,
.ranking-panel .ranking-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.split-section .card-body p,
.ranking-panel .ranking-info p {
  color: rgba(255, 255, 255, 0.68);
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-number {
  color: var(--emerald-700);
  font-size: 20px;
  font-weight: 900;
}

.ranking-thumb {
  display: block;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--slate-100);
}

.ranking-info h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.35;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--slate-500);
  font-size: 14px;
}

.ranking-meta span {
  color: var(--slate-500);
  background: var(--slate-100);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.page-hero,
.category-hero,
.detail-hero {
  color: var(--white);
  background-color: var(--slate-900);
  background-size: cover;
  background-position: center;
}

.page-hero {
  background-image: linear-gradient(135deg, var(--slate-900), var(--emerald-700));
}

.page-hero-inner,
.category-hero-inner,
.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

.page-hero h1,
.category-hero h1,
.detail-copy h1 {
  color: var(--white);
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1;
}

.page-hero p,
.category-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.category-overview {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
}

.category-cover {
  min-height: 260px;
  display: flex;
  align-items: end;
  padding: 22px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  border-radius: 22px;
}

.category-cover span {
  font-size: 28px;
  font-weight: 900;
}

.category-overview-body h2 {
  margin: 4px 0 8px;
  color: var(--slate-900);
  font-size: 28px;
}

.category-overview-body p {
  color: var(--slate-500);
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-hero .breadcrumb,
.detail-hero .breadcrumb {
  margin-bottom: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  height: 450px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.detail-meta {
  margin: 20px 0;
}

.detail-meta span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 12px;
  font-weight: 800;
}

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

.player-card {
  padding: 14px;
  background: var(--slate-900);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.7));
  cursor: pointer;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.38);
  font-size: 28px;
}

.player-start strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.player-start.hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.prose-card {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
}

.prose-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.prose-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 16px;
}

.site-footer {
  margin-top: 54px;
  color: var(--slate-300);
  background: var(--slate-900);
}

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

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

.footer-about p {
  max-width: 520px;
  color: var(--slate-400);
}

.footer-links h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin: 8px 0;
}

.footer-links a:hover {
  color: var(--emerald-500);
}

@media (max-width: 1024px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

  .hero-content,
  .detail-layout,
  .category-overview-card,
  .split-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    display: none;
  }

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

  .small-grid,
  .mini-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-panel {
    position: static;
  }
}

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

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

  .hero-carousel,
  .hero-content {
    min-height: 600px;
  }

  .hero-content {
    padding-top: 86px;
    padding-bottom: 82px;
  }

  .hero-actions {
    display: grid;
    gap: 12px;
  }

  .ghost-btn {
    margin-left: 0;
  }

  .search-panel {
    padding: 22px;
  }

  .search-panel-inner {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 48px;
  }

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

  .movie-grid,
  .compact-grid,
  .small-grid,
  .category-grid,
  .mini-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-overview-card {
    padding: 12px;
  }

  .category-cover {
    min-height: 190px;
  }

  .ranking-item {
    grid-template-columns: 42px 62px minmax(0, 1fr);
  }

  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    display: block;
    height: 420px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .compact-grid,
  .small-grid,
  .mini-card-row {
    grid-template-columns: 1fr;
  }

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

  .page-hero-inner,
  .category-hero-inner,
  .detail-hero-inner {
    padding: 54px 0;
  }
}
