:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-2: #ef4444;
  --brand-3: #facc15;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon,
.footer-brand span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, #ea580c, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 700;
  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(--brand), var(--brand-2));
  opacity: 0;
  transform: scaleX(0.5);
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ea580c;
}

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

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

.header-search input,
.mobile-search input,
.filter-input,
.search-hero input,
.search-hero select {
  height: 42px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 0 16px;
  outline: 0;
  background: #fff7ed;
  color: var(--ink);
  transition: all 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.search-hero input:focus,
.search-hero select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
  background: #fff;
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.rank-watch,
.search-button {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.rank-watch:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.28);
}

.secondary-btn {
  color: #ea580c;
  background: #fff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ea580c;
}

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

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7ed;
  font-weight: 700;
}

.category-strip {
  border-top: 1px solid rgba(254, 215, 170, 0.7);
  overflow-x: auto;
}

.category-strip-inner {
  display: flex;
  gap: 10px;
  padding: 9px 0;
}

.category-strip a {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
  font-size: 14px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: #fff;
  padding: 96px 0 130px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-content h1 {
  margin: 24px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 26px;
  font-size: clamp(17px, 2.4vw, 24px);
  color: rgba(255, 255, 255, 0.9);
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-weight: 800;
  font-size: 13px;
}

.hero-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

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

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

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

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

.feature-float {
  position: relative;
  z-index: 10;
  margin-top: -88px;
  margin-bottom: 56px;
}

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

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

.section-block {
  padding: 34px 0 52px;
}

.section-white {
  padding: 58px 0;
  background: #fff;
}

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

.section-kicker {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  color: #c2410c;
  background: #ffedd5;
  font-weight: 900;
}

.section-head h2,
.page-hero h1,
.detail-title h1,
.search-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.section-head p,
.page-hero p,
.search-hero p {
  margin: 9px 0 0;
  color: var(--muted);
}

.more-link {
  color: #ea580c;
  font-weight: 900;
}

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

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

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

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.58));
}

.type-badge,
.rank-badge,
.play-mark {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-weight: 900;
}

.type-badge {
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 12px;
}

.rank-badge {
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
}

.play-mark {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: all 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-info h2 a:hover {
  color: #ea580c;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  min-height: 220px;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444 58%, #ec4899);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2 {
  position: relative;
  margin: 0 0 10px;
  font-size: 28px;
}

.category-card p,
.category-card .sample-links {
  position: relative;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sample-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.page-hero,
.search-hero {
  padding: 74px 0 42px;
  background: radial-gradient(circle at 16% 0, rgba(249, 115, 22, 0.22), transparent 38%), linear-gradient(135deg, #fff7ed, #fff 46%, #fee2e2);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: #ea580c;
}

.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.filter-input {
  flex: 1 1 260px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 138px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 20px;
  font-weight: 950;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: #fed7aa;
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.detail-page {
  background: #fff;
}

.watch-hero {
  padding: 36px 0 24px;
  background: radial-gradient(circle at 12% 20%, rgba(249, 115, 22, 0.24), transparent 34%), linear-gradient(135deg, #111827, #1f2937 48%, #7f1d1d);
  color: #fff;
}

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

.watch-stage {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.watch-stage video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-button-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.55));
  cursor: pointer;
  z-index: 4;
}

.play-button-layer strong {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ea580c;
  background: #fff;
  font-size: 28px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.play-button-layer:hover strong {
  transform: scale(1.08);
}

.watch-stage.is-playing .play-button-layer {
  display: none;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 5;
  color: #fff;
  font-weight: 800;
}

.detail-side {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
}

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

.detail-side-body {
  padding: 20px;
}

.detail-side h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.18;
}

.detail-side p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.detail-content {
  padding: 42px 0 64px;
}

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

.detail-article {
  display: grid;
  gap: 20px;
}

.detail-box {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.detail-box h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-box p {
  margin: 0;
  color: #374151;
}

.side-panel {
  position: sticky;
  top: 108px;
  align-self: start;
  padding: 20px;
  border-radius: 24px;
  background: #fff7ed;
  box-shadow: var(--soft-shadow);
}

.side-panel h2 {
  margin: 0 0 14px;
}

.side-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #fed7aa;
}

.side-link:last-child {
  border-bottom: 0;
}

.side-link img {
  width: 72px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  line-height: 1.35;
}

.side-link span {
  color: var(--muted);
  font-size: 13px;
}

.search-hero form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 150px;
  gap: 12px;
  margin-top: 28px;
}

.search-results {
  min-height: 320px;
}

.empty-state {
  padding: 42px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

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

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

.footer-brand {
  color: #fff;
  font-size: 22px;
}

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

.site-footer h2 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

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

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

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

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

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

  .hero-content {
    padding: 80px 0 118px;
  }

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

  .section-head {
    display: block;
  }

  .rank-item {
    grid-template-columns: 46px 96px 1fr;
  }

  .rank-watch {
    grid-column: 2 / -1;
  }

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

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

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

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

  .hero-content h1 {
    font-size: 42px;
  }

  .feature-grid,
  .movie-grid,
  .category-cards {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    position: absolute;
    margin: 12px;
  }

  .rank-item {
    position: relative;
  }

  .rank-cover {
    aspect-ratio: 16 / 9;
  }

  .detail-side h1 {
    font-size: 24px;
  }
}
