:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --orange: #ea580c;
  --teal: #14b8a6;
  --green: #22c55e;
  --red: #ef4444;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --white: #ffffff;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 60px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 34%, #f9fafb 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

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

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-6deg);
}

.brand-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--amber-dark), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  color: #374151;
}

.desktop-nav a,
.nav-dropdown > button {
  border: 0;
  color: #374151;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
  color: var(--amber-dark);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 190px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: #fffbeb;
}

.header-search {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-field,
.filter-field {
  width: 100%;
  border: 1px solid #d1d5db;
  outline: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
  padding: 10px 92px 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.search-field:focus,
.filter-field:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button {
  position: absolute;
  right: 4px;
  padding: 7px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 14px 20px 22px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  position: relative;
  margin-bottom: 14px;
}

.mobile-search input {
  padding: 11px 90px 11px 16px;
}

.mobile-link {
  display: block;
  padding: 10px 6px;
  color: #374151;
  font-weight: 650;
}

.mobile-link:hover {
  color: var(--amber-dark);
}

.main-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 48px;
  align-items: center;
  padding: 88px 0 76px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(6px);
  font-weight: 750;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-tags span,
.card-tags span,
.category-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.hero-meta span {
  padding: 7px 11px;
  color: #111827;
  background: #fef3c7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.primary-btn {
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 16px 32px rgba(251, 191, 36, 0.24);
}

.secondary-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.hero-side {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background: rgba(17, 24, 39, 0.48);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(12px);
}

.hero-side img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 24px;
}

.hero-side h2 {
  margin: 16px 0 4px;
  font-size: 24px;
}

.hero-side p {
  margin: 0;
  font-size: 14px;
  color: #e5e7eb;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-buttons,
.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-buttons button,
.hero-dots button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.hero-buttons button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 22px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.6;
}

.hero-dots button.is-active {
  width: 28px;
  opacity: 1;
  background: #fbbf24;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-search input {
  padding: 13px 18px;
  border: 0;
}

.hero-search button {
  flex-shrink: 0;
  padding: 0 22px;
  color: #111827;
  background: #fbbf24;
}

.section {
  padding: 64px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.more-link {
  flex-shrink: 0;
  color: var(--amber-dark);
  font-weight: 750;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: #111827;
}

.compact-card .poster-wrap {
  height: 210px;
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  opacity: 0.86;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.68));
}

.corner-label,
.duration-label,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.corner-label {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 12px;
}

.duration-label {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  min-height: 54px;
  margin: 0 0 8px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h2 {
  color: var(--amber-dark);
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span:first-child {
  color: #ca8a04;
  font-weight: 800;
}

.feature-strip {
  margin-top: 64px;
  padding: 38px;
  border-radius: 30px;
  background: linear-gradient(90deg, #ffedd5, #fef3c7, #fef9c3);
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.category-tags a {
  padding: 9px 14px;
  color: #92400e;
  background: #fef3c7;
}

.page-hero {
  padding: 64px 0 40px;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, #1f2937, #111827);
  box-shadow: var(--shadow-strong);
}

.page-hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.38), transparent 62%);
}

.page-hero-card h1 {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero-card p {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 14px 0 0;
  color: #fde68a;
  font-size: 17px;
}

.filter-bar,
.search-panel {
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.filter-field,
.search-field {
  padding: 13px 18px;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px dashed #d1d5db;
}

.empty-state.is-visible {
  display: block;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ranking-no {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
  font-size: 20px;
}

.ranking-row img {
  width: 120px;
  height: 78px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-info h2 {
  margin: 0 0 5px;
  font-size: 21px;
}

.ranking-info p {
  margin: 0;
  color: var(--muted);
}

.ranking-action {
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 800;
}

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

.breadcrumb a {
  color: var(--amber-dark);
  font-weight: 750;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow-strong);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.68));
  transition: opacity 0.25s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  font-size: 34px;
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.player-overlay:hover .play-circle {
  transform: scale(1.08);
}

.detail-info {
  padding: 28px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.detail-lead {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 17px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.detail-meta div {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 14px;
}

.detail-meta strong {
  display: block;
  color: #111827;
  font-size: 13px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.detail-tags span {
  padding: 7px 11px;
  color: #92400e;
  background: #fef3c7;
}

.content-card {
  margin-bottom: 28px;
  padding: 28px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #374151;
}

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

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.7fr) minmax(160px, 0.8fr);
  gap: 32px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 10px;
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
}

.footer-brand p,
.footer-links a {
  color: #d1d5db;
}

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

.footer-links h2 {
  margin: 0 0 8px;
  color: #fbbf24;
  font-size: 17px;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .hero-side {
    max-width: 480px;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .header-inner {
    width: min(100% - 24px, 1240px);
    gap: 12px;
  }

  .brand-text {
    font-size: 20px;
  }

  .hero,
  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 72px;
    gap: 28px;
  }

  .hero-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search button {
    min-height: 44px;
  }

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

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

  .feature-strip,
  .page-hero-card,
  .detail-info,
  .content-card {
    padding: 24px;
    border-radius: 24px;
  }

  .ranking-row {
    grid-template-columns: 50px 92px minmax(0, 1fr);
  }

  .ranking-action {
    grid-column: 2 / -1;
    text-align: center;
  }

  .ranking-row img {
    width: 92px;
    height: 70px;
  }

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

@media (max-width: 560px) {
  .main-wrap {
    width: min(100% - 22px, 1240px);
  }

  .hero-content {
    width: min(100% - 22px, 1240px);
  }

  .hero-side img {
    height: 270px;
  }

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

  .poster-wrap,
  .compact-card .poster-wrap {
    height: 300px;
  }

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

  .hero-controls {
    bottom: 18px;
  }

  .hero-buttons {
    display: none;
  }
}
