:root {
  --page-bg: #f9fafb;
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --line: #e5e7eb;
  --card: #ffffff;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-soft: #fff7ed;
  --danger: #dc2626;
  --dark: #111827;
  --dark-mid: #1f2937;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --container: 1200px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

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

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.28);
}

.logo-text {
  font-size: 1.35rem;
  background: linear-gradient(90deg, var(--accent), var(--danger));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #374151;
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search-form {
  margin: 0;
}

.nav-search {
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  color: #374151;
  background: #ffffff;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search:focus,
.search-input:focus,
.select-input:focus {
  border-color: rgba(234, 88, 12, 0.65);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.14);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-panel a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: #374151;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(234, 88, 12, 0.34), transparent 28%), linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 170px;
  background: linear-gradient(180deg, transparent, var(--page-bg));
  pointer-events: none;
}

.hero-stage {
  position: relative;
  z-index: 1;
  min-height: 650px;
  padding: 66px 0 96px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 42px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeIn 0.56s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(234, 88, 12, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.34);
  font-size: 0.92rem;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 18px 0 14px;
  font-size: clamp(2.35rem, 5vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-title-link:hover {
  color: #fed7aa;
}

.hero-summary {
  max-width: 720px;
  color: #d1d5db;
  font-size: 1.08rem;
}

.hero-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 0.86rem;
  font-weight: 800;
}

.hero .meta-pill {
  color: #ffedd5;
  background: rgba(255, 237, 213, 0.13);
  border: 1px solid rgba(255, 237, 213, 0.2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--accent), var(--danger));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.34);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-light {
  color: #111827;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.hero-search {
  display: flex;
  align-items: center;
  width: min(100%, 560px);
  margin-top: 30px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  color: #ffffff;
  background: transparent;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.hero-poster-wrap {
  position: relative;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, #374151, #111827);
  box-shadow: var(--shadow-md);
  transform: rotate(2deg);
}

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

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

.poster-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
}

.poster-caption strong {
  display: block;
  font-size: 1.3rem;
  line-height: 1.2;
}

.poster-caption span {
  color: #fed7aa;
  font-weight: 800;
}

.hero-thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.hero-thumb {
  overflow: hidden;
  border-radius: 18px;
  background: #1f2937;
  opacity: 0.78;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover {
  opacity: 1;
  transform: translateY(-3px);
}

.hero-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #1f2937;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 46px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  gap: 9px;
  pointer-events: auto;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-arrows {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}

.section {
  padding: 54px 0;
}

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

.section-kicker {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.section-title {
  margin: 4px 0 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
  max-width: 760px;
  color: var(--text-muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(234, 88, 12, 0.26);
  box-shadow: var(--shadow-md);
}

.card-poster {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--accent), var(--danger));
  font-size: 0.78rem;
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  margin: 0 0 8px;
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-text {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.small-pill {
  padding: 4px 8px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 22px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(135deg, #ea580c, #dc2626);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(3n + 2) {
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 30%), linear-gradient(135deg, #fb923c, #ef4444);
}

.category-card:nth-child(3n) {
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 30%), linear-gradient(135deg, #f97316, #b91c1c);
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.page-hero {
  padding: 56px 0 42px;
  color: #ffffff;
  background: radial-gradient(circle at 12% 0%, rgba(234, 88, 12, 0.42), transparent 26%), linear-gradient(135deg, #111827, #1f2937);
}

.page-hero h1 {
  max-width: 860px;
  margin: 10px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #fed7aa;
  font-size: 0.95rem;
  font-weight: 800;
}

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

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

.search-input,
.select-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 14px;
  color: #374151;
  background: #ffffff;
  outline: none;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

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

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
}

.rank-thumb img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #e5e7eb;
}

.rank-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 900;
}

.rank-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.detail-hero {
  padding: 38px 0 34px;
  color: #ffffff;
  background: radial-gradient(circle at 14% 0%, rgba(234, 88, 12, 0.42), transparent 28%), linear-gradient(135deg, #111827, #1f2937);
}

.detail-title {
  max-width: 980px;
  font-size: clamp(2rem, 4.3vw, 4rem);
}

.detail-summary {
  max-width: 880px;
  color: #d1d5db;
  font-size: 1.05rem;
}

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

.panel {
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.panel-body {
  padding: 24px;
}

.player-panel {
  overflow: hidden;
  margin-bottom: 26px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.64));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  box-shadow: 0 20px 46px rgba(220, 38, 38, 0.34);
}

.play-button span {
  margin-left: 5px;
  font-size: 2.25rem;
  line-height: 1;
}

.detail-content h2,
.sidebar h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

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

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background: #e5e7eb;
}

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

.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.related-list {
  display: grid;
  gap: 13px;
}

.related-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-thumb {
  overflow: hidden;
  border-radius: 12px;
  background: #e5e7eb;
}

.related-thumb img {
  width: 70px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.related-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 5px;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.site-footer {
  margin-top: 54px;
  padding: 46px 0 28px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
}

.footer-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

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

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero-stage {
    min-height: auto;
    padding: 44px 0 88px;
  }

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

  .hero-poster-wrap {
    max-width: 390px;
    margin: 0 auto;
  }

  .hero-controls {
    bottom: 28px;
  }

  .section-header {
    display: block;
  }

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

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

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

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

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}

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

  .logo-text {
    font-size: 1.08rem;
  }

  .hero h1,
  .page-hero h1,
  .detail-title {
    font-size: 2.15rem;
  }

  .hero-search,
  .hero-actions {
    width: 100%;
  }

  .hero-search {
    display: block;
    padding: 10px;
  }

  .hero-search .btn {
    width: 100%;
    margin-top: 8px;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .rank-item {
    grid-template-columns: 38px 66px minmax(0, 1fr);
    gap: 10px;
  }

  .panel-body {
    padding: 18px;
  }
}
