:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --green-deep: #064e3b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7ed 0%, #fff 42%, #f8fafc 100%);
  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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark,
.footer-logo span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.brand-name {
  display: block;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  display: block;
  margin-top: -3px;
  font-size: 12px;
  color: var(--muted);
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--red);
  background: #fef2f2;
}

.nav-search {
  width: 292px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.local-search input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
}

.nav-search input {
  flex: 1;
  padding: 6px 8px;
  font-size: 14px;
}

.nav-search button,
.mobile-search button,
.hero-search button,
.local-search button {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.local-search button:hover,
.btn-primary:hover,
.btn-outline:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.22);
}

.nav-search button {
  padding: 7px 14px;
  font-size: 13px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.mobile-panel-inner {
  display: grid;
  gap: 10px;
  padding: 12px 0 18px;
}

.mobile-link {
  justify-content: flex-start;
  border-radius: 14px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid var(--line);
}

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

.mobile-search button {
  padding: 8px 15px;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 0 72px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.22), transparent 32%), radial-gradient(circle at bottom right, rgba(251, 146, 60, 0.25), transparent 35%), linear-gradient(135deg, #fff7ed, #ffffff 45%, #fef2f2);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.38;
  pointer-events: none;
}

.hero::before {
  width: 360px;
  height: 360px;
  background: #f87171;
  top: 14%;
  left: -120px;
}

.hero::after {
  width: 420px;
  height: 420px;
  background: #fb923c;
  right: -120px;
  bottom: 7%;
}

.hero-stage {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 32px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 42px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.5s ease both;
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(252, 165, 165, 0.45);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 950;
  background: linear-gradient(95deg, var(--red), var(--orange), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 950;
}

.hero-desc {
  margin: 0 0 26px;
  color: #374151;
  font-size: clamp(17px, 2.1vw, 22px);
}

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

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.btn-outline {
  color: var(--red-dark);
  background: #fff;
  border: 1px solid #fecaca;
}

.hero-search {
  width: min(100%, 560px);
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(252, 165, 165, 0.6);
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  padding: 12px 14px;
}

.hero-search button {
  padding: 0 24px;
}

.hero-art {
  position: relative;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  min-height: 560px;
  background: #111827;
  box-shadow: 0 35px 70px rgba(127, 29, 29, 0.24);
  transform: rotate(1deg);
}

.hero-card img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.82));
}

.hero-card-info {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: #fff;
}

.hero-card-info strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.15;
}

.hero-card-info span {
  display: block;
  color: rgba(255, 255, 255, 0.82);
}

.hero-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: #fecaca;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--red);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: #fff;
}

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

.section h1,
.section h2,
.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 950;
}

.section-lead,
.page-lead {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--red);
  font-weight: 900;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

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

.poster-chip,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
}

.poster-chip {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  font-size: 12px;
}

.rank-badge {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.play-chip {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h2 {
  margin: 0 0 8px;
  min-height: 2.65em;
  font-size: 18px;
  line-height: 1.32;
}

.movie-info h2 a:hover {
  color: var(--red);
}

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

.movie-desc {
  display: -webkit-box;
  margin-top: 8px;
  min-height: 3.05em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags a,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fef2f2;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  transition: transform 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.88));
}

.category-title,
.category-desc,
.category-sample {
  position: relative;
  z-index: 2;
}

.category-title {
  font-size: 25px;
  font-weight: 950;
}

.category-desc {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.category-sample {
  margin-top: 14px;
  display: inline-flex;
  width: fit-content;
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 64px 90px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 20px;
  font-weight: 950;
}

.ranking-thumb {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #fee2e2;
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

.page-hero {
  padding: 132px 0 56px;
  background: radial-gradient(circle at 20% 10%, rgba(248, 113, 113, 0.22), transparent 28%), linear-gradient(135deg, #fff7ed, #ffffff);
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.local-search {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 6px 8px 6px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
}

.local-search input {
  flex: 1;
}

.local-search button {
  padding: 8px 16px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-buttons button {
  border: 0;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  font-weight: 800;
}

.filter-buttons button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

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

.detail-page {
  padding: 112px 0 72px;
}

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

.player-card,
.detail-card,
.sidebar-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-cover[hidden] {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 24px 46px rgba(220, 38, 38, 0.38);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 10px 14px;
  border-radius: 14px;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  text-align: center;
}

.player-message.show {
  display: block;
}

.detail-body {
  padding: 24px;
}

.detail-title {
  margin: 14px 0 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2,
.sidebar-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 950;
}

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

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

.sidebar-card {
  padding: 18px;
}

.side-movie {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.side-movie:last-child {
  border-bottom: 0;
}

.side-movie img {
  width: 72px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
  background: #fee2e2;
}

.side-movie h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-movie p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-panel {
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-results {
  margin-top: 30px;
}

.site-footer {
  color: #ecfdf5;
  background: linear-gradient(135deg, #064e3b, #065f46 54%, #022c22);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0 36px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 22px;
}

.footer-brand p,
.footer-bottom {
  color: #bbf7d0;
}

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

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

.footer-links a {
  color: #dcfce7;
  font-size: 14px;
}

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

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(187, 247, 208, 0.18);
  font-size: 14px;
}

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

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

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

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

  .hero-card {
    min-height: 420px;
  }

  .hero-card img {
    min-height: 420px;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

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

  .section-head,
  .filter-bar {
    display: grid;
    align-items: start;
  }

  .filter-buttons {
    justify-content: flex-start;
  }

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

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

  .brand-subtitle {
    display: none;
  }

  .hero {
    padding-top: 106px;
  }

  .hero-search,
  .local-search {
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search button,
  .local-search button {
    min-height: 42px;
  }

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

  .ranking-item {
    grid-template-columns: 46px 76px minmax(0, 1fr);
  }

  .ranking-number {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .detail-body {
    padding: 18px;
  }

  .play-button {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
