:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --slate: #0f172a;
  --shadow: 0 20px 25px -5px rgb(15 23 42 / 0.12), 0 8px 10px -6px rgb(15 23 42 / 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.container-custom {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid rgb(226 232 240 / 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: white;
  font-size: 1rem;
  box-shadow: 0 12px 24px rgb(13 148 136 / 0.22);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong,
.text-gradient {
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.28rem;
}

.brand-copy small {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  color: #475569;
  font-weight: 600;
  transition: 0.2s ease;
}

.nav-link:hover {
  background: #f1f5f9;
  color: var(--slate);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0.75rem;
  background: #f1f5f9;
  color: #334155;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0.5rem 1rem 1rem;
  background: white;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.25rem;
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 460px;
  overflow: hidden;
  background: var(--slate);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s 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-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.88), rgb(0 0 0 / 0.50), rgb(0 0 0 / 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding-top: 4rem;
  padding-bottom: 4.8rem;
  color: white;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgb(13 148 136 / 0.20);
  color: #5eead4;
  padding: 0.4rem 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 8px 28px rgb(0 0 0 / 0.35);
}

.hero p {
  max-width: 720px;
  margin: 0 0 1.1rem;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.hero-meta span,
.detail-meta span {
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  padding: 0.35rem 0.7rem;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-tags span,
.tag-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  padding: 0.3rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.7rem 1.35rem;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--teal);
  color: white;
}

.btn-primary:hover {
  background: var(--teal-dark);
  box-shadow: 0 14px 22px rgb(13 148 136 / 0.25);
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid rgb(255 255 255 / 0.32);
  background: rgb(255 255 255 / 0.12);
  color: white;
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgb(255 255 255 / 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: white;
  font-size: 2.4rem;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgb(255 255 255 / 0.22);
}

.hero-prev {
  left: 1.2rem;
}

.hero-next {
  right: 1.2rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.home-search-wrap {
  margin-top: -2rem;
  position: relative;
  z-index: 4;
}

.home-search,
.search-bar {
  display: flex;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: white;
  padding: 0.75rem;
  box-shadow: 0 16px 35px rgb(15 23 42 / 0.10);
}

.home-search input,
.search-bar input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  border-radius: 0.8rem;
  background: #f8fafc;
  padding: 0.9rem 1rem;
  color: var(--ink);
}

.home-search button,
.search-bar button,
.quick-filters button {
  border: 0;
  border-radius: 0.8rem;
  background: var(--teal);
  color: white;
  padding: 0.85rem 1.1rem;
  font-weight: 800;
}

.section-block {
  padding-top: 3.5rem;
  padding-bottom: 2rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-title {
  margin: 0;
  color: #1e293b;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 900;
}

.section-more {
  color: var(--teal);
  font-weight: 800;
}

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

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

.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(226 232 240 / 0.9);
  border-radius: 1rem;
  background: white;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
  transition: 0.3s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

.video-card:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.68), transparent 60%);
  opacity: 0;
  transition: 0.25s ease;
}

.video-card:hover .poster-shade {
  opacity: 1;
}

.poster-year,
.poster-type {
  position: absolute;
  top: 0.65rem;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
}

.poster-year {
  left: 0.65rem;
  background: rgb(15 23 42 / 0.72);
}

.poster-type {
  right: 0.65rem;
  background: rgb(13 148 136 / 0.86);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: var(--teal);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: 0.25s ease;
}

.video-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
}

.card-body strong {
  color: #1e293b;
  font-size: 1.04rem;
  line-height: 1.35;
}

.video-card:hover .card-body strong {
  color: var(--teal);
}

.card-desc {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  color: #64748b;
  font-size: 0.82rem;
}

.card-tags .tag-badge {
  padding: 0.2rem 0.52rem;
  font-size: 0.72rem;
}

.movie-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 0 1rem 1rem;
}

.rail-item {
  width: 290px;
  flex: 0 0 auto;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 1.15rem;
  background: #0f172a;
  color: white;
  box-shadow: 0 14px 28px rgb(15 23 42 / 0.10);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: 0.45s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(15 23 42 / 0.92), rgb(15 23 42 / 0.25));
}

.category-copy {
  position: absolute;
  inset: auto 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.category-copy strong {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-copy em {
  color: #cbd5e1;
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.5;
}

.category-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.category-mini span {
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  padding: 0.2rem 0.48rem;
  color: #e2e8f0;
  font-size: 0.75rem;
}

.score-band {
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
  margin-top: 2rem;
}

.rank-list {
  display: grid;
  gap: 0.8rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 130px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: white;
  padding: 0.8rem;
  transition: 0.25s ease;
}

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

.rank-number {
  width: 48px;
  color: var(--teal);
  font-size: 1.45rem;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 130px;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #0f172a;
}

.rank-copy {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  color: var(--teal);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.rank-copy span {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  background: linear-gradient(135deg, var(--teal), var(--cyan), var(--teal-dark));
  color: white;
  padding: 4.5rem 0;
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #ccfbf1;
  font-size: 1.1rem;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin-bottom: 1rem;
  color: #d1fae5;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: white;
  padding: 1rem;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.quick-filters button {
  background: #f0fdfa;
  color: #0f766e;
  padding: 0.55rem 0.8rem;
}

.quick-filters button:hover,
.quick-filters button.is-active {
  background: var(--teal);
  color: white;
}

.detail-hero {
  background: radial-gradient(circle at 20% 0%, rgb(20 184 166 / 0.42), transparent 32%), linear-gradient(135deg, #0f172a, #064e3b 55%, #0e7490);
  color: white;
  padding: 3rem 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.32);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0f172a;
}

.detail-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  font-weight: 900;
}

.detail-copy p {
  max-width: 820px;
  color: #dbeafe;
  font-size: 1.15rem;
  line-height: 1.8;
}

.detail-tags {
  margin: 1rem 0 1.35rem;
}

.player-section {
  padding-top: 3rem;
}

.player-section h2,
.detail-text h2 {
  margin: 0 0 1rem;
  color: #1e293b;
  font-size: 1.7rem;
  font-weight: 900;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  box-shadow: 0 28px 58px rgb(15 23 42 / 0.22);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(to top, rgb(2 6 23 / 0.70), rgb(2 6 23 / 0.25));
  color: var(--teal);
  transition: 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.94);
  color: var(--teal);
  font-size: 2rem;
  box-shadow: 0 18px 36px rgb(0 0 0 / 0.25);
}

.player-overlay:hover span {
  transform: scale(1.06);
}

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

.player-status {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: white;
  font-weight: 700;
}

.detail-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  padding-top: 2rem;
}

.detail-text article {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: white;
  padding: 1.4rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.detail-text p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.footer-grid h2 {
  margin: 0 0 1rem;
  color: white;
  font-size: 1rem;
}

.footer-grid p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.75;
}

.footer-grid ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a:hover {
  color: #5eead4;
}

.footer-brand {
  margin-bottom: 1rem;
  color: white;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.2rem 1rem;
  color: #94a3b8;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.three-col,
  .category-grid,
  .category-grid.wide,
  .rank-list.compact,
  .detail-text,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 560px;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    min-height: 560px;
    height: 72vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    padding-bottom: 5rem;
  }

  .home-search,
  .search-bar {
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.three-col,
  .category-grid,
  .category-grid.wide,
  .rank-list.compact,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: auto 96px minmax(0, 1fr);
    gap: 0.7rem;
  }

  .rank-row img {
    width: 96px;
  }

  .rank-number {
    width: 34px;
    font-size: 1.1rem;
  }

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

  .page-hero,
  .detail-hero {
    padding: 3rem 0;
  }
}
