/*
  Static movie site styles.
  Visual system follows the uploaded source bundle: red/orange gradient accents, clean cards,
  rounded corners, soft shadows, responsive grids, and hover transitions.
*/
:root {
  --brand: #ef4444;
  --brand-dark: #dc2626;
  --brand-soft: #fff1f2;
  --orange: #f97316;
  --pink: #ec4899;
  --purple: #8b5cf6;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f9fafb;
  --dark: #111827;
  --radius: 18px;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 22px 50px rgba(239, 68, 68, 0.18);
}

* {
  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: var(--page);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.86);
}

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

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

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--orange));
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 34vw);
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.search-button,
.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-button,
.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

.search-button {
  padding: 10px 16px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
}

.secondary-button {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.ghost-button {
  color: #374151;
  background: #fff;
  border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.24), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(251, 191, 36, 0.28), transparent 28%),
    linear-gradient(135deg, #dc2626 0%, #f97316 48%, #ec4899 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.06));
}

.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 42px;
  align-items: center;
  min-height: 610px;
  padding: 54px 0 60px;
}

.hero-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.badge {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.hero-title {
  margin: 18px 0 18px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.hero-desc {
  margin: 0 0 26px;
  max-width: 680px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
}

.hero-stage {
  position: relative;
  min-height: 390px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-card img {
  width: 100%;
  height: 390px;
  object-fit: cover;
}

.image-missing img {
  display: none;
}

.poster-fill {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.5), rgba(239, 68, 68, 0.35));
  z-index: 1;
}

.poster-fill span {
  max-width: 85%;
}

.poster-wrap img + .poster-fill,
.hero-card img + .poster-fill,
.rank-cover img + .poster-fill,
.side-cover img + .poster-fill,
.detail-poster img + .poster-fill {
  display: none;
}

.image-missing .poster-fill {
  display: grid !important;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.76));
  z-index: 2;
}

.hero-overlay h2 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.hero-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}

.hero-dot {
  width: 32px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.section {
  padding: 58px 0;
}

.section.tight {
  padding: 34px 0;
}

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

.kicker {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.panel,
.rank-card {
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1f2937, #ef4444);
}

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

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

.card-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.68));
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.movie-card:hover .card-mask {
  opacity: 1;
}

.card-category {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(239, 68, 68, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  min-height: 43px;
  font-weight: 850;
}

.card-title a:hover {
  color: var(--brand);
}

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

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

.score {
  color: #f59e0b;
  font-weight: 900;
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  min-height: 178px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -42px;
  top: -44px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(249, 115, 22, 0.12));
}

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

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

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

.count-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 850;
  font-size: 13px;
}

.band {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  padding: 48px 0;
}

.band.blue {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.band.purple {
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.breadcrumb {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  align-items: center;
  padding: 18px;
  margin-bottom: 24px;
}

.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  background: #fff;
  outline: none;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 68px 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.rank-cover {
  position: relative;
  overflow: hidden;
  width: 96px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f2937, #ef4444);
}

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

.rank-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 850;
}

.rank-title a:hover {
  color: var(--brand);
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.detail-hero {
  color: #fff;
  background:
    radial-gradient(circle at 12% 8%, rgba(249, 115, 22, 0.35), transparent 28%),
    linear-gradient(135deg, #111827, #7f1d1d 60%, #111827);
  padding: 46px 0;
}

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

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1f2937, #ef4444);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-line {
  margin: 0 0 20px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #374151;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.detail-hero .tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.article {
  padding: 28px;
}

.article h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.article p {
  margin: 0 0 18px;
  color: #374151;
}

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

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  z-index: 4;
}

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

.play-button-large {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.38);
  font-size: 30px;
}

.status-text {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  text-align: center;
}

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

.side-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-link:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.side-cover {
  position: relative;
  overflow: hidden;
  width: 72px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f2937, #ef4444);
}

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

.side-title {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.side-meta {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
  padding: 46px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 12px;
}

.site-footer p,
.site-footer li {
  color: #9ca3af;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: #9ca3af;
}

.empty-note {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.no-results .empty-note {
  display: block;
}

.no-results .movie-grid {
  display: none;
}

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

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

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

  .detail-poster {
    max-width: 420px;
  }

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

@media (max-width: 760px) {
  .navbar {
    flex-wrap: wrap;
    min-height: 68px;
  }

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

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

  .nav-links.open {
    display: flex;
  }

  .header-search {
    order: 3;
    width: 100%;
    display: none;
  }

  .header-search.open {
    display: flex;
  }

  .hero-shell {
    min-height: auto;
    padding: 42px 0;
    gap: 24px;
  }

  .hero-stage,
  .hero-card,
  .hero-card img {
    min-height: 320px;
    height: 320px;
  }

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

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

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

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

  .rank-card .primary-button {
    grid-column: 1 / -1;
  }

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

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

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

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

  .hero-title {
    font-size: 40px;
  }

  .hero-overlay h2 {
    font-size: 24px;
  }
}
