:root {
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.14);
  --shadow-card: 0 14px 34px rgba(15, 23, 42, 0.12);
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-800);
  background: linear-gradient(180deg, #ecfeff 0%, #f8fafc 28%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-700), var(--cyan-600));
  box-shadow: 0 14px 32px rgba(8, 145, 178, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  gap: 22px;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--amber-400), #fde68a);
  border-radius: 13px;
  box-shadow: inset 0 -5px 12px rgba(120, 53, 15, 0.18);
  transition: transform 0.24s ease;
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.04);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 700;
}

.nav-link,
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  height: 40px;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.dropdown-trigger:hover {
  color: var(--amber-400);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  min-width: 180px;
  padding: 8px;
  color: var(--slate-800);
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
  color: var(--teal-700);
  background: #ecfeff;
}

.header-search {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  max-width: 300px;
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  color: var(--slate-800);
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid transparent;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px 18px;
}

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

.mobile-nav a {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.main-wrap {
  overflow: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

.hero-carousel {
  position: relative;
  color: var(--white);
  background: var(--slate-950);
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.42fr);
  gap: 44px;
  align-items: center;
  width: 100%;
  padding: 92px max(22px, calc((100vw - var(--max-width)) / 2 + 22px)) 88px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) blur(1px);
  transform: scale(1.06);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.2), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 118, 110, 0.76) 52%, rgba(8, 145, 178, 0.3) 100%);
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  padding: 8px 14px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-title {
  max-width: 780px;
  margin: 20px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--teal-700);
  background: #ccfbf1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.pill.dark {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.btn-primary {
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), #fef3c7);
  box-shadow: 0 12px 30px rgba(251, 191, 36, 0.3);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn-soft {
  color: var(--teal-700);
  background: #ccfbf1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster-card span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  color: var(--slate-950);
  background: rgba(251, 191, 36, 0.94);
  border-radius: 999px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  right: max(22px, calc((100vw - var(--max-width)) / 2 + 22px));
  bottom: 30px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 46px;
  height: 7px;
  padding: 0;
  background: rgba(255, 255, 255, 0.34);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--amber-400);
}

.section {
  padding: 58px 0;
}

.section.compact {
  padding: 36px 0;
}

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

.section-label {
  margin: 0 0 8px;
  color: var(--teal-700);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-title,
.page-title {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--slate-600);
  font-size: 17px;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  padding: 22px;
  background: linear-gradient(135deg, var(--white), #ecfeff);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile::after,
.category-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 70%);
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(15, 118, 110, 0.18);
}

.category-tile h3,
.category-card h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 23px;
  font-weight: 900;
}

.category-tile p,
.category-card p {
  margin: 0;
  color: var(--slate-600);
}

.category-card .card-count {
  display: inline-flex;
  margin-top: 16px;
  padding: 6px 11px;
  color: var(--teal-700);
  background: #ccfbf1;
  border-radius: 999px;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(13, 148, 136, 0.38);
  box-shadow: 0 20px 46px rgba(15, 118, 110, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #164e63, #0f766e);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.055);
  filter: saturate(1.1);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: var(--slate-950);
  background: rgba(251, 191, 36, 0.94);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

.card-meta {
  margin-bottom: 10px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
}

.movie-card h3 a:hover {
  color: var(--teal-700);
}

.movie-card p {
  display: -webkit-box;
  min-height: 54px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--slate-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag {
  display: inline-flex;
  padding: 4px 8px;
  color: var(--slate-600);
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 148, 136, 0.35);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), #fde68a);
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
}

.rank-cover img {
  width: 84px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.rank-info h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--slate-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 54px 0 42px;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.25), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--teal-700) 56%, var(--cyan-600));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--amber-400);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 160px 150px;
  gap: 12px;
  margin: 0 0 24px;
  padding: 18px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--slate-800);
  background: var(--slate-50);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.14);
}

.empty-state {
  display: none;
  padding: 32px;
  color: var(--slate-600);
  text-align: center;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
}

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

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

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

.player-card,
.detail-card,
.sidebar-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: var(--slate-950);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.78));
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  color: var(--slate-950);
  background: var(--amber-400);
  border-radius: 999px;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 20px 45px rgba(251, 191, 36, 0.35);
}

.player-title {
  padding: 18px 22px;
}

.player-title h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 24px;
  font-weight: 900;
}

.detail-card {
  padding: 24px;
}

.detail-card h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 24px;
  font-weight: 900;
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--slate-700);
  font-size: 17px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.sidebar-card {
  padding: 18px;
}

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

.sidebar-movie {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.sidebar-movie img {
  width: 70px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.sidebar-movie h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 16px;
  font-weight: 900;
}

.sidebar-movie p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  margin-top: 50px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px 22px;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
}

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

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

.footer-links a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 22px 30px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
}

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

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

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

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

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

  .hero-stage {
    min-height: 740px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 70px;
    padding-bottom: 90px;
  }

  .hero-poster-card {
    max-width: 260px;
  }

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

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

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

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

  .logo {
    font-size: 19px;
  }

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

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 42px 0;
  }

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

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

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

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

  .category-strip,
  .categories-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 42px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 17px;
  }

  .rank-cover img {
    width: 72px;
  }

  .page-hero {
    padding: 42px 0 34px;
  }

  .detail-card {
    padding: 18px;
  }

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