:root {
  --site-red: #dc2626;
  --site-orange: #ea580c;
  --site-gold: #f59e0b;
  --site-dark: #111827;
  --site-text: #1f2937;
  --site-muted: #6b7280;
  --site-soft: #f9fafb;
  --site-border: #e5e7eb;
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.12);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--site-red);
  white-space: nowrap;
}

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

.logo-text {
  background: linear-gradient(90deg, var(--site-red), var(--site-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 700;
  color: #374151;
}

.main-nav a,
.mobile-panel a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: var(--site-red);
}

.header-search {
  display: flex;
  align-items: center;
  position: relative;
}

.header-search input {
  width: 260px;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 88px 0 18px;
  outline: none;
  background: #ffffff;
}

.header-search input:focus,
.search-box input:focus,
.filter-select:focus {
  border-color: var(--site-red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

.header-search button {
  position: absolute;
  right: 4px;
  height: 34px;
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(90deg, var(--site-red), var(--site-orange));
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #374151;
  background: #f3f4f6;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--site-border);
  padding: 16px;
  background: #ffffff;
}

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

.mobile-panel a {
  display: block;
  padding: 10px 0;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(180deg, #111827, #1f2937);
}

.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-bg {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(9px) brightness(0.34);
  transform: scale(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 38%, rgba(248, 113, 113, 0.34), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.80) 47%, rgba(17, 24, 39, 0.36) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 46px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-copy {
  max-width: 640px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

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

.hero-desc {
  max-width: 620px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

.meta-pill.dark {
  color: #374151;
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.rating {
  color: #fbbf24;
}

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

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

.btn-primary,
.search-box button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--site-red), var(--site-orange));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

.btn-primary:hover,
.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.30);
}

.btn-light {
  color: #111827;
  background: #ffffff;
}

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

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.11);
}

.hero-poster {
  width: min(360px, 30vw);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 72px 0;
}

.section.white {
  background: #ffffff;
}

.section.soft {
  background: linear-gradient(180deg, #f9fafb, #ffffff);
}

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

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--site-muted);
  font-size: 17px;
  line-height: 1.8;
}

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

.movie-grid.large {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.movie-card {
  position: relative;
  display: block;
  color: inherit;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: #e5e7eb;
  box-shadow: var(--shadow-card);
}

.movie-card img,
.rank-cover img,
.detail-cover img,
.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--site-gold);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.28);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  opacity: 0;
  color: #ffffff;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.88) 100%);
  transition: opacity 0.28s ease;
}

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

.movie-title {
  margin: 12px 0 6px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  color: #111827;
}

.movie-card:hover .movie-title {
  color: var(--site-red);
}

.movie-desc,
.card-small {
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.6;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

.category-card {
  display: block;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: #111827;
  box-shadow: var(--shadow-card);
}

.category-preview {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.25), rgba(17, 24, 39, 0.95));
}

.category-content {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.category-content h2,
.category-content h3 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 900;
}

.category-content p {
  margin: 0;
  color: #e5e7eb;
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 86px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--site-border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.rank-cover {
  width: 86px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
}

.rank-title {
  margin: 0 0 6px;
  color: #111827;
  font-size: 19px;
  font-weight: 900;
}

.rank-item:hover .rank-title {
  color: var(--site-red);
}

.page-hero {
  padding: 72px 0 42px;
  color: #ffffff;
  background:
    radial-gradient(circle at 22% 26%, rgba(248, 113, 113, 0.45), transparent 24%),
    linear-gradient(135deg, #111827, #7f1d1d 52%, #c2410c);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: #fee2e2;
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  margin-bottom: 20px;
  color: #fed7aa;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px;
  margin-bottom: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tag {
  padding: 9px 15px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
  border: 1px solid #e5e7eb;
}

.filter-tag.is-active,
.filter-tag:hover {
  color: #ffffff;
  background: linear-gradient(90deg, var(--site-red), var(--site-orange));
}

.filter-select {
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  outline: none;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.search-box input {
  flex: 1;
  min-height: 54px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  padding: 0 18px;
  font-size: 17px;
  outline: none;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(220, 38, 38, 0.12), rgba(0, 0, 0, 0.38)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.65));
  transition: opacity 0.25s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-red), var(--site-orange));
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.32);
  font-size: 34px;
  transform: translateX(2px);
}

.detail-card,
.detail-side,
.text-panel {
  padding: 26px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 900;
  color: #111827;
}

.detail-card p,
.text-panel p {
  color: #4b5563;
  font-size: 17px;
  line-height: 1.9;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
  background: #e5e7eb;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 14px;
  font-weight: 800;
}

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

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

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: #d1d5db;
  line-height: 1.8;
}

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

.search-results-empty {
  padding: 34px;
  border-radius: 24px;
  color: #6b7280;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

  .detail-cover {
    margin-bottom: 0;
  }
}

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

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

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

  .hero-content {
    justify-content: center;
  }

  .hero-poster {
    display: none;
  }

  .section-head,
  .filter-bar,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 44px 70px 1fr;
  }

  .rank-item .btn-primary {
    grid-column: 2 / 4;
  }

  .footer-inner,
  .category-grid,
  .related-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .hero-desc {
    font-size: 17px;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .section {
    padding: 52px 0;
  }

  .detail-card,
  .detail-side,
  .text-panel {
    padding: 20px;
  }
}
