:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --accent-soft: #fff7ed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.container-block,
.header-inner,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: #eff6ff;
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.top-search input,
.search-page-form input,
.hero-search-card input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 230px;
  padding: 10px 14px;
}

.top-search input:focus,
.search-page-form input:focus,
.hero-search-card input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.top-search button,
.search-page-form button,
.hero-search-card button,
.reset-filter {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  padding: 10px 17px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.top-search button:hover,
.search-page-form button:hover,
.hero-search-card button:hover,
.reset-filter:hover,
.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

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

.hero-track,
.hero-slide {
  min-height: 660px;
}

.hero-slide {
  display: none;
  align-items: center;
  background-position: center;
  background-size: cover;
}

.hero-slide.is-active {
  display: flex;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 150px;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #bfdbfe;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0 0 12px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-content h3 {
  max-width: 760px;
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 850;
}

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

.hero-actions,
.hero-link-row,
.tag-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.primary-btn {
  color: #ffffff;
  background: var(--primary);
  padding: 13px 22px;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  padding: 12px 20px;
  backdrop-filter: blur(8px);
}

.hero-panel {
  position: absolute;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 34px;
  width: min(490px, calc(100% - 32px));
  display: grid;
  gap: 14px;
}

.hero-search-card,
.hero-thumbs {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-search-card {
  padding: 18px;
  color: #ffffff;
}

.hero-search-card span {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
}

.hero-search-card form {
  display: flex;
  gap: 8px;
}

.hero-search-card input {
  width: 100%;
  padding: 11px 14px;
}

.hero-link-row {
  margin-top: 12px;
}

.hero-link-row a {
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
}

.hero-thumb {
  min-width: 0;
  color: #ffffff;
}

.hero-thumb img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

.hero-thumb span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

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

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 56px 0;
}

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

.section-heading.centered {
  justify-content: center;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-link {
  color: var(--primary);
  background: #eff6ff;
  padding: 10px 16px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fff7ed);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.score {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 44px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.94);
  font-weight: 950;
  text-align: center;
}

.card-body {
  padding: 14px;
}

.card-meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  min-height: 3.2em;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body h3 a:hover,
.rank-info h3 a:hover,
.footer-links a:hover {
  color: var(--primary);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.8em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row span {
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.tag-row.large span {
  padding: 7px 12px;
  font-size: 14px;
}

.tinted-section {
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

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

.category-card {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #f97316);
  padding: 20px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7c3aed, #f97316);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.2);
}

.category-card span {
  font-size: 20px;
  font-weight: 950;
}

.category-card strong {
  font-size: 38px;
  line-height: 1;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

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

.rank-list.wide {
  grid-template-columns: 1fr;
}

.rank-card {
  display: grid;
  grid-template-columns: 54px 82px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 950;
}

.rank-poster img {
  width: 82px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 950;
}

.rank-info p,
.rank-info div {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rank-card strong {
  color: var(--accent);
  font-size: 22px;
  font-weight: 950;
}

.page-main {
  padding-top: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

.small-hero,
.detail-hero {
  border-radius: 32px;
  background: linear-gradient(135deg, #ffffff, #eaf2ff 48%, #fff7ed);
  box-shadow: var(--shadow);
}

.small-hero {
  padding: clamp(30px, 6vw, 62px);
}

.small-hero h1 {
  max-width: 860px;
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.small-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.category-preview {
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.filter-panel,
.search-panel-large {
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 10px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
}

.empty-state {
  margin: 28px 0 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

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

.search-page-form input {
  width: 100%;
  padding: 14px 18px;
}

.detail-main {
  background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.14), transparent 32%), var(--bg);
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  padding: clamp(22px, 5vw, 48px);
}

.detail-poster img {
  width: 100%;
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 780px;
  margin: 0 0 20px;
  color: #334155;
  font-size: 18px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.meta-list li {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.meta-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-list strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-info .primary-btn {
  margin-top: 22px;
}

.player-section {
  padding-top: 50px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.54));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid var(--primary);
}

.article-section {
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.article-section h2 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 950;
}

.article-section p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 17px;
}

.article-section p:last-child {
  margin-bottom: 0;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  padding: 42px 0;
}

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

.site-footer p {
  max-width: 520px;
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-links {
  justify-content: flex-end;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 800;
}

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

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

  .top-search input {
    width: 180px;
  }
}

@media (max-width: 880px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav,
  .top-search {
    display: none;
    width: 100%;
  }

  .site-nav.is-open,
  .top-search.is-open {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .top-search input {
    width: 100%;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 760px;
  }

  .hero-content {
    padding: 80px 0 320px;
  }

  .hero-panel {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .hero-thumbs {
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    overflow-x: auto;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

  .filter-panel input {
    grid-column: 1 / -1;
  }

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

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

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container-block,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 820px;
  }

  .hero-search-card form,
  .search-page-form {
    flex-direction: column;
  }

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

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

  .rank-card {
    grid-template-columns: 38px 70px 1fr;
  }

  .rank-card strong {
    grid-column: 3;
  }

  .rank-poster img {
    width: 70px;
    height: 100px;
  }

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

  .meta-list {
    grid-template-columns: 1fr;
  }

  .play-icon {
    width: 68px;
    height: 68px;
  }
}
