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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  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.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #065f46);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
}

.brand-text {
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

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

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

.nav-links a:hover {
  color: var(--accent);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.nav-search input,
.hero-search input,
.filter-box input,
.search-panel input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.hero-search input:focus,
.filter-box input:focus,
.search-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.nav-search button,
.hero-search button,
.primary-btn,
.ghost-btn,
.player-control {
  border: 0;
  cursor: pointer;
}

.nav-search button,
.hero-search button,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: #f3f4f6;
  border: 0;
  border-radius: 12px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
  border-radius: 99px;
}

.hero {
  position: relative;
  min-height: 64vh;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 30%, rgba(5, 150, 105, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.70), transparent 44%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 64vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 48px;
  padding: 60px 0 76px;
}

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

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero p {
  margin: 0 0 24px;
  max-width: 660px;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 7px 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

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

.hero-actions .primary-btn {
  height: 48px;
  padding: 0 28px;
  border-radius: 12px;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
  transition: transform 0.35s ease;
}

.hero-card:hover {
  transform: rotate(0deg) translateY(-5px);
}

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

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 45%);
}

.hero-card span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  font-weight: 900;
  font-size: 20px;
}

.hero-nav {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.46);
  border: 0;
  border-radius: 99px;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.26);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-search {
  position: relative;
  z-index: 8;
  width: min(760px, calc(100% - 32px));
  margin: -34px auto 0;
  display: flex;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-search input {
  height: 50px;
  border-radius: 14px;
}

.hero-search button {
  height: 50px;
  min-width: 118px;
  border-radius: 14px;
}

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

.main.narrow {
  width: min(980px, calc(100% - 32px));
}

.page-hero {
  margin: 28px 0 34px;
  padding: clamp(28px, 5vw, 48px);
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.36), transparent 36%),
    linear-gradient(135deg, #064e3b, #111827);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d1fae5;
  font-size: 18px;
}

.section {
  margin-top: 62px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.heading-line {
  flex: 1;
  height: 4px;
  min-width: 40px;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.30), transparent);
  border-radius: 99px;
}

.section-more {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card,
.movie-row,
.category-card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

.movie-card:hover,
.movie-row:hover,
.category-card:hover {
  border-color: rgba(5, 150, 105, 0.30);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
  transform: translateY(-5px);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #e5e7eb, #f9fafb);
}

.poster-frame.wide {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%);
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(5, 150, 105, 0.22);
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(17, 24, 39, 0.78);
}

.poster-meta {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: block;
  padding: 14px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  line-height: 1.38;
  font-weight: 900;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong,
.movie-row:hover strong {
  color: var(--accent);
}

.card-body em,
.row-info em {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body small,
.row-info small {
  display: block;
  margin-top: 10px;
  color: #6b7280;
  font-size: 12px;
}

.movie-card.large .card-body strong {
  min-height: auto;
  font-size: 18px;
}

.movie-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 10px;
  border-radius: 16px;
}

.row-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e5e7eb;
  border-radius: 12px;
}

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

.row-info {
  min-width: 0;
  padding: 4px 6px 4px 0;
}

.row-info strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card {
  display: block;
  padding: 24px;
  border-radius: 22px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

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

.category-card span {
  color: var(--accent);
  font-weight: 900;
}

.filter-box,
.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 24px 0 28px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-box input,
.search-panel input {
  height: 48px;
  border-radius: 14px;
}

.filter-box button,
.search-panel button {
  height: 48px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--accent);
  border: 0;
  border-radius: 14px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
  gap: 28px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.player-start {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.94);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.28);
  font-size: 28px;
}

.player-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.player-control {
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.player-control:hover {
  background: rgba(255, 255, 255, 0.30);
}

.player-status {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.52);
}

.detail-card {
  margin-top: 24px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 18px;
  color: #4b5563;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  color: #065f46;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.text-block {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.text-block h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 950;
}

.text-block p {
  margin: 0;
  color: #374151;
  white-space: pre-line;
}

.review-box {
  padding: 18px;
  background: #f9fafb;
  border-radius: 16px;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 950;
}

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

.search-empty {
  padding: 28px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: 20px;
  text-align: center;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.2fr);
  gap: 32px;
  padding: 42px 0;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

.footer-inner p {
  margin: 0;
  max-width: 520px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

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

.footer-links a:hover {
  color: #34d399;
}

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

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

  .nav-wrap {
    grid-template-columns: auto auto;
  }

  .nav-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding-bottom: 12px;
  }

  .nav-links {
    justify-content: flex-end;
  }
}

@media (max-width: 820px) {
  .mobile-toggle {
    display: inline-block;
    justify-self: end;
  }

  .nav-wrap {
    gap: 12px;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 0;
    white-space: normal;
  }

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

  .brand-subtitle {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .hero-card {
    display: none;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .side-panel {
    position: static;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .main {
    width: min(100% - 22px, 1180px);
    padding-top: 32px;
  }

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

  .card-body {
    padding: 11px;
  }

  .card-body strong {
    font-size: 14px;
  }

  .movie-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .heading-line {
    display: none;
  }

  .filter-box,
  .search-panel {
    grid-template-columns: 1fr;
  }
}
