:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --red: #ef4444;
  --red-dark: #dc2626;
  --orange: #f97316;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}

.site-nav {
  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;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.35);
}

.brand-name {
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  background: linear-gradient(90deg, #ff6b6b, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link,
.nav-drop-button {
  color: rgba(255, 255, 255, 0.82);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-drop-button:hover {
  color: #f87171;
}

.nav-dropdown {
  position: relative;
}

.nav-drop-panel {
  position: absolute;
  right: 0;
  top: 32px;
  min-width: 180px;
  display: none;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

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

.nav-drop-panel a {
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
}

.nav-drop-panel a:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.18);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.hero-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-overlay,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 70% 18%, rgba(239, 68, 68, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(127, 29, 29, 0.78) 50%, rgba(15, 23, 42, 0.68) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 62%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 54px;
  padding: 64px 0 92px;
}

.hero-copy h1 {
  margin: 12px 0 20px;
  max-width: 820px;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #fecaca, #fb923c, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-main-text {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-actions,
.detail-intro .primary-button {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

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

.ghost-button.dark {
  color: var(--slate);
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 2rem;
  line-height: 1;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
  width: 34px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.category-ribbon {
  margin-top: -32px;
  position: relative;
  z-index: 6;
}

.ribbon-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.ribbon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ribbon-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dc2626;
  background: #fee2e2;
  font-weight: 700;
}

.content-section,
.search-section {
  padding: 56px 0;
}

.search-panel,
.category-card,
.detail-content,
.detail-side,
.rank-aside {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 30px;
}

.search-panel h2,
.section-heading h2 {
  margin: 12px 0 8px;
  color: var(--slate);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.search-panel p,
.section-heading p,
.category-card p,
.rank-aside p {
  color: var(--muted);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-form input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  outline: none;
}

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

.search-form button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  cursor: pointer;
  font-weight: 800;
}

.search-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
}

.search-result-card img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

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

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

.hot-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.82) 100%);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.poster-year,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.movie-card h3,
.movie-card-wide h3 {
  margin: 0 0 8px;
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.35;
}

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

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.meta-row span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.soft-band {
  background: linear-gradient(90deg, #eff6ff, #ecfeff);
}

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

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.wide-cover {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

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

.wide-body {
  min-width: 0;
}

.rank-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 24px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-bottom: 24px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #0f172a, #7f1d1d, #0f172a);
}

.small-hero .container {
  padding: 70px 0;
}

.page-hero h1,
.detail-intro h1 {
  margin: 12px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

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

.category-card {
  overflow: hidden;
  padding: 22px;
}

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.category-card-head span {
  color: var(--slate);
  font-size: 1.25rem;
  font-weight: 900;
}

.category-card-head a {
  color: var(--red-dark);
  font-weight: 800;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.category-preview a {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.category-preview span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 5px 6px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 0.72rem;
}

.breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 56px 0 72px;
}

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

.detail-poster {
  width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

.detail-intro p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.player-section {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 7px solid #0f172a;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.5));
  cursor: pointer;
}

.player-shell.is-playing .player-cover {
  display: none;
}

.player-start {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.42);
  font-size: 2rem;
}

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

.detail-content,
.detail-side {
  padding: 26px;
}

.detail-content h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: var(--slate);
  font-size: 1.45rem;
}

.detail-content p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 1.05rem;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: var(--slate);
  font-weight: 700;
}

.site-footer {
  margin-top: 56px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

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

.footer-brand {
  color: #ffffff;
  font-size: 1.2rem;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer p,
.site-footer ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: #94a3b8;
}

.site-footer li {
  margin: 8px 0;
}

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

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  color: #64748b;
  text-align: center;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 900px) {
  .mobile-menu-button {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-dropdown:hover .nav-drop-panel,
  .nav-drop-panel {
    position: static;
    display: grid;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .hero-content,
  .detail-intro,
  .detail-layout,
  .rank-layout,
  .search-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 260px;
  }

  .hero-carousel,
  .hero-slides,
  .hero-slide,
  .hero-content {
    min-height: 700px;
  }

  .toolbar,
  .search-form {
    grid-template-columns: 1fr;
  }

  .rank-aside {
    position: static;
  }
}

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

  .site-nav {
    min-height: 64px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero-copy h1 {
    font-size: 2.15rem;
  }

  .hero-content {
    gap: 28px;
    padding-top: 42px;
  }

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

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

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

  .movie-card p {
    display: none;
  }

  .movie-card-wide {
    grid-template-columns: 96px 1fr;
  }

  .detail-poster {
    width: 180px;
  }

  .player-shell {
    border-width: 4px;
    border-radius: 16px;
  }

  .player-start {
    width: 66px;
    height: 66px;
  }
}
