* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #f8fafc;
  background: linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.36);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.34);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #34d399;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
}

.desktop-nav a {
  color: #e2e8f0;
  transition: color 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #34d399;
}

.nav-search,
.mobile-panel form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-panel input,
.filter-controls input,
.filter-controls select,
.search-hero input {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  outline: none;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.84);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.nav-search input {
  width: 220px;
  padding: 10px 12px;
}

.nav-search button,
.mobile-panel button,
.search-hero button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  background: #10b981;
  cursor: pointer;
}

.nav-search input:focus,
.mobile-panel input:focus,
.filter-controls input:focus,
.filter-controls select:focus,
.search-hero input:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
  background: rgba(15, 23, 42, 0.94);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.mobile-panel a {
  color: #e2e8f0;
  font-weight: 600;
}

.mobile-panel input {
  width: 100%;
  padding: 12px;
}

.hero {
  position: relative;
  background: #020617;
}

.hero-stage {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 720px;
}

.hero-kicker {
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.82);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.26);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  max-width: 850px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.58);
}

.hero h1 + h2 {
  font-size: clamp(28px, 4vw, 54px);
  color: #a7f3d0;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 32px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions,
.pagination,
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.text-btn,
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.primary-btn {
  padding: 13px 24px;
  color: #ffffff;
  background: #10b981;
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.30);
}

.primary-btn:hover,
.nav-search button:hover,
.mobile-panel button:hover,
.search-hero button:hover {
  background: #059669;
}

.ghost-btn,
.text-btn,
.page-btn {
  padding: 12px 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
}

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

.ghost-btn:hover,
.text-btn:hover,
.page-btn.active,
.page-btn:hover {
  border-color: #34d399;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.20);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.52);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.22s ease;
}

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

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dots button.active {
  width: 36px;
  background: #10b981;
}

.main-content {
  padding: 70px 0;
}

.section-stack {
  display: grid;
  gap: 70px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-title span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.22);
}

.section-title h2,
.filter-panel h2,
.page-hero h1,
.search-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.section-title p,
.filter-panel p,
.page-hero p,
.search-hero p {
  margin: 5px 0 0;
  color: #94a3b8;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.82);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.26);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  border-color: rgba(52, 211, 153, 0.36);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.44);
  transform: translateY(-6px) scale(1.015);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.wide .poster-frame {
  aspect-ratio: 16 / 9;
}

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

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

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.76));
  transition: opacity 0.24s ease;
}

.play-hover span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  background: #10b981;
  transform: scale(0.78);
  transition: transform 0.24s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.movie-card:hover .play-hover span {
  transform: scale(1);
}

.year-badge,
.rank-badge,
.heat-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.heat-badge {
  right: 10px;
  bottom: 10px;
  top: auto;
  padding: 6px 10px;
  background: rgba(16, 185, 129, 0.82);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.movie-info h3 a:hover {
  color: #34d399;
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-meta span,
.tag,
.breadcrumb a,
.breadcrumb span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.82);
  font-size: 12px;
}

.card-meta span:nth-child(n+3),
.tag {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.14);
}

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

.category-box,
.year-box,
.filter-panel,
.page-hero,
.search-hero,
.detail-panel,
.player-card,
.info-box,
.ranking-row {
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.70);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.20);
}

.category-box,
.year-box {
  padding: 22px;
}

.category-box:hover,
.year-box:hover {
  border-color: rgba(52, 211, 153, 0.42);
  transform: translateY(-4px);
}

.category-box,
.year-box,
.compact-card {
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-box h3,
.year-box h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #ffffff;
}

.category-box p,
.year-box p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  border-radius: 12px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.48);
}

.compact-card:hover {
  background: rgba(16, 185, 129, 0.14);
}

.compact-card img {
  grid-row: 1 / 3;
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.compact-card span {
  overflow: hidden;
  color: #ffffff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
  padding: 22px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  min-width: 150px;
  padding: 12px;
}

.filter-empty {
  display: none;
  padding: 24px;
  border-radius: 16px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.75);
  text-align: center;
}

.page-hero,
.search-hero {
  margin-bottom: 36px;
  padding: 34px;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34%), rgba(30, 41, 59, 0.70);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
  gap: 30px;
  align-items: start;
}

.player-card {
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.66));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.player-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-overlay span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.36);
  font-size: 30px;
}

.player-caption {
  padding: 14px 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.84);
}

.detail-panel {
  padding: 24px;
}

.detail-panel h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
}

.detail-panel p,
.info-box p,
.long-text {
  color: #cbd5e1;
  line-height: 1.88;
}

.detail-poster {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.70);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.info-box {
  padding: 24px;
}

.info-box h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: #ffffff;
}

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

.ranking-row {
  position: relative;
  display: grid;
  grid-template-columns: 70px 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 112px 12px 12px;
}

.ranking-row strong {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.ranking-row img {
  width: 88px;
  height: 118px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-row h2,
.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
}

.search-hero form {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.search-hero input {
  flex: 1;
  padding: 14px;
}

.search-hero button {
  padding: 14px 22px;
}

.site-footer {
  padding: 52px 0 26px;
  color: #cbd5e1;
  background: #020617;
  border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #34d399;
  font-size: 17px;
}

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

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.13);
  color: #64748b;
  text-align: center;
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero-stage {
    height: 78vh;
    min-height: 540px;
  }

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

  .hero-arrow {
    display: none;
  }

  .filter-panel,
  .footer-grid,
  .info-grid,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .ranking-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

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

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

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

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

  .movie-info {
    padding: 12px;
  }

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

  .search-hero form,
  .filter-controls {
    display: grid;
  }
}
