:root {
  --orange: #ea580c;
  --orange-light: #fb923c;
  --red: #dc2626;
  --yellow: #eab308;
  --green: #16a34a;
  --blue: #2563eb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 25px 55px rgba(17, 24, 39, 0.2);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fef2f2 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  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;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-light), var(--red));
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.28);
  font-size: 16px;
}

.brand-text {
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(90deg, var(--orange), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--gray-700);
  font-weight: 700;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-700);
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

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

.mobile-link {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 700;
}

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

main {
  padding-top: 64px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(110deg, var(--orange), var(--red), var(--yellow));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.25);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-copy {
  animation: fadeIn 0.9s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 22px 42px rgba(0, 0, 0, 0.35);
}

.hero p {
  width: min(760px, 100%);
  margin: 22px auto 0;
  font-size: clamp(18px, 3vw, 26px);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--orange);
  background: var(--white);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover {
  background: #fff7ed;
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 32px;
  background: var(--white);
}

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

.section {
  padding: 64px 0 0;
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  color: var(--gray-900);
}

.section-title p,
.page-title p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.page-hero {
  padding: 72px 0;
  color: var(--white);
  background: linear-gradient(110deg, var(--orange), var(--red));
}

.page-title {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.page-title h1 {
  color: var(--white);
}

.page-title p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.stat-card,
.category-card,
.info-card,
.content-card {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 28px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  color: var(--orange);
}

.stat-label {
  margin-top: 10px;
  color: var(--gray-600);
  font-weight: 700;
}

.category-card {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 220px;
  padding: 24px;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.92), rgba(220, 38, 38, 0.86));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-content {
  position: relative;
  z-index: 1;
  color: var(--white);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

.category-card span {
  display: inline-flex;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-compact {
  border-radius: 18px;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(145deg, #fed7aa, #fecaca);
}

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

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

.card-category,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.card-category {
  left: 12px;
  padding: 6px 10px;
  background: rgba(234, 88, 12, 0.94);
}

.rank-badge {
  right: 12px;
  width: 34px;
  height: 34px;
  background: var(--yellow);
  box-shadow: 0 12px 22px rgba(234, 179, 8, 0.35);
}

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

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

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card-compact h3 {
  font-size: 15px;
}

.movie-card h3 a {
  transition: color 0.2s ease;
}

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

.movie-card p {
  margin: 0 0 14px;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact p {
  display: none;
}

.movie-meta,
.detail-meta,
.rank-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span,
.detail-meta span,
.rank-tags span,
.rank-tags a {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gray-100);
}

.rank-tags a {
  color: var(--orange);
  background: #fff7ed;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.search-field,
.select-field {
  min-height: 46px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--gray-50);
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus,
.select-field:focus {
  border-color: var(--orange-light);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.view-buttons {
  display: inline-flex;
  gap: 8px;
}

.view-button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
}

.view-button.is-active {
  color: var(--white);
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.movie-grid.list-view {
  grid-template-columns: 1fr;
}

.movie-grid.list-view .movie-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.movie-grid.list-view .movie-card .poster-frame {
  aspect-ratio: auto;
  min-height: 240px;
}

.movie-grid.list-view .movie-card p {
  display: block;
}

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

.empty-state {
  display: none;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--gray-600);
  font-weight: 700;
}

.empty-state.is-visible {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: linear-gradient(145deg, #fed7aa, #fecaca);
}

.rank-cover span {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

.rank-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rank-content h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.rank-content h2 a:hover {
  color: var(--orange);
}

.rank-content p {
  margin: 0 0 16px;
  color: var(--gray-600);
}

.detail-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 70px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--gray-600);
  font-weight: 700;
  flex-wrap: wrap;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.detail-side,
.detail-main {
  display: grid;
  gap: 24px;
}

.detail-poster,
.info-card,
.content-card,
.player-card,
.related-section {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(145deg, #fed7aa, #fecaca);
}

.info-card,
.content-card,
.related-section {
  padding: 24px;
}

.info-card h2,
.content-card h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

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

.info-item {
  padding: 14px;
  border-radius: 16px;
  background: var(--gray-50);
}

.info-label {
  display: block;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

.info-value {
  display: block;
  margin-top: 4px;
  color: var(--gray-900);
  font-weight: 900;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list a,
.tag-list span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: #c2410c;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 800;
}

.detail-title-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-title-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.18;
}

.detail-title-card p {
  margin: 0 0 16px;
  color: var(--gray-700);
  font-size: 18px;
  font-weight: 700;
}

.player-card-title {
  padding: 16px 20px;
  color: var(--white);
  background: linear-gradient(90deg, var(--orange), var(--red));
  font-size: 22px;
  font-weight: 900;
}

.player-box {
  position: relative;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.34);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--gray-700);
  font-size: 17px;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--gray-50);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.related-card .poster-frame {
  border-radius: 0;
}

.related-card h3 {
  margin: 0;
  padding: 12px;
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.4;
}

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

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

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

.footer-brand {
  margin-bottom: 16px;
  font-size: 20px;
}

.footer-about p,
.footer-note {
  color: #d1d5db;
  margin: 0;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fb923c;
  font-size: 18px;
}

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

.footer-list a {
  color: #d1d5db;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #9ca3af;
}

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

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

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

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

  .detail-side {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  }

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

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

  .menu-toggle {
    display: flex;
  }

  .hero {
    height: 540px;
  }

  .hero-actions,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .movie-grid.list-view .movie-card {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .movie-grid.list-view .movie-card .poster-frame {
    min-height: 180px;
  }

  .rank-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }

  .rank-content h2 {
    font-size: 19px;
  }

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

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

@media (max-width: 520px) {
  .stat-grid,
  .category-grid,
  .movie-grid,
  .movie-grid.compact,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 17px;
  }

  .rank-row {
    grid-template-columns: 1fr;
  }
}
