:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --accent: #f97316;
  --gold: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  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(--text);
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 42%, #fff7ed 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 22px rgba(220, 38, 38, 0.26);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a,
.site-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #374151;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.site-nav button:hover {
  color: var(--primary);
  background: #fee2e2;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  padding: 10px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-panel {
  display: grid;
  gap: 4px;
}

.nav-dropdown-panel a {
  justify-content: flex-start;
  border-radius: 12px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fee2e2;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--primary);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: #111827;
}

.hero-slide {
  display: none;
  min-height: 620px;
  position: relative;
  isolation: isolate;
}

.hero-slide.active {
  display: block;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.12);
  z-index: -3;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.46), transparent 28%),
    radial-gradient(circle at 24% 82%, rgba(220, 38, 38, 0.34), transparent 32%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.78) 43%, rgba(17, 24, 39, 0.28) 100%);
  z-index: -2;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.24) 62%, #f9fafb 100%);
  z-index: -1;
}

.hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 70px 0 96px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  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: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  max-width: 860px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

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

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.page-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  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: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.btn-light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  color: var(--primary);
  background: #fee2e2;
}

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.hero-poster-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: blur(12px);
}

.hero-poster-badge strong {
  display: block;
  font-size: 28px;
}

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

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

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

.main-section,
.page-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-action {
  color: var(--primary);
  font-weight: 800;
}

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

.category-card {
  min-height: 154px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #991b1b, #f97316);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #111827, #dc2626);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7f1d1d, #f59e0b);
}

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

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

.category-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-cover-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(17, 24, 39, 0.88) 100%);
}

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

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

.card-year,
.card-rank {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  right: 10px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
}

.card-rank {
  left: 10px;
  color: #111827;
  background: #fbbf24;
}

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

.movie-card-body h3 {
  margin: 0;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card-body p {
  margin: 9px 0 12px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9ca3af;
  font-size: 12px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

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

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

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

.rank-score {
  color: var(--primary);
  font-weight: 900;
}

.feature-panel {
  position: sticky;
  top: 94px;
  padding: 26px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.65), transparent 36%),
    linear-gradient(145deg, #111827, #7f1d1d);
  box-shadow: var(--shadow);
}

.feature-panel h3 {
  margin: 0 0 12px;
  font-size: 28px;
}

.feature-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.search-panel,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
}

.search-panel input,
.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #ffffff;
  outline: none;
}

.search-panel input,
.filter-bar input {
  flex: 1 1 280px;
}

.filter-bar select {
  min-width: 150px;
}

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

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.42), transparent 30%),
    linear-gradient(135deg, #111827 0%, #7f1d1d 62%, #dc2626 100%);
}

.page-hero .page-section {
  padding: 70px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(220, 38, 38, 0.36), transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.78));
  cursor: pointer;
}

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

.play-button {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 20px 42px rgba(220, 38, 38, 0.4);
  font-size: 32px;
  padding-left: 5px;
}

.player-title {
  padding: 22px;
}

.player-title h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

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

.detail-card {
  padding: 26px;
  margin-top: 24px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 18px;
  color: #374151;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.info-item {
  padding: 14px;
  border-radius: 18px;
  background: #f9fafb;
}

.info-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.info-item strong {
  display: block;
  margin-top: 4px;
}

.detail-tags span {
  color: var(--primary);
  border-color: #fecaca;
  background: #fef2f2;
}

.side-card {
  padding: 18px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.side-item:hover {
  background: #fef2f2;
}

.side-item img {
  width: 68px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

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

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

.site-footer {
  margin-top: 60px;
  color: rgba(255, 255, 255, 0.76);
  background: #111827;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  margin: 10px 0 0;
  max-width: 560px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

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

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

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

  .hero-poster,
  .feature-panel {
    max-width: 380px;
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .site-nav a,
  .site-nav button {
    justify-content: center;
  }

  .nav-dropdown-panel {
    position: static;
    width: 100%;
    box-shadow: none;
  }

  .nav-dropdown:hover .nav-dropdown-panel {
    display: grid;
  }

  .hero,
  .hero-slide,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 64px 0 110px;
    gap: 30px;
  }

  .hero-poster {
    transform: none;
  }

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

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

  .section-heading,
  .page-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 44px 60px 1fr;
  }

  .rank-score {
    display: none;
  }

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