:root {
  --brand: #f97316;
  --brand-deep: #ea580c;
  --accent: #ec4899;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --surface: #ffffff;
  --page: #f8fafc;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.08), transparent 28rem), var(--page);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

video::-webkit-media-controls-panel {
  display: flex !important;
  opacity: 1 !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.footer-brand span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.35);
}

.brand-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--slate);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.desktop-nav a {
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--brand);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  outline: none;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(249, 115, 22, 0.7);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.header-search button,
.mobile-search button,
.btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.header-search button {
  padding: 10px 18px;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 16px;
  background: #fff7ed;
  color: var(--brand-deep);
  font-size: 22px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-panel.open {
  display: block;
  animation: fadeIn 0.24s ease;
}

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

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

.mobile-search button {
  padding: 11px 18px;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-panel nav a {
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  color: #475569;
  font-weight: 700;
  border: 1px solid var(--line);
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.22)), linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 92px 22px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 46px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 16px 0 16px;
  max-width: 820px;
  color: #fff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-content p {
  max-width: 740px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

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

.hero-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

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

.btn:hover,
.btn-secondary:hover,
.header-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.34);
}

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

.hero-side-card {
  border-radius: 30px;
  padding: 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-side-card img {
  height: 310px;
  border-radius: 22px;
  margin-bottom: 16px;
}

.hero-side-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.hero-dot.active {
  width: 36px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

main,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 22px;
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  color: var(--slate);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 760px;
}

.section-link {
  color: var(--brand-deep);
  font-weight: 900;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.92);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.15);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fce7f3);
}

.poster-wrap img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.play-mini {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.3);
}

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

.movie-card h2,
.rank-info h2 {
  margin: 0 0 6px;
  color: var(--slate);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover {
  color: var(--brand-deep);
}

.movie-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-line {
  margin: 0 0 14px;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.feature-large {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}

.feature-large .poster-wrap {
  border-radius: 22px;
}

.feature-large .movie-card-body {
  padding: 8px 0;
}

.feature-large h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.rank-list,
.category-list {
  display: grid;
  gap: 14px;
}

.rank-card {
  display: grid;
  grid-template-columns: auto 110px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.rank-thumb {
  display: block;
  height: 74px;
  border-radius: 16px;
  overflow: hidden;
  background: #ffedd5;
}

.rank-info h2 {
  font-size: 16px;
}

.rank-info p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.rank-info span {
  color: #475569;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff, #fff7ed);
  border: 1px solid rgba(254, 215, 170, 0.9);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.category-card:after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(236, 72, 153, 0.18));
}

.category-card h2 {
  position: relative;
  margin: 0 0 8px;
  color: var(--slate);
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  margin: 0 0 18px;
  color: #64748b;
  font-size: 14px;
}

.category-card a {
  position: relative;
  z-index: 2;
  color: var(--brand-deep);
  font-weight: 900;
}

.page-title {
  margin-bottom: 28px;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fff, #fff7ed 58%, #fdf2f8);
  border: 1px solid rgba(254, 215, 170, 0.72);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

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

.breadcrumb a {
  color: var(--brand-deep);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(140px, 0.26fr));
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

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

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  border-radius: 24px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.empty-state.show {
  display: block;
}

.detail-hero {
  position: relative;
  margin-top: -1px;
  background: #0f172a;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(4px);
}

.detail-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72)), linear-gradient(0deg, #0f172a, transparent 55%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 22px 44px;
  color: #fff;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 30px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.32);
}

.detail-title h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.detail-title p {
  max-width: 840px;
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  color: #fff;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

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

.player-card,
.detail-section,
.side-panel {
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.94);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

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

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  opacity: 0.58;
}

.player-start {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
}

.player-caption {
  padding: 18px 22px;
}

.player-caption h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 950;
  color: var(--slate);
}

.player-caption p {
  margin: 0;
  color: var(--muted);
}

.detail-section {
  padding: 26px;
  margin-bottom: 22px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 26px;
  color: var(--slate);
  font-weight: 950;
}

.detail-section p {
  margin: 0 0 14px;
  color: #334155;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.side-panel h2 {
  margin: 0 0 16px;
  color: var(--slate);
  font-size: 24px;
  font-weight: 950;
}

.side-panel .rank-card {
  grid-template-columns: 92px minmax(0, 1fr);
}

.side-panel .rank-number {
  display: none;
}

.side-panel .rank-thumb {
  width: 92px;
  height: 62px;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.prev-next a {
  padding: 16px;
  border-radius: 20px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 900;
}

.search-count {
  margin: -8px 0 24px;
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  margin-top: 52px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #1e293b, #0f172a 58%, #111827);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 22px 34px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.footer-brand span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fdba74;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
}

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 22px 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-button {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 84px;
  }

  .hero-side-card {
    display: none;
  }

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

  .feature-large {
    grid-template-columns: 1fr;
  }

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

  .detail-hero-inner {
    grid-template-columns: 150px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  main,
  .page-main {
    padding: 34px 16px;
  }

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

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

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

  .movie-card h2 {
    font-size: 16px;
  }

  .rank-card {
    grid-template-columns: auto 92px minmax(0, 1fr);
  }

  .rank-thumb {
    width: 92px;
    height: 64px;
  }

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

  .page-title {
    padding: 24px;
  }

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

  .detail-poster {
    width: 180px;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

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