
* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --red: #dc2626;
  --orange: #f97316;
  --amber: #f59e0b;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1180px;
  height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.22);
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  margin-right: 8px;
  font-size: 16px;
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-panel input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.mobile-panel button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  cursor: pointer;
  font-weight: 700;
}

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

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

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.22), transparent 25%), linear-gradient(135deg, #dc2626 0%, #f97316 48%, #f59e0b 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  inset: -160px auto auto -120px;
  width: 420px;
  height: 420px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(1px);
}

.hero::after {
  right: -100px;
  bottom: -170px;
  width: 520px;
  height: 520px;
  background: rgba(127, 29, 29, 0.2);
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  min-height: 620px;
  margin: 0 auto;
  padding: 70px 20px 72px;
}

.hero-slide {
  display: none;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 56px;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.55s ease;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 680px;
  margin: 22px 0 12px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -2px;
}

.hero h2 {
  margin: 0 0 18px;
  color: #fff7ed;
  font-size: clamp(24px, 4vw, 42px);
}

.hero p {
  max-width: 650px;
  margin: 0 0 22px;
  color: #fff7ed;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.18);
}

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

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

.primary-button {
  color: #dc2626;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(127, 29, 29, 0.18);
}

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

.more-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.primary-button:hover,
.ghost-button:hover,
.more-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  box-shadow: 0 35px 80px rgba(127, 29, 29, 0.32);
  aspect-ratio: 4 / 5;
  background: rgba(255, 255, 255, 0.16);
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.88);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  font-size: 30px;
}

.hero-dots {
  position: absolute;
  left: 20px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 20px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.8px;
}

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

.section-heading a {
  color: var(--red);
  font-weight: 800;
}

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

.movie-card,
.category-tile,
.info-panel,
.search-panel,
.detail-card,
.player-card,
.horizontal-card {
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: var(--shadow-soft);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08), transparent);
  opacity: 0.9;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(220, 38, 38, 0.92);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, #ef4444);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-info p,
.horizontal-card p,
.detail-card p,
.info-panel p,
.category-tile p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.72;
}

.movie-info p {
  min-height: 50px;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row span,
.detail-tags span {
  color: #b91c1c;
  background: #fef2f2;
}

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

.category-tile {
  display: block;
  min-height: 168px;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-tile span {
  color: var(--red);
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 38px 92px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
}

.hot-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
}

.horizontal-thumb {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.search-panel {
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 28px;
}

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

.breadcrumb {
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 28px;
}

.player-card,
.detail-card,
.info-panel {
  border-radius: 24px;
  padding: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #050505;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050505;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-shell.playing .player-overlay {
  opacity: 0;
}

.big-play {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  font-size: 32px;
  cursor: pointer;
  pointer-events: auto;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-shell:hover .player-controls,
.player-shell:focus-within .player-controls {
  opacity: 1;
}

.player-controls button {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.player-error {
  position: absolute;
  left: 18px;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.78);
}

.player-error.show {
  display: block;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -1px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.detail-meta-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--muted);
}

.detail-meta-list strong {
  color: #111827;
}

.prose-block h2 {
  margin-top: 30px;
  font-size: 24px;
}

.prose-block p {
  color: #374151;
  line-height: 1.95;
  font-size: 16px;
}

.site-footer {
  margin-top: 50px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 32px;
}

.footer-title {
  display: flex;
  align-items: center;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

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

.footer-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.empty-state.show {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero-slide,
  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
    padding-top: 48px;
  }

  .hero-dots {
    position: static;
    margin-top: 24px;
  }

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

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

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

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

@media (max-width: 640px) {
  .header-inner {
    height: 66px;
    padding: 0 14px;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .container {
    padding: 38px 14px;
  }

  .hero-inner {
    padding: 38px 14px 42px;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

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

  .movie-info {
    padding: 13px;
  }

  .movie-info p {
    display: none;
  }

  .category-grid,
  .search-panel form,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 34px 78px 1fr;
  }

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