:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --red-600: #dc2626;
  --amber-100: #fef3c7;
  --white: #ffffff;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 30px 80px rgba(15, 23, 42, 0.28);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 42%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-900), var(--slate-800));
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.35);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-500), var(--red-600));
  box-shadow: 0 0 35px rgba(249, 115, 22, 0.45);
  font-size: 16px;
}

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

.desktop-nav > a,
.nav-dropdown > button {
  color: rgba(255, 255, 255, 0.82);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-dropdown > button:hover {
  color: var(--orange-500);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 190px;
  display: none;
  grid-template-columns: 1fr;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-strong);
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  display: grid;
}

.nav-dropdown-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.84);
}

.nav-dropdown-panel a:hover {
  background: rgba(249, 115, 22, 0.16);
  color: #ffffff;
}

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

.header-search input,
.mobile-nav input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  color: var(--slate-900);
  background: #ffffff;
}

.header-search input {
  width: 230px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.9);
}

.header-search input::placeholder,
.mobile-nav input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.header-search button,
.mobile-nav button,
.search-page-form button,
.home-search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-600), var(--red-600));
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
}

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

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

.mobile-nav {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.86);
}

.mobile-nav form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mobile-nav input {
  flex: 1;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.94);
}

.hero-carousel {
  position: relative;
  height: min(74vh, 650px);
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 45%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2));
  top: 50%;
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange-500);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-tags,
.detail-meta,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-600), var(--red-600));
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.3);
}

.primary-button.wide {
  width: 100%;
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 44px;
  background: var(--orange-500);
}

.home-search-panel,
.section-block,
.two-column-section,
.ranking-page,
.detail-layout,
.related-section,
.filter-panel,
.search-page-panel,
.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-panel {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: center;
  margin-top: -54px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.home-search-panel h2,
.section-heading h2,
.side-feature h2,
.page-hero h1,
.detail-main-card h1,
.detail-main-card h2,
.detail-side-card h2,
.search-page-panel h2 {
  color: var(--slate-900);
}

.home-search-panel h2,
.section-heading h2,
.side-feature h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.home-search-panel p,
.side-feature p,
.page-hero p,
.category-card p,
.movie-card-body p,
.detail-main-card p,
.footer-grid p {
  color: var(--slate-600);
  line-height: 1.7;
}

.home-search-panel form,
.search-page-form {
  display: flex;
  gap: 10px;
}

.home-search-panel input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 15px 18px;
  outline: none;
}

.section-block,
.two-column-section,
.ranking-page,
.detail-layout,
.related-section,
.search-page-panel {
  margin-top: 72px;
}

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

.section-heading.inside {
  margin-bottom: 18px;
}

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

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.category-glow {
  position: absolute;
  inset: auto -30px -60px auto;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 72%);
}

.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 22px;
}

.category-samples {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.category-samples span {
  color: var(--slate-500);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--slate-800);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.72) 100%);
}

.year-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
}

.play-badge {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-600), var(--red-600));
}

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

.movie-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--orange-600);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 a:hover,
.ranking-list a:hover .rank-title {
  color: var(--orange-600);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 8px;
  color: #9a3412;
  background: #ffedd5;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 28px;
}

.ranking-panel,
.side-feature,
.detail-main-card,
.detail-side-card,
.search-page-panel,
.filter-panel {
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-panel,
.side-feature,
.search-page-panel {
  padding: 28px;
}

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

.ranking-list li a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(160px, auto) minmax(110px, auto);
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--slate-50);
}

.full-ranking li a {
  grid-template-columns: 58px minmax(0, 1fr) minmax(230px, auto) minmax(140px, auto);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-600), var(--red-600));
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-info,
.rank-channel {
  color: var(--slate-500);
  font-size: 13px;
}

.side-feature {
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.35), transparent 36%),
    linear-gradient(145deg, var(--slate-950), var(--slate-800));
}

.side-feature h2,
.side-feature p {
  color: #ffffff;
}

.side-feature p {
  opacity: 0.82;
}

.side-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.side-stat-grid span {
  padding: 14px;
  border-radius: 16px;
  text-align: center;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
}

.page-hero {
  margin-top: 42px;
  padding: 62px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 18%, rgba(249, 115, 22, 0.32), transparent 34%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  box-shadow: var(--shadow-strong);
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  opacity: 0.84;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 18px;
  margin-top: 32px;
  padding: 22px;
}

.filter-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-600);
  font-weight: 800;
}

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

.empty-state {
  padding: 32px;
  border-radius: 18px;
  text-align: center;
  color: var(--slate-500);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-section {
  padding: 38px 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.2), transparent 34%),
    linear-gradient(180deg, var(--slate-950), var(--slate-900));
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow-strong);
}

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

.player-start-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start-button span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-600), var(--red-600));
  box-shadow: 0 0 45px rgba(249, 115, 22, 0.55);
  font-size: 34px;
  padding-left: 5px;
}

.player-start-button.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.detail-main-card,
.detail-side-card {
  padding: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-main-card h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 24px 0;
  padding: 20px;
  border-left: 5px solid var(--orange-500);
  border-radius: 16px;
  background: #fff7ed;
  font-size: 18px;
}

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

.detail-side-card {
  position: sticky;
  top: 96px;
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 20px;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  margin: 0 0 22px;
}

.detail-side-card dt {
  color: var(--slate-500);
}

.detail-side-card dd {
  margin: 0;
  font-weight: 800;
}

.search-page-form {
  max-width: 820px;
  margin: 0 auto;
}

.site-footer {
  margin-top: 90px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 42px;
  padding: 52px 0;
}

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

.footer-grid p {
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-links a:hover {
  color: var(--orange-500);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.54);
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

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

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

  .two-column-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side-card {
    position: static;
  }
}

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

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

  .hero-control {
    display: none;
  }

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

  .home-search-panel form,
  .search-page-form,
  .mobile-nav form {
    flex-direction: column;
  }

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

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

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

  .ranking-list li a,
  .full-ranking li a {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-info,
  .rank-channel {
    grid-column: 2;
  }

  .page-hero {
    padding: 34px 24px;
  }

  .detail-main-card,
  .detail-side-card,
  .ranking-panel,
  .side-feature,
  .search-page-panel {
    padding: 22px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .movie-grid.compact-grid {
    grid-template-columns: 1fr;
  }
}
