:root {
  --bg: #070914;
  --panel: rgba(16, 20, 36, 0.78);
  --panel-solid: #12172a;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #aab2c8;
  --gold: #f7c948;
  --pink: #ff4d8d;
  --blue: #6aa9ff;
  --violet: #8b5cf6;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.28), transparent 32rem),
    radial-gradient(circle at 90% 15%, rgba(255, 77, 141, 0.22), transparent 28rem),
    linear-gradient(145deg, #050711 0%, #0c1022 48%, #111827 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(5, 7, 17, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
  background: linear-gradient(90deg, #ffffff, #f7c948 45%, #ff4d8d);
  -webkit-background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a {
  padding: 10px 0;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  margin: 28px 0 30px;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #070914;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: center;
  gap: 44px;
  padding: clamp(28px, 6vw, 70px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 17, 0.93), rgba(5, 7, 17, 0.63) 48%, rgba(5, 7, 17, 0.88)),
    var(--hero-img) center / cover no-repeat;
  filter: saturate(1.18);
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 22rem),
    linear-gradient(180deg, transparent, rgba(7, 9, 20, 0.88));
}

.hero-copy,
.hero-poster,
.detail-poster,
.detail-info {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.detail-one {
  margin: 24px 0;
  max-width: 760px;
  color: #dbe3f7;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.primary-btn,
.ghost-btn,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-btn,
.search-box button {
  color: #151515;
  background: linear-gradient(135deg, #ffe082, #ff4d8d);
  box-shadow: 0 16px 40px rgba(255, 77, 141, 0.26);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 20% 20%, rgba(255, 77, 141, 0.42), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(106, 169, 255, 0.42), transparent 44%),
    #151a2e;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-empty::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.23), transparent 65%);
}

.hero-poster .poster-frame,
.detail-poster .poster-frame {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 6vw, 70px);
  bottom: 32px;
  display: flex;
  gap: 10px;
}

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

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

.search-panel,
.page-hero,
.section-block,
.player-section,
.detail-content {
  margin: 30px 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel,
.compact-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.search-panel h2,
.section-head h2,
.player-section h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: -0.05em;
}

.search-panel p,
.detail-content p,
.rank-item p {
  color: var(--muted);
  line-height: 1.8;
}

.search-box {
  display: flex;
  min-width: min(480px, 100%);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 0 18px;
  font-size: 15px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

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

.section-head a {
  color: var(--gold);
  font-weight: 800;
}

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

.category-tile {
  min-height: 130px;
  padding: 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.16), transparent 50%),
    linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(255, 77, 141, 0.18));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.28);
}

.category-tile span {
  color: var(--gold);
  font-weight: 800;
}

.category-tile strong {
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-poster {
  position: relative;
  display: block;
}

.play-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #171717;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.card-body {
  padding: 16px;
}

.card-title,
.rank-title {
  display: block;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.card-meta {
  margin-top: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.card-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #dbe3f7;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}

.rank-list span,
.rank-index {
  color: var(--gold);
  font-weight: 900;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  margin: 28px 0 30px;
  padding: clamp(24px, 5vw, 62px);
  border-radius: 34px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 330px 1fr;
  align-items: center;
  gap: 44px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #ffffff;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  border: 1px solid var(--line);
}

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

.play-btn {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.play-btn span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #171717;
  background: linear-gradient(135deg, #ffffff, #ffd166);
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.video-shell.playing .play-btn {
  display: none;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 110px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-cover .poster-frame {
  border-radius: 16px;
}

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

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 17, 0.55);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  color: var(--muted);
}

.footer-grid strong {
  color: #ffffff;
  font-size: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.footer-links a {
  color: #dbe3f7;
}

@media (max-width: 1040px) {
  .hero-slide,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 320px;
  }

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

@media (max-width: 760px) {
  main,
  .nav-wrap,
  .footer-grid {
    width: min(100% - 22px, 1240px);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(7, 9, 20, 0.96);
  }

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

  .hero-carousel {
    min-height: 760px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 28px;
    align-content: center;
    gap: 28px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 42px;
    line-height: 1.02;
  }

  .search-panel,
  .compact-hero,
  .footer-grid {
    display: block;
  }

  .search-box {
    margin-top: 18px;
  }

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

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

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

  .hero-carousel {
    min-height: 710px;
  }

  .hero-actions {
    display: grid;
  }

  .detail-hero {
    padding: 20px;
  }

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