:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --amber-400: #f59e0b;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-xl: 0 30px 80px rgba(15, 23, 42, 0.25);
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--cyan-400));
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.32);
}

.brand-name {
  font-size: 22px;
  letter-spacing: 0.02em;
  color: transparent;
  background: linear-gradient(90deg, var(--emerald-400), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  transition: color 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--emerald-400);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 99px;
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.75s ease, transform 0.75s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--white);
  max-width: 760px;
  padding: 90px 0 110px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--emerald-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-title {
  margin: 18px 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  color: var(--emerald-400);
  font-weight: 800;
}

.hero-desc {
  max-width: 660px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.32);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-head a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

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

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

.hero-dot.active {
  width: 34px;
  background: linear-gradient(90deg, var(--emerald-400), var(--cyan-400));
}

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

.home-search {
  position: relative;
  z-index: 6;
  margin-top: -46px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
}

.section {
  padding: 70px 0 0;
}

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

.compact-head {
  display: block;
  margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.section-head a {
  color: var(--emerald-600);
  background: #ecfdf5;
}

.section-head.light h2,
.section-head.light a,
.gradient-section .section-kicker {
  color: var(--white);
}

.section-head.light a {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 14px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  color: var(--gray-500);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
}

.search-field span {
  color: var(--emerald-600);
  font-weight: 800;
}

.search-field input,
.search-panel select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--gray-200);
  outline: none;
  color: var(--gray-900);
  background: var(--white);
  border-radius: 16px;
}

.search-field input {
  min-height: auto;
  border: 0;
}

.search-panel select {
  padding: 0 14px;
}

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #d1fae5, #cffafe);
}

.poster img,
.overview-image img,
.ranking-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster img,
.overview-card:hover .overview-image img,
.ranking-card:hover .ranking-poster img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  color: var(--white);
  background: rgba(16, 185, 129, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.meta-line span {
  padding: 2px 8px;
  background: var(--gray-100);
  border-radius: 999px;
}

.movie-info h3,
.ranking-body h2,
.overview-card h2 {
  margin: 0;
  color: var(--gray-900);
  line-height: 1.32;
}

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

.movie-info h3 a:hover,
.ranking-body h2 a:hover,
.overview-card h2 a:hover {
  color: var(--emerald-600);
}

.movie-info p,
.overview-card p,
.page-hero p,
.detail-one,
.detail-content p,
.ranking-body p {
  margin: 0;
  color: var(--gray-600);
}

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

.tag-row span,
.detail-tags span,
.genre-strip span {
  padding: 3px 9px;
  color: #047857;
  background: #ecfdf5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.gradient-section {
  margin-top: 76px;
  padding: 38px;
  color: var(--white);
  background: radial-gradient(circle at 10% 0%, rgba(52, 211, 153, 0.28), transparent 28%), linear-gradient(135deg, var(--slate-950), #064e3b 62%, #155e75);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 90px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  transition: transform 0.24s ease, background 0.24s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.16);
}

.rank-num {
  color: var(--amber-400);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.rank-item img {
  width: 90px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

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

.rank-text em {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-style: normal;
}

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

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

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

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

.category-card strong {
  margin-top: 8px;
  font-size: 15px;
}

.category-card em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

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

.movie-card.compact {
  flex-direction: row;
  align-items: stretch;
}

.movie-card.compact .poster {
  width: 190px;
  flex: 0 0 190px;
  aspect-ratio: auto;
}

.page-shell,
.detail-shell {
  padding: 36px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 0 0 20px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.page-hero {
  overflow: hidden;
  min-height: 300px;
  margin-bottom: 26px;
  padding: 46px;
  display: flex;
  align-items: end;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
  background-position: center;
  background-size: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.page-hero.small {
  min-height: 260px;
  align-items: center;
  background: radial-gradient(circle at 14% 6%, rgba(52, 211, 153, 0.24), transparent 30%), linear-gradient(135deg, var(--slate-950), #0f766e);
}

.page-hero.dark {
  background: radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.25), transparent 28%), linear-gradient(135deg, var(--slate-950), #7c2d12);
}

.page-hero h1,
.page-hero p {
  color: var(--white);
  max-width: 760px;
}

.page-grid {
  margin-top: 26px;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 18px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.overview-image {
  overflow: hidden;
  aspect-ratio: 16 / 11;
  border-radius: 16px;
}

.overview-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--gray-600);
}

.overview-card li + li {
  margin-top: 5px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  padding: 18px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.ranking-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
}

.ranking-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  margin-bottom: 28px;
  padding: 26px;
  color: var(--white);
  background: radial-gradient(circle at 18% 10%, rgba(52, 211, 153, 0.2), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.48);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.detail-info h1,
.detail-one {
  color: var(--white);
}

.detail-one {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.78);
}

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

.detail-meta span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.player-card {
  margin-bottom: 30px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

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

.play-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -50%);
  min-width: 168px;
  min-height: 58px;
  padding: 0 24px;
  color: var(--white);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
  box-shadow: 0 22px 48px rgba(16, 185, 129, 0.35);
  cursor: pointer;
  z-index: 3;
}

.play-trigger.is-hidden {
  display: none;
}

.play-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-600);
  background: var(--white);
  border-radius: 50%;
}

.detail-content {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 34px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.related-section {
  padding-top: 44px;
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 24px;
  color: var(--gray-600);
  text-align: center;
  background: var(--white);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  border-radius: 18px;
}

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

.site-footer {
  margin-top: 88px;
  color: rgba(255, 255, 255, 0.74);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

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

.footer-inner p {
  max-width: 620px;
  margin: 14px 0 0;
}

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

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: rgba(255, 255, 255, 0.48);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

  .detail-hero {
    grid-template-columns: 280px 1fr;
  }
}

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

  .menu-button {
    display: flex;
  }

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

  .hero {
    min-height: 640px;
  }

  .hero-content {
    padding-top: 80px;
  }

  .search-panel,
  .movie-grid,
  .rank-grid,
  .category-grid,
  .list-stream,
  .overview-grid,
  .footer-inner,
  .detail-hero,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    flex-direction: column;
  }

  .movie-card.compact .poster {
    width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 10;
  }

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

  .page-hero,
  .gradient-section,
  .detail-content {
    padding: 28px;
  }
}

@media (max-width: 560px) {
  .site-nav,
  .mobile-panel,
  .section,
  .home-search,
  .page-shell,
  .detail-shell,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 19px;
  }

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

  .hero-title {
    font-size: 26px;
  }

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

  .rank-item {
    grid-template-columns: 38px 74px 1fr;
  }

  .rank-item img {
    width: 74px;
    height: 52px;
  }

  .page-hero {
    min-height: 220px;
  }
}
