:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --brand: #059669;
  --brand-dark: #047857;
  --teal: #0d9488;
  --orange: #f97316;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  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: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.35);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
  font-weight: 600;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #ffffff;
}

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

.nav-categories {
  display: flex;
  gap: 16px;
}

.nav-categories a {
  color: #94a3b8;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  height: min(720px, calc(100vh - 76px));
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 32%, rgba(20, 184, 166, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 96px;
  width: min(680px, calc(100% - 64px));
  color: #ffffff;
  animation: fadeIn 0.6s ease both;
}

.hero-tags,
.hero-keywords,
.card-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.hero-keywords span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d1fae5;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

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

.primary-btn {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.32);
}

.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.52);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

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

.search-band {
  margin-top: -54px;
  position: relative;
  z-index: 4;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

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

.section-head h2,
.section-head h1 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.section-head a {
  color: var(--brand);
  font-weight: 800;
}

.compact-head {
  align-items: start;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.in-panel {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--soft);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: #1e293b;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(5, 150, 105, 0.6);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.sticky-filter {
  position: sticky;
  top: 92px;
  z-index: 3;
  padding: 16px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(12px);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.is-hidden {
  display: none;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2e8f0;
}

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

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

.cover-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.7), transparent 58%);
}

.card-region,
.rank-index,
.play-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.card-region {
  top: 12px;
  left: 12px;
  background: var(--brand);
}

.rank-index {
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.play-pill {
  right: 12px;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.72);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #1e293b;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.card-meta {
  color: #64748b;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card-featured .card-title {
  font-size: 21px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.movie-card-compact .card-cover {
  height: 100%;
  min-height: 140px;
}

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

.split-section,
.category-layout,
.detail-layout,
.watch-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.category-panel,
.side-box,
.detail-article,
.detail-aside {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #ecfdf5;
  transform: translateX(4px);
}

.rank-num {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  font-weight: 900;
}

.rank-row img {
  width: 88px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  color: #1e293b;
  font-size: 15px;
}

.rank-copy em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
}

.category-tile strong {
  bottom: 54px;
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: #d1fae5;
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.page-hero,
.watch-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.3), transparent 28%),
    linear-gradient(135deg, #0f172a, #134e4a 54%, #0f172a);
}

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

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  color: #ccfbf1;
  font-size: 18px;
  line-height: 1.8;
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

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

.side-panel {
  display: grid;
  gap: 20px;
}

.side-box h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.tag-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-weight: 700;
  font-size: 13px;
}

.watch-hero {
  padding: 24px 0 42px;
}

.watch-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: center;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(5, 150, 105, 0.26), transparent 28%),
    rgba(2, 6, 23, 0.28);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 14px 34px rgba(5, 150, 105, 0.42);
  font-size: 34px;
  padding-left: 5px;
}

.watch-info h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
}

.watch-line {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0;
}

.detail-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.detail-article h2 {
  margin: 0 0 16px;
  font-size: 30px;
}

.detail-article h2 + p {
  margin-top: 0;
}

.detail-article p {
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.detail-aside {
  position: sticky;
  top: 98px;
}

.detail-aside img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 18px;
}

.info-list {
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.info-list dd {
  margin: 0;
  color: #1e293b;
  font-weight: 800;
  text-align: right;
}

.info-list a {
  color: var(--brand);
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 56%, #0f172a);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.footer-brand strong {
  color: #ffffff;
  font-size: 24px;
}

.footer-brand p {
  max-width: 580px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin: 24px 0;
}

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

.footer-copy {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .split-section,
  .category-layout,
  .detail-layout,
  .watch-grid {
    grid-template-columns: 1fr;
  }

  .detail-aside,
  .sticky-filter {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    min-height: 68px;
  }

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    border-radius: 20px;
    background: #0f172a;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-categories {
    flex-wrap: wrap;
  }

  .hero-carousel {
    min-height: 620px;
    height: 620px;
  }

  .hero-content {
    left: 24px;
    bottom: 76px;
    width: calc(100% - 48px);
  }

  .hero-arrow {
    display: none;
  }

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

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

  .movie-card-compact {
    grid-template-columns: 140px 1fr;
  }

  .movie-card-compact .card-cover {
    min-height: 120px;
  }
}

@media (max-width: 560px) {
  .brand-text strong {
    font-size: 20px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .content-section,
  .search-band,
  .page-hero-inner,
  .watch-shell,
  .footer-shell {
    width: min(100% - 24px, 1180px);
  }

  .search-band {
    padding: 20px;
  }

  .movie-grid,
  .featured-grid,
  .category-movie-grid,
  .category-grid,
  .category-grid.small {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 30px 76px 1fr;
  }

  .rank-row img {
    width: 76px;
    height: 50px;
  }
}
