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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.22);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  flex: 0 0 auto;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-text em {
  font-size: 12px;
  font-style: normal;
  opacity: 0.88;
}

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

.nav-link,
.dropdown-button {
  border: 0;
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 13px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 210px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
}

.dropdown-link:hover {
  background: #fff7ed;
  color: var(--orange);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 270px;
}

.header-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  outline: 0;
  padding: 9px 74px 9px 16px;
  background: rgba(255, 255, 255, 0.18);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.header-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--orange-dark);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-nav a,
.mobile-sub-title {
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-sub-link {
  margin-left: 18px;
  opacity: 0.9;
}

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

.mobile-search input {
  flex: 1;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-search button {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: var(--orange-dark);
  background: #fff;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: linear-gradient(120deg, #111827, #7c2d12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(249, 115, 22, 0.34), transparent 36%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.55), rgba(17, 24, 39, 0.15));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  top: 50%;
  transform: translateY(-50%);
  width: min(620px, calc(100% - 64px));
  color: #fff;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  max-width: 560px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.32);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(234, 88, 12, 0.38);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.ghost-button.light {
  color: var(--orange-dark);
  background: #fff;
}

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

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

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

.section-heading {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 54px 0 24px;
}

.section-heading span {
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-more {
  margin-left: auto;
  color: var(--orange-dark);
  font-weight: 800;
}

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

.category-card,
.category-large-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  box-shadow: var(--shadow);
  min-height: 170px;
  transition: 0.22s ease;
}

.category-card:hover,
.category-large-card:hover {
  transform: translateY(-4px);
}

.category-card strong,
.category-card em,
.category-card p {
  display: block;
  position: relative;
  z-index: 1;
}

.category-card strong {
  margin: 8px 0 4px;
  font-size: 20px;
}

.category-card em,
.category-large-card em {
  font-style: normal;
  opacity: 0.9;
}

.category-card p,
.category-large-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.category-icon,
.category-large-card span {
  font-size: 34px;
}

.cat-1 { background: linear-gradient(135deg, #f97316, #dc2626); }
.cat-2 { background: linear-gradient(135deg, #ef4444, #a855f7); }
.cat-3 { background: linear-gradient(135deg, #fb923c, #f59e0b); }
.cat-4 { background: linear-gradient(135deg, #ec4899, #f97316); }
.cat-5 { background: linear-gradient(135deg, #111827, #f97316); }
.cat-6 { background: linear-gradient(135deg, #334155, #991b1b); }
.cat-7 { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.cat-8 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.cat-9 { background: linear-gradient(135deg, #f59e0b, #84cc16); }
.cat-10 { background: linear-gradient(135deg, #64748b, #f97316); }

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

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

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

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

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #f97316);
}

.movie-card.featured .poster {
  aspect-ratio: 16 / 10;
}

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

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

.poster-type,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.poster-type {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
}

.poster-year {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
}

.rank-badge {
  top: 12px;
  right: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--orange);
}

.card-body p {
  min-height: 44px;
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.card-meta a {
  color: var(--orange-dark);
  font-weight: 800;
}

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

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags span,
.footer-tags span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

.ranking-panel,
.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.large-ranking-list {
  grid-template-columns: repeat(2, 1fr);
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.ranking-row:hover {
  background: #fff7ed;
}

.ranking-row img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f2937, #f97316);
}

.ranking-number {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  font-size: 18px;
  font-weight: 900;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info em {
  display: block;
}

.ranking-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-main,
.detail-main {
  padding-bottom: 64px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  border-radius: 28px;
  padding: 56px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: var(--shadow);
}

.compact-hero,
.ranking-hero {
  background:
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #f97316, #dc2626);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
}

.category-large-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 34px;
}

.category-large-card {
  display: flex;
  gap: 20px;
  min-height: 190px;
}

.category-large-card h2 {
  margin: 0 0 8px;
}

.filter-panel,
.search-panel {
  display: flex;
  gap: 12px;
  margin: 28px 0 24px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select,
.search-panel input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  outline: none;
  background: #fff;
}

.filter-panel input,
.search-panel input {
  flex: 1;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-panel input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.search-panel button {
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  cursor: pointer;
  font-weight: 800;
}

.search-status {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange-dark);
  font-weight: 800;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: center;
  border-radius: 30px;
  padding: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 18%, rgba(251, 146, 60, 0.36), transparent 34%),
    linear-gradient(135deg, #111827, #7c2d12);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #1f2937, #f97316);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

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

.detail-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: #fed7aa;
  font-weight: 900;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-tags {
  margin: 20px 0 24px;
}

.player-card,
.story-card,
.about-card {
  margin-top: 32px;
  border-radius: 24px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle at 50% 45%, rgba(249, 115, 22, 0.28), rgba(0, 0, 0, 0.46));
  cursor: pointer;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.34);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 18px;
}

.player-shell.playing .play-overlay {
  display: none;
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-card p {
  margin: 0 0 24px;
  color: #374151;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.info-grid div {
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
}

.info-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.info-grid dd {
  margin: 5px 0 0;
  font-weight: 800;
}

.info-grid a {
  color: var(--orange-dark);
}

.related-section {
  margin-top: 4px;
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.about-card h2 {
  margin-top: 0;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
}

.footer-logo span {
  color: var(--orange);
}

.footer-brand p {
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
}

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

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

.footer-tags span {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

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

  .section-more {
    margin-left: 0;
  }

  .category-grid,
  .category-large-grid,
  .movie-grid,
  .featured-grid,
  .ranking-panel,
  .large-ranking-list,
  .about-layout,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .category-card,
  .page-hero {
    padding: 26px;
  }

  .filter-panel,
  .search-panel {
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 300px;
  }

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