:root {
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --accent: #ef4444;
  --ink: #111827;
  --muted: #6b7280;
  --paper: #ffffff;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f9fafb;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 22px;
}

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

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  color: var(--brand);
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-panel a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  width: min(330px, 34vw);
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.nav-search input,
.mobile-panel input,
.search-panel input,
.filter-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.nav-search input {
  padding: 11px 15px;
  color: #fff;
}

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

.nav-search button,
.mobile-panel button,
.search-panel button {
  border: 0;
  color: var(--brand-dark);
  background: #fff;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  font-size: 24px;
  background: transparent;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

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

.mobile-panel nav,
.mobile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-panel form {
  display: flex;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-panel input {
  padding: 12px 14px;
  color: #fff;
}

.mobile-panel input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
}

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

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.56) 45%, rgba(0, 0, 0, 0.15)), linear-gradient(0deg, rgba(0, 0, 0, 0.92), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 600px;
  align-content: center;
  max-width: 760px;
  padding: 82px 0 96px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.28);
}

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

.hero-meta,
.movie-detail-meta,
.hero-tags,
.tag-row,
.category-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-meta span,
.hero-tags span,
.tag-row span,
.detail-tag,
.category-links a {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span,
.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.58;
}

.hero-dot.is-active {
  width: 28px;
  opacity: 1;
  background: #fff;
}

.search-panel {
  position: relative;
  z-index: 4;
  margin-top: -45px;
}

.search-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-panel input {
  padding: 20px 22px;
  color: var(--ink);
}

.search-panel button {
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  padding-inline: 28px;
}

main {
  min-height: 65vh;
}

.section {
  padding: 54px 0;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 5px 0 0;
  color: var(--muted);
}

.section-title a {
  color: var(--brand);
  font-weight: 800;
}

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

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

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

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

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

.movie-type {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(249, 115, 22, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .cover-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.movie-card h3 a:hover,
.rank-title:hover,
.text-link:hover {
  color: var(--brand);
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tag,
.category-links a {
  color: var(--brand-dark);
  background: #ffedd5;
}

.rank-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  font-size: 12px;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 26px;
}

.rank-list,
.clean-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-panel,
.category-card,
.content-card,
.player-card,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-panel {
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 1fr 70px 92px 110px;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

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

.rank-title {
  font-weight: 800;
}

.rank-row span,
.rank-cat {
  color: var(--muted);
  font-size: 14px;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

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

.category-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-card li {
  padding: 6px 0;
  color: #374151;
  border-top: 1px solid #f3f4f6;
}

.page-hero {
  padding: 62px 0 42px;
  color: #fff;
  background: radial-gradient(circle at 15% 10%, rgba(251, 146, 60, 0.38), transparent 32%), linear-gradient(135deg, #111827, #7c2d12 58%, #dc2626);
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.filter-box input {
  color: var(--ink);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 26px;
}

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

.video-shell {
  position: relative;
  background: #020617;
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 38px rgba(239, 68, 68, 0.3);
  font-size: 34px;
}

.detail-panel {
  padding: 24px;
  margin-bottom: 24px;
}

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

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

.detail-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.movie-detail-meta {
  margin: 12px 0 18px;
  color: var(--muted);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.detail-section h2,
.sidebar h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 17px;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.compact-card img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #7c2d12);
  transition: transform 0.25s ease;
}

.compact-card span {
  align-self: end;
  font-weight: 800;
}

.compact-card em {
  align-self: start;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.search-state {
  margin-bottom: 20px;
  color: var(--muted);
}

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

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

.site-footer {
  margin-top: 40px;
  padding: 42px 0 26px;
  color: #f9fafb;
  background: #111827;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 22px;
}

.site-footer p,
.footer-copy {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
  justify-content: flex-end;
}

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

.footer-copy {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .rank-row {
    grid-template-columns: 48px 1fr 58px;
  }

  .rank-row span:nth-of-type(2),
  .rank-cat {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

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

  .hero-content {
    padding: 60px 0 96px;
  }

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

  .hero-controls {
    left: 12px;
    right: auto;
    bottom: 22px;
  }

  .section {
    padding: 40px 0;
  }

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

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

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

  .search-panel button {
    border-radius: 0;
    min-height: 48px;
  }

  .footer-grid {
    flex-direction: column;
  }

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