:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --yellow: #f59e0b;
  --dark: #111827;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  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(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.28);
}

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

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

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--red);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.search-page-form input,
.search-page-form select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--red);
  font-weight: 700;
  cursor: pointer;
}

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

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
  cursor: pointer;
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.34);
  transform: scale(1.06);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(248, 113, 113, 0.25), transparent 38%), linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.70), rgba(17, 24, 39, 0.42));
}

.hero-inner {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
}

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

.hero-kicker {
  margin: 0 0 14px;
  color: #fca5a5;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(42px, 6vw, 72px);
}

.hero-desc {
  margin: 22px 0 0;
  max-width: 760px;
  color: #e5e7eb;
  font-size: 20px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.score {
  color: #fbbf24 !important;
  font-weight: 900;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.28);
}

.primary-button:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

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

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.category-strip {
  padding: 22px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.category-strip-inner {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.category-strip a,
.filter-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  color: #374151;
  background: #ffffff;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-strip a:hover,
.filter-button:hover,
.filter-button.is-active {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.content-section {
  padding: 72px 0;
}

.section-light {
  background: #ffffff;
}

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

.section-red {
  background: #fff1f2;
}

.section-dark {
  background: #111827;
  color: #ffffff;
}

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

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

.section-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.light-heading p {
  color: #d1d5db;
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: #e5e7eb;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.13);
}

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

.poster-link:hover img,
.movie-card:hover .poster-link img {
  transform: scale(1.07);
}

.rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h3 a:hover,
.ranking-card h2 a:hover,
.category-card h2 a:hover {
  color: var(--red);
}

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

.movie-desc {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.rank-row img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-number {
  color: #fca5a5;
  font-weight: 900;
  font-size: 20px;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-meta {
  color: #d1d5db;
  font-size: 14px;
}

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

.page-hero {
  position: relative;
  padding: 96px 0;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 75% 20%, rgba(248, 113, 113, 0.28), transparent 36%), linear-gradient(135deg, #111827, #7f1d1d 58%, #111827);
}

.small-hero {
  padding: 78px 0;
}

.category-hero {
  padding: 86px 0;
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(34px, 5vw, 60px);
}

.page-hero p:not(.hero-kicker) {
  max-width: 760px;
  margin: 18px 0 0;
  color: #f3f4f6;
  font-size: 18px;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.category-card > div:last-child {
  padding: 24px;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.category-card-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: #111827;
}

.category-card-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.text-link {
  color: var(--red);
}

.filter-panel,
.search-page-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-input,
.search-page-form input,
.search-page-form select {
  min-height: 48px;
  padding: 0 18px;
}

.filter-input,
.search-page-form input {
  flex: 1 1 300px;
}

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.ranking-number {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--red);
  font-weight: 900;
}

.ranking-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.ranking-body p {
  margin: 10px 0 0;
  color: #4b5563;
}

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

.tag-list span {
  border-radius: 999px;
  padding: 6px 11px;
  color: #991b1b;
  background: #fee2e2;
  font-size: 13px;
  font-weight: 800;
}

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

.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: center;
  gap: 54px;
  min-height: 620px;
  padding: 64px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.44);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #fca5a5;
  font-weight: 800;
}

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

.detail-copy h1 {
  font-size: clamp(40px, 6vw, 70px);
}

.detail-one-line {
  max-width: 860px;
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: 20px;
}

.player-section {
  padding: 72px 0;
  background: #0b1120;
  color: #ffffff;
}

.player-section h2 {
  margin: 0 0 24px;
  font-size: clamp(28px, 4vw, 42px);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.70));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red);
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(220, 38, 38, 0.42);
}

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

.story-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.story-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.story-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.site-footer {
  color: #ffffff;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-grid p {
  max-width: 420px;
  color: #9ca3af;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #d1d5db;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  text-align: center;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px;
  border: 1px dashed #d1d5db;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 760px) {
  .brand-text {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    height: 560px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 40px;
  }

  .hero-desc,
  .detail-one-line {
    font-size: 17px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 10px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 48px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

  .category-overview-grid,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .detail-cover {
    max-width: 240px;
  }

  .ranking-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .container {
    width: min(100% - 22px, 1280px);
  }

  .header-inner {
    gap: 12px;
  }

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

  .brand-text {
    max-width: 160px;
    font-size: 16px;
  }

  .hero,
  .detail-hero {
    min-height: 560px;
  }

  .hero-copy h1,
  .hero-copy h2,
  .detail-copy h1 {
    font-size: 34px;
  }

  .movie-grid {
    gap: 14px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-desc {
    display: none;
  }

  .content-section {
    padding: 52px 0;
  }
}
