:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --yellow: #eab308;
  --text: #111827;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #fed7aa;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(154, 83, 16, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fefce8 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #f97316 0%, #f59e0b 50%, #eab308 100%);
  box-shadow: 0 12px 30px rgba(194, 65, 12, 0.24);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  flex-shrink: 0;
}

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-5deg);
}

.logo-title {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-subtitle {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.header-search {
  flex: 1;
  max-width: 450px;
  margin-left: auto;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 46px 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 237, 213, 0.55);
}

.search-box button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--orange);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #ffffff;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  opacity: 0.96;
}

.main-nav a::after {
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
  transition: width 0.22s ease;
}

.main-nav a:hover::after,
.main-nav a.is-current::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

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

.mobile-panel .main-nav {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06);
  transform: scale(1.02);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 32%, rgba(249, 115, 22, 0.34), transparent 35%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.76) 42%, rgba(17, 24, 39, 0.32) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.98) 0%, rgba(17, 24, 39, 0.15) 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 54px;
  padding: 70px 0;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(16px);
  font-weight: 800;
}

.hero-title {
  max-width: 760px;
  margin: 20px 0 14px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.hero-movie {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
  font-weight: 900;
  color: #ffedd5;
}

.hero-desc {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 30px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 800;
}

.chip.dark {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.35);
}

.btn-light {
  color: #9a3412;
  background: #ffffff;
}

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

.hero-poster-card {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.hero-poster-card img {
  width: 100%;
  height: 460px;
  border-radius: 20px;
  object-fit: cover;
}

.hero-score {
  position: absolute;
  left: 26px;
  bottom: 26px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-weight: 900;
}

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

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

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

.section {
  padding: 58px 0;
}

.section.tight {
  padding-top: 38px;
}

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

.section-kicker {
  margin: 0 0 6px;
  color: var(--orange-dark);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(254, 215, 170, 0.75);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(154, 83, 16, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #7c2d12, #f97316, #fde68a);
}

.poster-wrap.wide {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.poster-badge,
.poster-score,
.rank-number {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.poster-badge {
  top: 10px;
  right: 10px;
}

.poster-score {
  left: 10px;
  bottom: 10px;
  background: rgba(249, 115, 22, 0.92);
}

.play-float {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--orange);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
}

.play-float span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.card-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

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

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(254, 215, 170, 0.82);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(154, 83, 16, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card::before {
  position: absolute;
  top: -55px;
  right: -55px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(234, 179, 8, 0.16));
  content: "";
}

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

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(254, 215, 170, 0.74);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(154, 83, 16, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 15px;
  background: linear-gradient(135deg, #7c2d12, #f97316, #fde68a);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-number {
  top: 8px;
  left: 8px;
  background: rgba(249, 115, 22, 0.94);
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 950;
}

.rank-info p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  padding: 62px 0 34px;
  background:
    radial-gradient(circle at 12% 12%, rgba(249, 115, 22, 0.2), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(234, 179, 8, 0.22), transparent 36%);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 950;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 12px;
  margin: 26px 0 28px;
  padding: 14px;
  border: 1px solid rgba(254, 215, 170, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(154, 83, 16, 0.07);
  backdrop-filter: blur(16px);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #fed7aa;
  border-radius: 15px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
  color: #9a3412;
  font-size: 14px;
  font-weight: 800;
}

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

.detail-card,
.side-card {
  overflow: hidden;
  border: 1px solid rgba(254, 215, 170, 0.78);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--orange);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.1));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.93);
  font-size: 36px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover .play-circle {
  transform: scale(1.06);
  background: #ffffff;
}

.video-message {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 4;
  display: none;
  padding: 9px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-weight: 800;
}

.video-message.is-visible {
  display: block;
}

.detail-content {
  padding: 26px;
}

.detail-content h1 {
  margin: 12px 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.detail-intro {
  color: var(--muted);
  font-size: 17px;
}

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

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid #ffedd5;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 950;
}

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

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 950;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: #fff7ed;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-item:hover {
  background: #ffedd5;
  transform: translateX(4px);
}

.side-item img {
  width: 74px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #7c2d12, #f97316, #fde68a);
}

.side-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
}

.side-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 36px;
  border: 1px dashed #fdba74;
  border-radius: 22px;
  color: #9a3412;
  background: rgba(255, 237, 213, 0.52);
  text-align: center;
  font-weight: 800;
}

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

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 30px;
  padding: 48px 0;
}

.footer-title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

.footer-inner p,
.footer-inner a {
  color: #d1d5db;
}

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

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  transform: translateY(-3px);
}

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
  }

  .hero-poster-card img {
    height: 390px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .logo-title {
    font-size: 20px;
  }

  .logo-subtitle,
  .header-search,
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 52px 0 88px;
  }

  .hero-poster-card {
    width: min(260px, 76vw);
  }

  .hero-poster-card img {
    height: 330px;
  }

  .section-header {
    display: block;
  }

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

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

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

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

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

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

  .hero-title {
    font-size: 34px;
  }

  .hero-movie {
    font-size: 24px;
  }

  .movie-grid.large,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 86px 1fr;
    gap: 12px;
  }

  .detail-content {
    padding: 20px;
  }

  .play-circle {
    width: 76px;
    height: 76px;
    font-size: 30px;
  }

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