:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0f766e;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  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;
}

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

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #0f766e);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #059669, #0f766e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: #ecfdf5;
  color: var(--emerald-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 650;
  color: #334155;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.hot-link {
  color: var(--emerald);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(16, 185, 129, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.65) 48%, rgba(15, 118, 110, 0.35));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 56px;
}

.hero-copy {
  max-width: 730px;
  color: #ffffff;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-label {
  background: rgba(255, 255, 255, 0.16);
  color: #a7f3d0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-one-line {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.hero-tags {
  color: #a7f3d0;
  font-weight: 650;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #0f766e);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.32);
}

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

.btn-small {
  min-height: 38px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--emerald);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  background: #10b981;
}

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

.intro-panel {
  margin-top: -42px;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
  gap: 30px;
  align-items: center;
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-header h2,
.page-hero h1,
.text-section h2,
.side-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.intro-panel p,
.section-header p,
.page-hero p {
  color: var(--muted);
}

.search-panel,
.filter-bar {
  display: flex;
  gap: 12px;
}

.search-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
  padding: 13px 14px;
  color: var(--text);
  outline: none;
}

.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.search-panel button {
  min-width: 120px;
  border: 0;
  border-radius: 15px;
  background: var(--emerald);
  color: #ffffff;
  font-weight: 800;
}

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

.section-header.simple {
  align-items: start;
}

.section-more,
.text-link {
  color: var(--emerald);
  font-weight: 800;
}

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

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

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

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #d1fae5;
}

.movie-poster img,
.hot-thumb img,
.category-cover-stack img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-poster img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--emerald);
}

.movie-meta,
.detail-meta,
.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span,
.category-stats span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card-desc {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 700;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 24px;
}

.hot-board,
.category-panel,
.side-card,
.text-section,
.player-section {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 24px;
  box-shadow: var(--soft-shadow);
}

.rank-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.rank-item a:hover {
  background: #ecfdf5;
}

.rank-num {
  color: var(--emerald);
  font-weight: 900;
}

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

.rank-year {
  color: var(--muted);
}

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

.category-link-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0fdfa, #ecfdf5);
  color: #064e3b;
}

.page-hero {
  padding: 86px 0 72px;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.22), transparent 35%),
    linear-gradient(135deg, #ecfdf5, #ffffff 55%, #f0fdfa);
}

.page-hero .container {
  max-width: 930px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.crumbs a {
  color: var(--emerald);
  font-weight: 800;
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 190px;
  background: #d1fae5;
}

.category-card-body {
  padding: 24px;
}

.category-card h2 {
  margin: 0;
  font-size: 26px;
}

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

.filter-bar {
  position: sticky;
  top: 86px;
  z-index: 8;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

.filter-bar.wide input {
  flex: 1.4;
}

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

.hot-row {
  display: grid;
  grid-template-columns: 74px 84px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.hot-rank {
  color: var(--emerald);
  font-size: 20px;
  font-weight: 900;
}

.hot-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #d1fae5;
}

.hot-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.hot-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-hero {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  background: #020617;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 570px;
  padding: 42px 0;
  color: #ffffff;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.detail-meta span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
}

.tag-row.large span {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: rgba(2, 6, 23, 0.38);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #0f766e);
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.32);
}

.text-section p {
  color: #334155;
  font-size: 17px;
}

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

.side-card h2 {
  margin-top: 0;
  font-size: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 750;
}

.side-card dd a,
.side-link {
  color: var(--emerald);
}

.side-link {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}

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

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

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

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

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .hero,
  .detail-hero {
    height: auto;
    min-height: 650px;
  }

  .hero-content,
  .detail-hero-inner,
  .intro-panel,
  .two-column-section,
  .detail-layout,
  .footer-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-content,
  .detail-hero-inner {
    padding: 52px 0 86px;
  }

  .hero-poster,
  .detail-cover {
    width: min(260px, 70vw);
  }

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

  .section-header,
  .filter-bar,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .hot-row {
    grid-template-columns: 54px 74px minmax(0, 1fr);
  }

  .hot-row .btn {
    grid-column: 1 / -1;
  }

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

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

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

  .hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .intro-panel,
  .hot-board,
  .category-panel,
  .side-card,
  .text-section,
  .player-section {
    padding: 18px;
  }

  .category-cover-stack {
    height: 140px;
  }
}
