* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

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

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

.brand-mark,
.footer-brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #0f172a;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.32);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  color: #e5e7eb;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover {
  color: #fbbf24;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.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-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 26%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: end;
  gap: 36px;
  width: min(1240px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  padding: 96px 0 72px;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tag,
.card-category,
.badge,
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fff;
  background: #f59e0b;
  font-size: 12px;
  font-weight: 800;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.32);
}

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

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-poster {
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(16px);
}

.hero-poster img {
  height: 240px;
  object-fit: cover;
}

.hero-poster div {
  padding: 20px;
}

.hero-poster h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.hero-poster p {
  margin: 0;
  color: #cbd5e1;
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.44);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

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

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

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

.hero-dots button.active {
  width: 34px;
  background: #f59e0b;
}

.page-hero,
.simple-hero {
  color: #fff;
  background:
    radial-gradient(circle at 84% 20%, rgba(245, 158, 11, 0.2), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #020617 100%);
}

.page-hero .container,
.simple-hero .container {
  padding-top: 72px;
  padding-bottom: 72px;
}

.page-hero h1,
.simple-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p,
.simple-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 40px 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: #64748b;
}

.section-bar {
  width: 6px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f59e0b, #f97316);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.info-card,
.rank-card,
.content-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover,
.category-card:hover,
.info-card:hover,
.rank-card:hover,
.content-card:hover {
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  transform: translateY(-4px);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #334155);
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, 0.72) 100%);
}

.card-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 7px;
  padding: 3px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  font-size: 12px;
  font-weight: 700;
}

.card-category {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 9px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body h3 a:hover {
  color: #d97706;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  color: #475569;
  background: #f8fafc;
  font-size: 12px;
}

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

.movie-card-wide .card-cover {
  aspect-ratio: auto;
  min-height: 156px;
}

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

.search-panel {
  margin-top: -32px;
  position: relative;
  z-index: 8;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(16px);
}

.search-box input,
.search-box select {
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #fff;
}

.search-box input:focus,
.search-box select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.category-card {
  position: relative;
  display: block;
  padding: 24px;
  min-height: 168px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 14%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, #0f172a 0%, #334155 62%, #f59e0b 150%);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: #e5e7eb;
}

.category-card strong {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.14);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 64px 156px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  font-size: 20px;
  font-weight: 900;
}

.rank-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #1e293b;
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.rank-info p {
  margin: 0;
  color: #64748b;
}

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

.breadcrumb a:hover {
  color: #d97706;
}

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

.watch-box {
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.28);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.7));
  cursor: pointer;
}

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

.play-button {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.42);
  font-size: 34px;
}

.detail-panel,
.sidebar-panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.15;
}

.lead {
  margin: 20px 0 0;
  color: #334155;
  font-size: 19px;
}

.prose-block {
  margin-top: 26px;
}

.prose-block h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.prose-block p {
  margin: 0;
  color: #374151;
  text-align: justify;
  text-indent: 2em;
}

.sidebar-panel {
  position: sticky;
  top: 88px;
}

.sidebar-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.related-link {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.related-link img {
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  background: #1e293b;
}

.related-link strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-link span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}

.info-card {
  padding: 26px;
}

.info-card h2,
.info-card h3 {
  margin-top: 0;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

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

.footer-grid p {
  color: #94a3b8;
}

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

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

.footer-grid li {
  margin-bottom: 8px;
}

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

.empty-state {
  display: none;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 30px;
  color: #64748b;
  text-align: center;
  background: #fff;
}

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

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

  .hero-poster {
    display: none;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 18px;
    background: #0f172a;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

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

  .rank-card {
    grid-template-columns: 48px 96px minmax(0, 1fr);
  }

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

@media (max-width: 560px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  .hero-control {
    display: none;
  }

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

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

  .related-link {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}
