:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --teal: #0d9488;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  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(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  color: #334155;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.site-footer a:hover {
  color: var(--blue);
}

.top-search,
.mobile-search,
.search-large {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
}

.top-search input,
.mobile-search input,
.search-large input {
  border: 0;
  outline: 0;
  width: 190px;
  padding: 10px 14px;
}

.top-search button,
.mobile-search button,
.search-large button {
  border: 0;
  color: #fff;
  padding: 10px 18px;
  background: var(--blue);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  background: #eef2ff;
  color: #1e293b;
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  color: #334155;
  font-weight: 600;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
  max-width: 780px;
  padding: 96px 0;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 14px 0 4px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
}

.hero-content h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 800;
}

.hero-content p {
  margin: 0 0 22px;
  max-width: 680px;
  color: #e5e7eb;
  font-size: 20px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

.hero-tags span,
.detail-tags a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions,
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions.compact {
  margin-top: 24px;
}

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn-glass {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-full {
  width: 100%;
  margin-top: 18px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: #fff;
}

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

.page-section.narrow {
  width: min(940px, calc(100% - 32px));
}

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

.section-head h2,
.rank-panel h2,
.page-hero h1,
.player-copy h2,
.article-content h2 {
  margin: 6px 0 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
}

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

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

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

.movie-card,
.ranking-card,
.rank-panel,
.article-content,
.player-layout {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .poster-wrap img,
.ranking-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.badge,
.duration {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 5px 10px;
}

.badge {
  top: 12px;
  left: 12px;
}

.badge-blue {
  background: var(--blue);
}

.duration {
  right: 12px;
  bottom: 12px;
  background: rgba(2, 6, 23, 0.78);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 44px;
  opacity: 0;
  background: rgba(15, 23, 42, 0.18);
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

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

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: 22px;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 36px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
}

.rank-num,
.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.rank-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.rank-item img {
  width: 58px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.25s ease;
}

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

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

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

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

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #fff;
  border-radius: 24px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile span {
  font-size: 26px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: #e0f2fe;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.82), transparent 34%), linear-gradient(135deg, #1e3a8a, #0f766e);
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(38px, 5vw, 58px);
}

.page-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.filter-bar {
  margin-bottom: 24px;
}

.filter-btn {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 9px 16px;
  color: #1e40af;
  background: #eff6ff;
  cursor: pointer;
  font-weight: 800;
}

.filter-btn.active {
  color: #fff;
  background: var(--blue);
}

.hidden-by-filter,
.hidden-by-search {
  display: none !important;
}

.search-large {
  width: min(620px, 100%);
  margin-top: 28px;
}

.search-large input {
  flex: 1;
  width: auto;
  padding: 14px 18px;
}

.search-large button {
  padding: 14px 24px;
}

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

.ranking-card {
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.ranking-card a {
  display: grid;
  grid-template-columns: 58px 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.ranking-card img {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.25s ease;
}

.ranking-number {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.ranking-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster img {
  width: 300px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-weight: 700;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 900;
}

.detail-one {
  max-width: 780px;
  margin: 0;
  color: #e5e7eb;
  font-size: 20px;
}

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

.detail-meta span {
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.15);
}

.detail-section {
  padding-bottom: 20px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  padding: 24px;
  border-radius: 24px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.35));
  cursor: pointer;
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.36);
  font-size: 34px;
}

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

.player-copy {
  align-self: center;
}

.player-copy p {
  color: var(--muted);
}

.content-section {
  padding-top: 24px;
}

.article-content {
  border-radius: 24px;
  padding: 30px;
}

.article-content h2 {
  margin-top: 0;
  font-size: 28px;
}

.article-content p {
  margin: 12px 0 26px;
  color: #334155;
  font-size: 17px;
}

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

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

.footer-logo {
  color: #fff;
}

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

.site-footer p {
  max-width: 380px;
  color: #94a3b8;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
}

@media (max-width: 1080px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

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

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

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

  .split-section,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    padding: 76px 0;
  }

  .hero-content p,
  .detail-one {
    font-size: 17px;
  }

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

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

  .ranking-card a {
    grid-template-columns: 46px 110px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-card img {
    width: 110px;
    height: 76px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding: 46px 0;
  }

  .detail-poster img {
    width: 100%;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .topbar,
  .page-section,
  .page-hero > div,
  .detail-wrap,
  .footer-wrap,
  .footer-bottom,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

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

  .rank-item {
    grid-template-columns: 32px 50px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

  .player-layout,
  .article-content {
    padding: 16px;
  }
}
