:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --paper-soft: #f0fdf4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #d1fae5;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.desktop-nav a,
.mobile-nav a {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f3f4f6;
  color: #111827;
  font-size: 18px;
}

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: var(--paper-soft);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.10) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 72px 0;
  color: #ffffff;
}

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

.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  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(-1px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.30);
}

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

.btn-light {
  color: var(--brand-dark);
  border-color: #bbf7d0;
  background: #ffffff;
}

.hero-controls {
  position: absolute;
  right: max(20px, calc((100vw - 1180px) / 2));
  bottom: 32px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-control {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-dots {
  position: absolute;
  left: max(20px, calc((100vw - 1180px) / 2));
  bottom: 44px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.section {
  padding: 56px 0;
}

.section-alt {
  background: #f8fafc;
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: #a7f3d0;
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #064e3b, #111827);
}

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

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

.poster-link img.image-missing {
  opacity: 0.18;
}

.play-mark,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.play-mark {
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 10px;
  color: #064e3b;
  background: #a7f3d0;
}

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

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

.movie-meta span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

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

.movie-card h3 a:hover {
  color: var(--brand);
}

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

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
}

.feature-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

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

.hot-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hot-row:hover {
  transform: translateX(3px);
  border-color: #a7f3d0;
}

.hot-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #064e3b;
  background: #a7f3d0;
  font-weight: 900;
}

.hot-row h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.hot-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.category-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

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

.page-hero {
  padding: 60px 0 30px;
  background: radial-gradient(circle at 10% 10%, #d1fae5 0%, transparent 28%), linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.page-title {
  max-width: 820px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 0;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

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

.breadcrumbs {
  margin-bottom: 22px;
}

.breadcrumbs a {
  color: var(--brand-dark);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 32px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.detail-info .lead {
  margin: 18px 0 22px;
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
}

.text-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
}

.player-section {
  padding: 52px 0;
  background: #030712;
  color: #ffffff;
}

.player-shell {
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.18), rgba(0, 0, 0, 0.58));
}

.video-overlay.is-hidden {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 24px 45px rgba(5, 150, 105, 0.35);
  font-size: 28px;
  cursor: pointer;
}

.player-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer {
  padding: 46px 0;
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand .brand-text strong,
.footer-brand .brand-text small {
  color: #ffffff;
}

.site-footer p {
  max-width: 460px;
  color: #9ca3af;
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #d1d5db;
}

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

.index-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.index-table th,
.index-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.index-table th {
  background: #f3f4f6;
  color: #374151;
}

.index-table a {
  color: var(--brand-dark);
  font-weight: 700;
}

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

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

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

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

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

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

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-controls {
    right: 20px;
  }

  .hero-dots {
    left: 20px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

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

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

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

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

  .movie-card h3 {
    font-size: 16px;
  }

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

  .player-meta {
    align-items: start;
    flex-direction: column;
  }
}
