:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --brand: #0f766e;
  --brand-light: #14b8a6;
  --brand-soft: #ccfbf1;
  --dark: #0b1220;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.35);
  font-size: 14px;
}

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

.desktop-nav > a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  padding: 10px 13px;
  border-radius: 12px;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
}

.desktop-nav > a:hover,
.desktop-nav > a.active,
.nav-dropdown > button:hover {
  color: var(--brand);
  background: #f0fdfa;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 180px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: #334155;
}

.dropdown-panel a:hover {
  color: var(--brand);
  background: #f0fdfa;
}

.header-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
}

.header-search input {
  width: 240px;
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.header-search button,
.mobile-search button,
.large-search button {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--ink);
  font-size: 22px;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-panel a {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-weight: 650;
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: linear-gradient(120deg, #111827, #0f766e);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(20, 184, 166, 0.32), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: #ffffff;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 19px;
}

.hero-pill,
.section-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(15, 118, 110, 0.92);
  font-size: 14px;
  font-weight: 750;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.32);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  font-size: 32px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.quick-search-band,
.content-section,
.page-main,
.detail-main,
.search-page-box {
  width: min(1280px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-band {
  margin-top: -54px;
  position: relative;
  z-index: 5;
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 20px;
  backdrop-filter: blur(20px);
}

.quick-search-band h2,
.section-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.15;
}

.quick-search-band p,
.section-head p,
.page-hero p {
  margin: 0;
  color: var(--muted);
}

.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: center;
}

.category-chip-row a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  font-weight: 700;
}

.content-section {
  margin-top: 56px;
}

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

.section-kicker {
  margin-bottom: 10px;
  color: var(--brand);
  background: var(--brand-soft);
}

.section-more {
  color: var(--brand);
  background: #f0fdfa;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.movie-card:hover .poster img {
  transform: scale(1.08);
}

.poster-badge,
.poster-year {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  top: 10px;
  left: 10px;
  background: rgba(15, 118, 110, 0.92);
}

.poster-year {
  right: 10px;
  bottom: 10px;
  background: rgba(2, 6, 23, 0.72);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 54px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--brand);
}

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

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  font-size: 12px;
  font-weight: 700;
}

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

.compact-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.compact-card img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  opacity: 0.75;
  transition: transform 0.3s ease;
}

.compact-card:hover img {
  transform: scale(1.08);
}

.compact-card span,
.compact-card em {
  position: absolute;
  left: 14px;
  right: 14px;
  z-index: 2;
  color: #ffffff;
}

.compact-card span {
  bottom: 36px;
  font-weight: 850;
}

.compact-card em {
  bottom: 14px;
  font-size: 13px;
  opacity: 0.82;
}

.page-main,
.detail-main {
  padding: 38px 0 64px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  padding: 54px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.45), transparent 30%),
    linear-gradient(135deg, #0f172a, #164e63 64%, #0f766e);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 720px;
  margin-top: 12px;
  color: #dbeafe;
  font-size: 18px;
}

.page-hero span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.category-card span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.category-card h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}

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

.filter-panel {
  position: sticky;
  top: 84px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.page-grid {
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 160px 1fr 120px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  font-size: 18px;
  font-weight: 900;
}

.rank-cover img {
  width: 160px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.rank-info > a {
  font-size: 20px;
  font-weight: 850;
}

.rank-info > a:hover {
  color: var(--brand);
}

.rank-info p {
  margin: 6px 0 10px;
  color: var(--muted);
}

.rank-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
}

.rank-meta span {
  color: var(--ink);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.28), transparent 35%),
    linear-gradient(135deg, #020617, #111827 60%, #0f766e);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 780px;
  color: #dbeafe;
  font-size: 18px;
}

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

.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}

.detail-tags span {
  color: #ecfeff;
  background: rgba(20, 184, 166, 0.25);
}

.detail-info .primary-btn {
  margin-top: 24px;
}

.player-section,
.detail-article,
.related-section {
  margin-top: 36px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.18), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.36);
}

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

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

.detail-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-article section {
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-article p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.search-page-box {
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.large-search {
  margin-bottom: 20px;
}

.large-search input {
  flex: 1;
  min-height: 52px;
}

.search-result-title {
  margin: 8px 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
}

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

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

[data-card].is-hidden {
  display: none;
}

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

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

  .detail-hero {
    grid-template-columns: 320px 1fr;
  }
}

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

  .nav-shell {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    height: 560px;
  }

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

  .hero-control {
    display: none;
  }

  .quick-search-band {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .movie-grid,
  .category-overview-grid,
  .detail-article,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 52px 110px 1fr;
  }

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

  .rank-meta {
    grid-column: 3;
    justify-items: start;
  }

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

@media (max-width: 620px) {
  .nav-shell,
  .quick-search-band,
  .content-section,
  .page-main,
  .detail-main,
  .search-page-box,
  .footer-grid {
    width: calc(100% - 28px);
    padding-left: 0;
    padding-right: 0;
  }

  .nav-shell {
    padding: 0 14px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    width: calc(100% - 32px);
  }

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

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

  .quick-search-band,
  .page-hero,
  .detail-hero,
  .search-page-box {
    padding: 22px;
  }

  .movie-grid,
  .category-overview-grid,
  .detail-article,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    grid-template-columns: 1fr;
  }

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

  .rank-cover {
    display: none;
  }

  .rank-meta {
    grid-column: 2;
  }

  .card-title {
    min-height: auto;
  }

  .footer-grid {
    padding-top: 38px;
    padding-bottom: 38px;
  }
}
