:root {
  --bg: #111827;
  --bg-deep: #0b1120;
  --panel: #1f2937;
  --panel-soft: rgba(31, 41, 55, 0.78);
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #cbd5e1;
  --muted-dark: #94a3b8;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --red: #7f1d1d;
  --orange: #c2410c;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg) 38%, #0f172a);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(127, 29, 29, 0.96), rgba(194, 65, 12, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
}

.site-nav {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  color: #7c2d12;
  font-size: 15px;
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.35);
}

.brand-text,
.footer-brand {
  background: linear-gradient(90deg, #fde68a, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #fde68a;
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.hero-search input,
.large-search input,
.channel-filter input {
  width: 230px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  padding: 10px 16px;
  transition: width 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-search input:focus,
.hero-search input:focus,
.large-search input:focus,
.channel-filter input:focus {
  border-color: #fcd34d;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.nav-search input:focus {
  width: 285px;
}

.nav-search button,
.hero-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.large-search button:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 10px;
}

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

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.25), transparent 32%), #111827;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #111827 3%, rgba(17, 24, 39, 0.88) 28%, rgba(17, 24, 39, 0.54) 58%, rgba(17, 24, 39, 0.15));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2));
  bottom: 118px;
  width: min(720px, calc(100% - 48px));
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 10px;
  color: #fbbf24;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.48);
}

.hero-content p {
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(16px, 1.8vw, 20px);
  max-width: 680px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-bottom: 18px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.36);
  color: #fde68a;
  padding: 5px 10px;
  font-size: 13px;
}

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

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

.primary-button {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-1px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-search {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2));
  bottom: 106px;
  z-index: 3;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(16px);
}

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

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

.section-title-row h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.section-desc,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 820px;
}

.section-more {
  color: #fbbf24;
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.38);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.24), transparent 34%), #1f2937;
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.quality-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.quality-badge {
  top: 10px;
  right: 10px;
  background: #f59e0b;
  color: #111827;
}

.type-badge {
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
}

.card-content {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover {
  color: #fbbf24;
}

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

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 14px;
}

.card-tags {
  margin-top: 12px;
}

.card-tags span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 150px;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.88), rgba(194, 65, 12, 0.68)), radial-gradient(circle at top right, rgba(251, 191, 36, 0.28), transparent 36%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(252, 211, 77, 0.44);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  color: #fde68a;
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

.split-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 34px;
}

.compact-row {
  align-items: center;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: #d97706 #1f2937;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-row {
  border-radius: 16px;
  background: rgba(31, 41, 55, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ranking-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(240px, 0.8fr);
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.ranking-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  font-weight: 900;
}

.ranking-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.ranking-meta {
  overflow: hidden;
  color: var(--muted-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.inner-page {
  padding-bottom: 70px;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  border-radius: 0 0 28px 28px;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 30%), linear-gradient(135deg, rgba(127, 29, 29, 0.72), rgba(17, 24, 39, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.slim-hero,
.channel-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 260px;
  padding: 54px;
}

.channel-filter input,
.large-search input {
  width: min(520px, 100%);
  background: rgba(15, 23, 42, 0.66);
}

.large-search {
  display: flex;
  gap: 10px;
}

.category-preview {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 56px;
}

.breadcrumb {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted-dark);
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-page {
  padding-bottom: 80px;
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 32px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.stream-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.72));
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: inline-grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.detail-info {
  border-radius: 26px;
  padding: 34px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #fde68a;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  padding: 6px 12px;
}

.detail-one-line {
  color: #e2e8f0;
  font-size: 17px;
}

.detail-tags {
  margin: 22px 0 26px;
}

.detail-content {
  max-width: 980px;
}

.detail-content h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.detail-content p {
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 17px;
}

.search-empty {
  grid-column: 1 / -1;
  padding: 46px;
  border-radius: 22px;
  background: rgba(31, 41, 55, 0.7);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  margin-top: 70px;
  background: #0b1120;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 26px;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
  color: var(--muted-dark);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--muted);
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-copy {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #f59e0b;
  color: #111827;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.26);
}

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

  .hero-search {
    left: max(24px, calc((100% - 1280px) / 2));
    right: auto;
    bottom: 36px;
  }

  .hero-content {
    bottom: 130px;
  }

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

@media (max-width: 900px) {
  .site-nav {
    width: calc(100% - 24px);
  }

  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.98), rgba(194, 65, 12, 0.98));
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 18px;
    border-radius: 12px;
  }

  .nav-search {
    padding: 12px 0;
  }

  .nav-search input,
  .nav-search input:focus {
    width: 100%;
  }

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

  .hero-content {
    bottom: 178px;
  }

  .hero-search {
    width: calc(100% - 48px);
    flex-direction: column;
    border-radius: 24px;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

  .slim-hero,
  .channel-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 36px 24px;
  }

  .large-search {
    flex-direction: column;
  }

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

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

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

  .ranking-meta {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 710px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .content-section,
  .category-preview,
  .page-hero,
  .detail-hero,
  .breadcrumb {
    width: calc(100% - 24px);
  }

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

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

  .card-content {
    padding: 12px;
  }

  .card-desc,
  .card-tags {
    display: none;
  }

  .detail-info {
    padding: 24px;
  }
}
