:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --secondary: #065f46;
  --accent: #92400e;
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10);
  --shadow-soft: 0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  color: var(--primary);
  font-size: 20px;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

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

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

.main-nav a:hover,
.text-link:hover,
.movie-card h2 a:hover,
.compact-title:hover,
.rank-item h2 a:hover {
  color: var(--primary);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  min-height: 42px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  width: 210px;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.35);
}

.search-form button,
.filter-bar button,
.btn {
  border: 0;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.search-form button,
.filter-bar button {
  background: var(--primary);
  color: #ffffff;
}

.search-form button:hover,
.filter-bar button:hover,
.btn:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
}

.hero-section {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark) 52%, var(--secondary));
}

.hero-wrap {
  padding: 62px 0 70px;
}

.hero-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 34px;
}

.hero-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.hero-intro p,
.page-hero p {
  margin: 0;
  color: rgb(219 234 254 / 0.96);
  font-size: 18px;
  line-height: 1.7;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 460px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.38), transparent);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 64px);
  right: clamp(24px, 8vw, 96px);
  bottom: clamp(34px, 8vw, 70px);
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 14px;
  padding: 6px 12px;
  background: var(--primary-light);
  color: #ffffff;
}

.hero-content h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
}

.hero-content p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
}

.btn-light {
  background: #ffffff;
  color: var(--primary);
}

.btn-light:hover {
  background: #f3f4f6;
}

.btn-ghost {
  border: 1px solid rgb(255 255 255 / 0.42);
  color: #ffffff;
  background: rgb(255 255 255 / 0.12);
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.2);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgb(0 0 0 / 0.48);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.section-block {
  padding: 58px 0;
}

.section-block.muted {
  background: #f3f4f6;
}

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

.inner-head {
  width: 100%;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--primary);
}

.section-head h2,
.page-hero h1,
.detail-text h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

.text-link {
  color: var(--primary);
  font-weight: 800;
}

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

.channel-card,
.category-tile {
  display: block;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.channel-card:hover,
.category-tile:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgb(59 130 246 / 0.4);
}

.channel-card span,
.category-tile span {
  display: inline-flex;
  color: var(--secondary);
  font-weight: 900;
  margin-bottom: 16px;
}

.channel-card h2,
.category-tile h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.channel-card p,
.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-tile em {
  display: inline-flex;
  margin-top: 18px;
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 10px;
  padding: 5px 9px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  padding: 15px;
}

.movie-card h2 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-meta,
.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card p,
.compact-card p,
.rank-item p {
  color: #4b5563;
  line-height: 1.6;
}

.movie-card p {
  margin: 10px 0 0;
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 86px;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
}

.compact-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

.compact-cover img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.compact-card:hover img,
.rank-item:hover img {
  transform: scale(1.05);
}

.compact-body {
  min-width: 0;
  padding: 8px 10px 8px 0;
}

.compact-title {
  display: block;
  font-weight: 800;
  line-height: 1.4;
}

.compact-body p {
  margin: 6px 0;
  font-size: 13px;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark) 50%, var(--secondary));
}

.page-hero .container {
  padding: 62px 0;
}

.compact-hero .container {
  padding: 46px 0;
}

.page-hero h1 {
  color: #ffffff;
  margin-bottom: 14px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.filter-bar input {
  min-width: min(360px, 100%);
  flex: 1;
}

.filter-bar select {
  min-width: 160px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 88px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.rank-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e7eb;
}

.rank-item h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-item p {
  margin: 0 0 8px;
}

.detail-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, var(--primary-dark) 52%, var(--secondary));
  padding: 26px 0 54px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.45);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.18));
  cursor: pointer;
}

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

.play-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
  border: 2px solid rgb(255 255 255 / 0.6);
  font-size: 34px;
  text-indent: 4px;
  backdrop-filter: blur(8px);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: none;
  border-radius: 12px;
  background: rgb(0 0 0 / 0.68);
  color: #ffffff;
  padding: 10px 12px;
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.detail-info {
  border-radius: 22px;
  background: rgb(255 255 255 / 0.1);
  padding: 16px;
  backdrop-filter: blur(12px);
}

.detail-info img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: #1f2937;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbeafe;
  background: rgb(255 255 255 / 0.12);
  font-size: 13px;
}

.detail-content {
  background: #ffffff;
}

.detail-text {
  max-width: 900px;
}

.detail-text h1 {
  margin-bottom: 14px;
}

.big-meta {
  margin-bottom: 18px;
}

.lead-text {
  font-size: 20px;
  color: #374151;
  line-height: 1.75;
}

.detail-text h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.detail-text p {
  color: #374151;
  line-height: 1.9;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

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

.footer-brand p,
.footer-desc {
  margin: 6px 0 0;
  color: #9ca3af;
}

.footer-desc {
  max-width: 460px;
  line-height: 1.8;
}

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

.site-footer a {
  display: block;
  color: #d1d5db;
  margin: 10px 0;
}

.site-footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 20px 0;
  color: #9ca3af;
  text-align: center;
}

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

@media (max-width: 1100px) {
  .main-nav {
    gap: 14px;
    font-size: 14px;
  }

  .search-form input {
    width: 170px;
  }

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

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

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

  .rank-panel {
    position: static;
  }

  .detail-info {
    max-width: 320px;
  }
}

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

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

  .main-nav,
  .search-form {
    display: none;
    width: 100%;
  }

  .main-nav.is-open,
  .search-form.is-open {
    display: flex;
  }

  .main-nav.is-open {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }

  .main-nav.is-open a {
    padding: 10px 0;
  }

  .search-form.is-open input {
    width: 100%;
    flex: 1;
  }

  .hero-wrap {
    padding: 44px 0 52px;
  }

  .hero-stage,
  .hero-slide img {
    min-height: 390px;
  }

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

  .channel-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 74px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-item p {
    display: none;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero-intro h1 {
    font-size: 30px;
  }

  .hero-stage,
  .hero-slide img {
    min-height: 340px;
    border-radius: 18px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 48px;
  }

  .hero-content h2 {
    font-size: 26px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .small-grid,
  .catalog-grid {
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

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

  .rank-thumb {
    display: none;
  }

  .detail-hero {
    padding-bottom: 34px;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar button {
    width: 100%;
  }
}
