:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #e7eaf0;
  --brand: #dc2626;
  --brand-dark: #b91c1c;
  --brand-soft: #fff1f2;
  --gold: #f59e0b;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(231, 234, 240, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.32);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: #344054;
  font-weight: 700;
}

.desktop-nav > a,
.nav-dropdown > button {
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.desktop-nav > a:hover,
.nav-dropdown > button:hover {
  color: var(--brand);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: 360px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-panel a,
.mobile-categories a,
.footer-links a {
  color: #475467;
  border-radius: 12px;
  transition: 0.2s ease;
}

.dropdown-panel a {
  padding: 9px 10px;
  font-size: 14px;
}

.dropdown-panel a:hover,
.mobile-categories a:hover,
.footer-links a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
}

.nav-search input,
.quick-search input,
.local-filter input,
.search-main-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: 0.2s ease;
}

.nav-search input {
  height: 42px;
  padding: 0 14px;
}

.nav-search input:focus,
.quick-search input:focus,
.local-filter input:focus,
.search-main-form input:focus {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.nav-search button,
.quick-search button,
.search-main-form button {
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-search button {
  height: 42px;
  padding: 0 16px;
}

.nav-search button:hover,
.quick-search button:hover,
.search-main-form button:hover,
.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 14px;
  background: #f2f4f7;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-panel > a {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}

.mobile-panel > a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mobile-panel button {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.mobile-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mobile-categories a {
  padding: 10px 12px;
  background: #f9fafb;
}

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

.hero-slides {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 54px;
  padding: 96px max(32px, calc((100vw - 1180px) / 2)) 130px;
  color: #ffffff;
}

.hero-slide.is-active {
  display: grid;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.66), rgba(17, 24, 39, 0.88)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 26%, rgba(220, 38, 38, 0.42), transparent 34%), radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.2), transparent 28%);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

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

.hero .eyebrow,
.ranking-band .eyebrow,
.detail-hero .eyebrow {
  color: #fecaca;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 700px;
  margin: 24px 0 0;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

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

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

.primary-btn {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.28);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}

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

.hero-thumbs {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 28px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(10px);
}

.hero-thumb.is-active {
  background: rgba(220, 38, 38, 0.82);
  border-color: rgba(255, 255, 255, 0.26);
}

.hero-thumb img {
  width: 48px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 800;
}

.section-shell,
.ranking-band,
.page-hero,
.breadcrumb,
.detail-hero,
.overview-stack {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.section-shell {
  padding: 56px 0;
}

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

.section-title h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-title a,
.text-link {
  color: var(--brand);
  font-weight: 900;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px) auto;
  align-items: center;
  gap: 22px;
  padding: 28px;
  margin-top: -42px;
  position: relative;
  z-index: 3;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.quick-search h2 {
  margin: 0;
  font-size: 28px;
}

.quick-search form,
.search-main-form {
  display: flex;
  gap: 10px;
}

.quick-search input,
.search-main-form input {
  min-height: 50px;
  padding: 0 16px;
}

.quick-search button,
.search-main-form button {
  min-height: 50px;
  padding: 0 24px;
}

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

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

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

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #e5e7eb;
  box-shadow: 0 16px 32px rgba(16, 24, 40, 0.12);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.62));
  opacity: 0.84;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: 0.25s ease;
}

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

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

.card-body h2,
.card-body h3 {
  margin: 12px 0 4px;
  font-size: 17px;
  line-height: 1.32;
}

.card-body h2 a,
.card-body h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-body h2 a:hover,
.card-body h3 a:hover,
.rank-info h3 a:hover {
  color: var(--brand);
}

.card-meta,
.card-desc,
.card-tags,
.category-tile p,
.category-desc,
.text-panel p,
.detail-line,
.page-hero p,
.site-footer p,
.rank-info p {
  color: var(--muted);
}

.card-meta,
.card-tags {
  margin: 0;
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.card-tags {
  color: var(--brand);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card,
.text-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.category-head span {
  font-size: 22px;
  font-weight: 900;
}

.category-head em {
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

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

.mini-movie img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-movie span {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-band {
  padding: 42px;
  border-radius: 32px;
  background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.38), transparent 34%), linear-gradient(135deg, #111827, #1f2937);
  box-shadow: var(--shadow);
}

.light-title h2,
.light-title a {
  color: #ffffff;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
}

.rank-cover img {
  width: 72px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rank-info h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
}

.rank-info p {
  margin: 4px 0;
  font-size: 13px;
}

.rank-info span {
  color: #fecaca;
  font-size: 13px;
  font-weight: 900;
}

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

.full-rank-list .rank-item {
  border-color: var(--line);
  background: #ffffff;
}

.full-rank-list .rank-info h3 {
  color: var(--ink);
}

.page-hero {
  margin-top: 34px;
  padding: 58px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.category-hero,
.search-hero,
.ranking-hero {
  background: radial-gradient(circle at 82% 20%, rgba(220, 38, 38, 0.16), transparent 28%), linear-gradient(135deg, #ffffff, #fff7ed);
}

.local-filter,
.search-main-form {
  width: min(620px, 100%);
  margin-top: 24px;
}

.local-filter input {
  min-height: 52px;
  padding: 0 16px;
}

.overview-stack {
  display: grid;
  gap: 28px;
  padding: 44px 0 20px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 26px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  margin-top: 24px;
  padding: 38px;
  border-radius: 32px;
  background: radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.35), transparent 30%), linear-gradient(135deg, #111827, #1f2937);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
  color: #ffffff;
}

.detail-line {
  max-width: 760px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-copy .primary-btn {
  margin-top: 26px;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.56));
  cursor: pointer;
}

.play-layer span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-size: 32px;
  box-shadow: 0 20px 42px rgba(220, 38, 38, 0.34);
  transition: 0.2s ease;
}

.play-layer:hover span {
  transform: scale(1.06);
  background: var(--brand-dark);
}

.play-layer.is-hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  font-size: 16px;
}

.tag-cloud {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  background: #ffffff;
  color: var(--brand);
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.site-footer {
  margin-top: 56px;
  padding: 48px max(32px, calc((100vw - 1180px) / 2));
  background: #111827;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

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

.site-footer p {
  color: #cbd5e1;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.footer-links a {
  padding: 8px 10px;
  color: #cbd5e1;
}

.copyright {
  margin: 34px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 54px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-slide {
    grid-template-columns: 1fr 250px;
  }

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

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

  .quick-search {
    grid-template-columns: 1fr;
  }
}

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

  .brand-copy em {
    display: none;
  }

  .hero,
  .hero-slides {
    min-height: 780px;
  }

  .hero-slide {
    align-items: start;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 70px;
    padding-bottom: 210px;
  }

  .hero-poster {
    width: min(230px, 70vw);
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    max-height: 172px;
    overflow-y: auto;
  }

  .hero-thumb img {
    width: 38px;
    height: 50px;
  }

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

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

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

  .ranking-band,
  .page-hero,
  .detail-hero {
    padding: 24px;
    border-radius: 24px;
  }

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

  .detail-poster {
    width: min(240px, 76vw);
  }

  .quick-search form,
  .search-main-form,
  .mobile-panel form {
    flex-direction: column;
  }

  .quick-search button,
  .search-main-form button,
  .mobile-panel button {
    min-height: 46px;
  }

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

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