:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --panel: #ffffff;
  --slate: #111827;
  --slate-2: #1e293b;
  --green: #10b981;
  --green-dark: #047857;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #1e293b 48%, #0f172a);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-radius: 14px;
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--green);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  color: #fff;
  background: transparent;
  border: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
}

.mobile-nav.is-open {
  display: flex;
}

.content-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.hero-slide.is-active {
  display: block;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 40%, rgba(34, 211, 238, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.75) 45%, rgba(2, 6, 23, 0.42)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 46%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.55fr);
  gap: 56px;
  align-items: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-copy {
  max-width: 760px;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #ecfeff;
  background: rgba(16, 185, 129, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 23px);
}

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

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

.primary-btn {
  color: #052e2b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 18px 30px rgba(16, 185, 129, 0.25);
}

.ghost-btn,
.section-more {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.section-more {
  color: var(--green-dark);
  background: #ecfdf5;
  border-color: #a7f3d0;
}

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

.hero-poster {
  position: relative;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--green);
}

.page-section {
  padding: 72px 0;
}

.dark-section {
  color: #e5e7eb;
  background: linear-gradient(180deg, #0f172a, #111827);
}

.soft-section {
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
}

.search-intro {
  max-width: 760px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dark-section .eyebrow,
.hero-copy .eyebrow,
.detail-hero .eyebrow,
.page-hero .eyebrow {
  color: var(--cyan);
}

.search-intro h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.search-intro p,
.section-heading p,
.page-hero p,
.detail-copy .lead-text {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.dark-section .section-heading p,
.dark-section .section-heading h2 {
  color: #e5e7eb;
}

.search-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.search-row input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
}

.search-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 38px;
  padding: 7px 14px;
  color: var(--green-dark);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  cursor: pointer;
}

.filter-btn.is-active,
.filter-btn:hover {
  color: #fff;
  background: var(--green-dark);
}

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

.compact-heading {
  margin-bottom: 18px;
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.card-image {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.card-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.movie-card:hover .card-image img {
  transform: scale(1.08);
  opacity: 0.9;
}

.card-year {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 3px 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.card-body h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.card-meta {
  margin-top: auto;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

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

.card-tags span {
  min-height: 24px;
  color: var(--green-dark);
  background: #ecfdf5;
  border-color: #d1fae5;
  font-size: 12px;
}

.compact-card .card-body h3 {
  min-height: auto;
  font-size: 17px;
}

.compact-card .card-tags {
  display: none;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.rank-panel h2 {
  margin: 0 0 16px;
}

.rank-panel ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-panel a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.rank-num {
  grid-row: span 2;
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
}

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

.rank-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

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

.category-tile {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  color: #fff;
  background: linear-gradient(145deg, #0f172a, #134e4a 64%, #0891b2);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.category-tile em {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-style: normal;
}

.category-overview-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.category-overview-card,
.prose-card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.category-overview-head h2,
.prose-card h2 {
  margin: 0;
  font-size: 30px;
}

.category-overview-head p,
.prose-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.page-hero,
.detail-hero {
  color: #fff;
  background:
    radial-gradient(circle at 80% 18%, rgba(34, 211, 238, 0.25), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b 56%, #020617);
}

.small-hero,
.category-hero {
  padding: 82px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.page-hero p,
.detail-copy .lead-text {
  color: rgba(255, 255, 255, 0.78);
}

.detail-hero {
  padding: 64px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  max-width: 900px;
}

.detail-meta {
  margin: 22px 0;
}

.detail-meta span {
  padding: 7px 12px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-weight: 800;
}

.player-section {
  background: #020617;
  color: #fff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: blur(1px) saturate(1.05);
}

.player-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.22));
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.32);
  cursor: pointer;
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ranking-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.ranking-card a {
  display: grid;
  grid-template-columns: 78px 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
}

.ranking-index {
  color: var(--green-dark);
  font-size: 28px;
  font-weight: 900;
}

.ranking-card img {
  width: 180px;
  height: 112px;
  object-fit: cover;
  border-radius: 18px;
}

.ranking-card h2 {
  margin: 0;
  font-size: 24px;
}

.ranking-card p {
  margin: 8px 0;
  color: var(--muted);
}

.ranking-meta span {
  padding: 4px 9px;
  color: #075985;
  background: #ecfeff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

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

.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
}

.footer-main h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-main p {
  max-width: 560px;
  color: #94a3b8;
}

.footer-main ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-main a:hover {
  color: var(--green);
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  text-align: center;
}

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

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

  .rank-panel {
    position: static;
  }

  .detail-poster {
    max-width: 360px;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 80px 0 56px;
  }

  .hero-poster {
    display: none;
  }

  .hero-control {
    display: none;
  }

  .search-row,
  .section-heading,
  .category-overview-head,
  .footer-main,
  .detail-content,
  .ranking-card a {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
  }

  .movie-grid,
  .home-grid,
  .category-page-grid,
  .library-grid,
  .featured-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 620px;
  }

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

  .page-section {
    padding: 50px 0;
  }

  .movie-grid,
  .home-grid,
  .category-page-grid,
  .library-grid,
  .featured-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .category-overview-card,
  .prose-card {
    padding: 18px;
    border-radius: 22px;
  }

  .small-hero,
  .category-hero,
  .detail-hero {
    padding: 54px 0;
  }
}
