:root {
  --emerald: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(180deg, #ffffff 0%, var(--slate-50) 44%, #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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.24);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand {
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--emerald);
  background: #ffffff;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text {
  display: grid;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: #d1fae5;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
}

.desktop-nav a {
  padding: 7px 0;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: #ffffff;
  border-color: #ffffff;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  backdrop-filter: blur(10px);
}

.header-search input,
.mobile-search input {
  width: 170px;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #d1fae5;
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 11px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

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

.mobile-search {
  border-radius: 16px;
  margin-top: 8px;
}

.mobile-search input {
  width: 100%;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: var(--slate-900);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.35), transparent 38%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding: 56px 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.35);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--slate-700);
  background: var(--slate-100);
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.30);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(5, 150, 105, 0.36);
}

.btn.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 999px;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

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

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

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

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

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

.section {
  padding: 70px 0;
}

.section.alt {
  background: linear-gradient(180deg, #ffffff, var(--slate-50));
}

.section.dark {
  color: #ffffff;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
}

.section.dark .section-heading h1,
.section.dark .section-heading h2 {
  color: #ffffff;
}

.section-heading p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--slate-500);
}

.section.dark .section-heading p {
  color: var(--slate-300);
}

.section-link {
  flex: 0 0 auto;
  color: var(--emerald);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--slate-200), var(--slate-100));
}

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

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

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  right: 12px;
  left: auto;
  background: linear-gradient(90deg, var(--amber), var(--rose));
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--slate-500);
  font-size: 12px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

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

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

.category-card {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-icon {
  font-size: 32px;
}

.category-card h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 21px;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 70px 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  color: var(--slate-800);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.ranking-num {
  color: var(--rose);
  font-size: 22px;
  font-weight: 900;
}

.ranking-item img {
  width: 82px;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-item h3 {
  margin: 0 0 6px;
  color: var(--slate-900);
}

.ranking-item p {
  margin: 0;
  color: var(--slate-500);
}

.ranking-score {
  color: var(--emerald);
  font-weight: 900;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin: 28px 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}

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

.breadcrumb {
  color: var(--slate-500);
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.breadcrumb .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.breadcrumb a {
  color: var(--emerald);
  font-weight: 700;
}

.detail-hero {
  padding: 48px 0 64px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 10%, rgba(8, 145, 178, 0.38), transparent 30%),
    linear-gradient(135deg, var(--slate-900), #123c35 45%, #0e7490 100%);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.62fr);
  gap: 32px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: var(--radius-xl);
  box-shadow: 0 26px 65px rgba(2, 6, 23, 0.45);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-action {
  position: absolute;
  inset: auto auto 26px 26px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(8, 145, 178, 0.35);
}

.player-action.is-hidden {
  display: none;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.detail-side img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.detail-title h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

.detail-title p {
  margin: 0 0 18px;
  color: #d1fae5;
  font-size: 18px;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content-card {
  margin-top: 28px;
  padding: 24px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: 24px;
}

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

.info-table {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.info-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  color: var(--slate-600);
}

.info-row strong {
  color: var(--slate-900);
}

.is-hidden {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 32px;
  color: var(--slate-500);
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}

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

.site-footer {
  color: var(--slate-300);
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 42px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-brand .brand-mark {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--slate-300);
}

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

.footer-bottom {
  padding: 18px 16px;
  color: var(--slate-500);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

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

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

  .detail-side {
    grid-template-columns: 180px 1fr;
  }

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 66px;
    gap: 12px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-slide img {
    min-height: 520px;
  }

  .hero-control {
    display: none;
  }

  .hero-copy {
    padding: 48px 0 76px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

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

  .card-body {
    padding: 13px;
  }

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

  .ranking-item {
    grid-template-columns: 44px 72px 1fr;
  }

  .ranking-score {
    grid-column: 3;
  }

  .ranking-item img {
    width: 72px;
    height: 96px;
  }

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

  .info-row {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-copy p {
    font-size: 16px;
  }
}
