:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --orange: #f97316;
  --rose: #f43f5e;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f1f5f9 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 54%, #0f172a 100%);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.24);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
  transition: transform 0.25s ease;
}

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

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

.brand-text strong {
  color: #ffffff;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-text em {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

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

.mobile-nav-link {
  color: #cbd5e1;
  font-weight: 700;
  padding: 10px 0;
}

.mobile-nav-link.is-active {
  color: #ffffff;
}

.hero-carousel {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-badges span {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.hero-badges span:first-child {
  background: #10b981;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

.hero-genre {
  margin-bottom: 28px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ecfeff;
  backdrop-filter: blur(8px);
}

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

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

.primary-btn {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 15px 34px rgba(5, 150, 105, 0.26);
}

.primary-btn:hover {
  background: #047857;
  transform: translateY(-2px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.ghost-btn--dark {
  background: #e2e8f0;
  color: #0f172a;
}

.ghost-btn--dark:hover {
  background: #cbd5e1;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.54);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: center;
  margin-top: -58px;
  position: relative;
  z-index: 10;
  padding: 30px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.intro-panel h1,
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.intro-panel p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.home-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.home-search input {
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  background: transparent;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.home-search button {
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  background: #059669;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.content-section {
  padding: 56px 0 0;
}

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

.section-heading span {
  display: inline-flex;
  margin-bottom: 8px;
  color: #059669;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.035em;
}

.section-heading a {
  color: #059669;
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 25px 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(16, 185, 129, 0.38);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  opacity: 0.92;
}

.poster-year,
.rank-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.poster-year {
  right: 12px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #f97316, #f43f5e);
}

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

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #059669;
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #059669;
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.category-tile p,
.category-overview-card p {
  margin: 0 0 14px;
  color: #64748b;
  line-height: 1.75;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.mini-links a {
  border-radius: 999px;
  padding: 6px 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.tile-link {
  display: inline-flex;
  color: #059669;
  font-weight: 900;
}

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

.year-links a {
  display: grid;
  place-items: center;
  min-height: 74px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  color: #059669;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.year-links a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

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

.compact-row {
  display: grid;
  grid-template-columns: 36px 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.compact-row:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

.row-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 950;
}

.compact-row img {
  width: 76px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.compact-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.compact-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.compact-info em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.page-main {
  min-height: 72vh;
}

.page-hero {
  margin-top: 34px;
  padding: 48px;
  border-radius: 30px;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.24), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: var(--shadow);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
}

.filter-panel {
  margin: 34px 0 26px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.filter-search label,
.filter-controls span {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.filter-search input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.filter-count {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 14px;
}

.movie-card.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 24px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #059669;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-top: 28px;
  padding: 28px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  aspect-ratio: 16 / 10;
}

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: #475569;
  font-size: 18px;
  line-height: 1.75;
}

.detail-badges span {
  color: #0f172a;
  background: #e2e8f0;
}

.detail-badges span:first-child {
  color: #ffffff;
  background: #059669;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0 0 20px;
  list-style: none;
}

.detail-meta-list li {
  border-radius: 16px;
  padding: 12px 14px;
  background: #f8fafc;
}

.detail-meta-list strong {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
}

.detail-meta-list span {
  font-weight: 900;
}

.tag-row--detail {
  margin-bottom: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.32);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.34);
  font-size: 30px;
  text-indent: 4px;
}

.play-layer strong {
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  padding-top: 44px;
}

.detail-article,
.detail-side {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 30px;
}

.detail-article p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 2;
}

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

.site-footer {
  margin-top: 70px;
  background: linear-gradient(135deg, #0f172a, #1e293b 52%, #0f172a);
  color: #cbd5e1;
}

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

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

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.keyword-cloud {
  color: #94a3b8;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

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

@media (max-width: 780px) {
  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-panel,
  .split-section,
  .detail-hero,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    margin-top: -34px;
    padding: 22px;
  }

  .home-search {
    flex-direction: column;
  }

  .home-search button {
    min-height: 44px;
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .year-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px;
  }

  .detail-meta-list,
  .filter-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-shell,
  .mobile-nav,
  .footer-grid,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-content h1 {
    font-size: 36px;
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .year-links {
    grid-template-columns: 1fr;
  }

  .compact-row {
    grid-template-columns: 30px 62px minmax(0, 1fr);
  }

  .compact-row img {
    width: 62px;
    height: 48px;
  }
}
