:root {
  --brand: #d97706;
  --brand-dark: #b45309;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --panel: #ffffff;
  --dark: #111827;
  --shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
  --shadow-strong: 0 18px 45px rgba(17, 24, 39, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.94);
  backdrop-filter: blur(14px);
  color: #ffffff;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.4), 0 8px 18px rgba(217, 119, 6, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 10px;
  color: #f3f4f6;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(217, 119, 6, 0.22);
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 16px;
}

.mobile-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  color: #f3f4f6;
}

.mobile-nav a:hover {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.14));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #ffffff;
  padding: 60px 0 58px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 32px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.86);
  color: #111827;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(16px, 2vw, 21px);
  color: #e5e7eb;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #f9fafb;
  font-size: 14px;
  font-weight: 700;
}

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, var(--brand));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.45);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-side {
  background: rgba(17, 24, 39, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero-side strong {
  display: block;
  margin-bottom: 12px;
  color: #fbbf24;
}

.hero-side a {
  display: block;
  padding: 10px 0;
  color: #f3f4f6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-side a:hover {
  color: #fbbf24;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

.hero-dots button.active {
  width: 32px;
  background: #ffffff;
}

.search-band {
  margin-top: -34px;
  position: relative;
  z-index: 6;
}

.search-card {
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow-strong);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.search-card input,
.inline-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
}

.search-card input:focus,
.inline-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.section {
  padding: 56px 0 0;
}

.section-muted {
  margin-top: 56px;
  padding: 56px 0;
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 52%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-badge {
  transform: translateY(0);
  opacity: 1;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.card-desc {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 150px;
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid #fed7aa;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.rank-num {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  font-weight: 900;
}

.rank-title {
  display: block;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 54px 0;
  color: #ffffff;
  background: radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.32), transparent 26%), linear-gradient(135deg, #111827, #1f2937);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #e5e7eb;
}

.inline-search {
  margin: 28px 0 0;
  max-width: 660px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fcd34d;
  font-size: 14px;
}

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

.watch-panel {
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: var(--shadow-strong);
}

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

.watch-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.watch-player.playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 18px 46px rgba(217, 119, 6, 0.42);
  cursor: pointer;
}

.player-button svg {
  margin-left: 4px;
}

.player-title {
  font-weight: 900;
  letter-spacing: 0.04em;
}

.detail-card {
  border-radius: 18px;
  background: #ffffff;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.detail-card h2,
.detail-card h3 {
  margin: 0 0 14px;
}

.detail-card p {
  margin: 0 0 14px;
  color: #374151;
}

.detail-card p:last-child {
  margin-bottom: 0;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: #374151;
}

.meta-row strong {
  color: #111827;
}

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

.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.content-stack {
  display: grid;
  gap: 22px;
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
}

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

.site-footer p,
.site-footer a {
  margin: 0;
  color: #d1d5db;
  font-size: 14px;
}

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

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

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: var(--shadow-strong);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hidden-by-search {
  display: none !important;
}

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

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

  .hero-grid,
  .watch-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-side {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    min-height: 62px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 52px 0 62px;
  }

  .hero-control {
    display: none;
  }

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

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

  .movie-grid,
  .rank-list,
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-cover {
    height: 210px;
  }

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

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}

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

  .card-cover {
    height: 280px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .player-button {
    width: 66px;
    height: 66px;
  }
}
