* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f6fa;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --dark: #0b1020;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --gold: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #eef1f6 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.96));
  color: #fff;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.36);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.nav-search input,
.inline-filter input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-search input::placeholder,
.inline-filter input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.nav-search button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-search button:hover,
.inline-filter button:hover,
.primary-btn:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(234, 88, 12, 0.36), transparent 35%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 52%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-kicker,
.section-label,
.detail-kicker,
.page-hero span,
.quick-card span,
.channel-info span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  box-shadow: 0 12px 25px rgba(234, 88, 12, 0.24);
}

.hero h1 {
  margin: 18px 0 12px;
  max-width: 820px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  font-size: 20px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

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

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

.primary-btn {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 18px 35px rgba(234, 88, 12, 0.34);
}

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  font-size: 34px;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dots button {
  width: 30px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.active {
  background: #fff;
}

.quick-panel,
.content-section,
.category-strip,
.page-main,
.detail-main {
  width: min(1280px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 18px;
  margin-top: -54px;
  position: relative;
  z-index: 8;
}

.quick-card {
  display: block;
  min-height: 160px;
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  transition: 0.2s ease;
}

.quick-card:hover,
.movie-card:hover,
.channel-card:hover {
  transform: translateY(-4px);
}

.quick-card h2,
.quick-card h3 {
  margin: 16px 0 10px;
}

.quick-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.dark-card {
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.38), transparent 38%),
    linear-gradient(135deg, #111827, #1f2937 52%, #0b1020);
}

.dark-card p {
  color: rgba(255, 255, 255, 0.74);
}

.content-section,
.category-strip {
  margin-top: 56px;
}

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

.section-head h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.03em;
}

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

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(234, 88, 12, 0.55), transparent 34%),
    linear-gradient(135deg, #111827, #374151);
}

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

.movie-card:hover .poster-frame img,
.channel-card:hover img,
.detail-cover:hover img {
  transform: scale(1.06);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
  pointer-events: none;
}

.image-hidden {
  opacity: 0;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 16px;
}

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

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f3f4f6;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags a {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #9a3412;
  background: #ffedd5;
}

.compact .card-body {
  padding: 13px;
}

.compact h3 {
  font-size: 16px;
}

.compact p,
.compact .tag-row {
  display: none;
}

.page-main,
.detail-main {
  padding-top: 28px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 250px;
  border-radius: 30px;
  padding: 42px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.35), transparent 36%),
    linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.inline-filter {
  display: flex;
  gap: 10px;
  width: min(440px, 100%);
}

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

.breadcrumb a {
  color: var(--orange);
  font-weight: 700;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.channel-card {
  overflow: hidden;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.channel-link {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 230px;
}

.channel-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: #111827;
}

.channel-thumbs img {
  width: 100%;
  height: 100%;
  min-height: 114px;
  object-fit: cover;
  background: linear-gradient(135deg, #1f2937, #ea580c);
}

.channel-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.channel-info h2 {
  margin: 18px 0 10px;
  font-size: 30px;
}

.channel-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  align-items: center;
  padding: 34px;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(234, 88, 12, 0.42), transparent 38%),
    linear-gradient(135deg, #0b1020, #1f2937 62%, #111827);
  box-shadow: var(--shadow);
}

.detail-cover {
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.75;
}

.detail-info .detail-meta span {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags a {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

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

.player-section {
  margin-top: 30px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(234, 88, 12, 0.36), transparent 24%),
    rgba(0, 0, 0, 0.52);
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 18px 50px rgba(234, 88, 12, 0.4);
  font-size: 34px;
  padding-left: 5px;
}

.player-overlay strong {
  font-size: 20px;
}

.player-box.playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 30px;
}

.text-panel {
  border-radius: 26px;
  padding: 28px;
  background: var(--panel);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
  font-size: 16px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

.footer-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  margin: 14px 0 0;
  line-height: 1.8;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 14px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

.copyright {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #94a3b8;
}

.is-hidden {
  display: none !important;
}

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

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

  .nav-search {
    min-width: 220px;
  }
}

@media (max-width: 860px) {
  .nav-wrap {
    flex-wrap: wrap;
  }

  .main-nav,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: flex;
  }

  .hero {
    height: 520px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-panel,
  .channel-grid,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

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

  .inline-filter {
    width: 100%;
  }

  .channel-link {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .quick-panel,
  .content-section,
  .category-strip,
  .page-main,
  .detail-main {
    width: min(100% - 24px, 1280px);
  }

  .hero-content {
    width: calc(100% - 28px);
    bottom: 54px;
  }

  .hero p,
  .detail-line {
    font-size: 16px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-meta,
  .tag-row {
    display: none;
  }

  .movie-card h3 {
    font-size: 15px;
  }

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

  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .inline-filter {
    flex-direction: column;
  }
}
