:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #fed7aa;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --accent: #dc2626;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --soft-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #fff7ed 100%);
  min-height: 100vh;
}

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

img,
video {
  display: block;
  width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 600;
  color: #374151;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary-dark);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.08);
}

.header-search input,
.hero-search input,
.large-search input,
.inline-filter input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.header-search input {
  width: 210px;
}

.header-search button,
.hero-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  padding: 9px 18px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  background: #ffedd5;
  color: var(--primary-dark);
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid #fed7aa;
  padding: 12px 24px 18px;
  background: #ffffff;
}

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

main {
  max-width: 1280px;
  margin: 0 auto;
}

.hero-section {
  position: relative;
  margin: 28px 24px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 22px;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 54px;
  right: 54px;
  bottom: 54px;
  max-width: 680px;
  color: #ffffff;
}

.hero-kicker,
.section-label {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fb923c;
  margin-bottom: 12px;
}

.hero-content h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  margin: 0 0 18px;
}

.hero-content p {
  margin: 0 0 18px;
  color: #f3f4f6;
  line-height: 1.8;
  font-size: 17px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  font-size: 13px;
  font-weight: 700;
}

.hero-content .tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 20px;
}

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

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

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

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover {
  transform: translateY(-4px);
}

.hero-controls {
  position: absolute;
  left: 54px;
  top: 42px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.hero-search-panel {
  border-radius: 28px;
  padding: 32px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  box-shadow: var(--soft-shadow);
  border: 1px solid #fed7aa;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-search-panel h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.hero-search-panel p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 22px;
}

.hero-search,
.large-search {
  display: flex;
  gap: 10px;
  border: 1px solid #fdba74;
  background: #ffffff;
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.1);
}

.hero-search input,
.large-search input {
  flex: 1;
  padding: 12px 14px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.category-chips a {
  padding: 9px 13px;
  border-radius: 999px;
  background: #ffedd5;
  color: #c2410c;
  font-weight: 700;
}

.section-block,
.page-main,
.detail-main {
  margin: 0 24px 44px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin: 0 0 22px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.watch-section h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.14;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  border: 1px solid #ffedd5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.movie-card-link {
  display: block;
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card-body h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  color: var(--muted);
  line-height: 1.65;
  min-height: 52px;
  margin: 0 0 12px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.movie-category {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  font-size: 12px;
  font-weight: 800;
}

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

.ranking-panel,
.rank-page-block {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  padding: 22px;
  box-shadow: var(--soft-shadow);
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 38px 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-item a:hover {
  background: #fff7ed;
}

.rank-number {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary-dark);
}

.rank-item img {
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text strong {
  font-size: 15px;
}

.rank-text em {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
  margin-top: 4px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 52px;
  margin-top: 28px;
  background: linear-gradient(135deg, #111827 0%, #7c2d12 50%, #ef4444 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  color: #ffedd5;
  line-height: 1.85;
  margin: 16px 0 0;
}

.inline-filter {
  max-width: 560px;
  margin-top: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  padding: 14px 18px;
}

.inline-filter input {
  width: 100%;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: #111827;
}

.category-preview img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card-body {
  padding: 20px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card-body p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 16px;
}

.category-card-body span {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-main {
  max-width: 1180px;
}

.breadcrumb {
  margin: 24px 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  border: 1px solid #fed7aa;
  box-shadow: var(--shadow);
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
}

.detail-poster img {
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 10px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-weight: 800;
}

.detail-one-line {
  line-height: 1.85;
  font-size: 18px;
  color: #4b5563;
  margin: 0;
}

.watch-section,
.detail-content,
.related-block {
  margin-top: 36px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
  margin-top: 18px;
  aspect-ratio: 16 / 9;
}

.player-box video,
.play-cover,
.play-cover img {
  width: 100%;
  height: 100%;
}

.player-box video {
  object-fit: contain;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
  z-index: 2;
}

.play-cover img {
  object-fit: cover;
  opacity: 0.78;
  filter: saturate(1.05);
}

.play-cover[hidden] {
  display: none;
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 34px;
  box-shadow: 0 15px 42px rgba(220, 38, 38, 0.38);
}

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

.detail-content article {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  padding: 28px;
  box-shadow: var(--soft-shadow);
}

.detail-content p {
  line-height: 1.9;
  color: #4b5563;
}

.large-search {
  max-width: 720px;
  margin-top: 24px;
}

.empty-result {
  display: none;
  margin-top: 24px;
  padding: 22px;
  border-radius: 18px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
  text-align: center;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 24px 24px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: #ffffff;
}

.footer-grid p {
  color: #9ca3af;
  line-height: 1.8;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  color: #d1d5db;
  margin: 8px 0;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid #374151;
  text-align: center;
  color: #9ca3af;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-section,
  .split-section,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-section,
  .section-block,
  .page-main,
  .detail-main {
    margin-left: 14px;
    margin-right: 14px;
  }

  .hero-section {
    margin-top: 16px;
  }

  .hero-slider {
    min-height: 540px;
    border-radius: 22px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 28px;
  }

  .hero-controls {
    left: 22px;
    top: 24px;
  }

  .hero-search-panel,
  .page-hero,
  .detail-hero {
    border-radius: 22px;
    padding: 24px;
  }

  .hero-search,
  .large-search {
    flex-direction: column;
  }

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

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

  .movie-card-body h3 {
    font-size: 16px;
  }

  .movie-card-body p {
    min-height: auto;
  }

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

  .detail-poster img {
    min-height: auto;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .rank-item a {
    grid-template-columns: 32px 58px minmax(0, 1fr);
  }

  .play-circle {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
