:root {
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --gray: #64748b;
  --light: #f8fafc;
  --line: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 26px rgba(20, 184, 166, 0.28);
}

.brand-text {
  font-size: 23px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link {
  font-weight: 700;
  color: #334155;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--teal-dark);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link-muted {
  color: #64748b;
  font-size: 14px;
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px;
  overflow: hidden;
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 10px 8px 14px;
  background: transparent;
}

.header-search button,
.search-page-form button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  padding: 8px 15px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  background: #ecfeff;
  color: var(--teal-dark);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

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

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(20, 184, 166, 0.2), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 780px;
  color: #fff;
}

.hero-eyebrow {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 14px;
  color: #a7f3d0;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.36);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 670px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 21px);
  margin: 22px 0 18px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #cbd5e1;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.12);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 26px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 16px 32px rgba(20, 184, 166, 0.28);
}

.btn-glass {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 50px;
  height: 50px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.feature-band {
  margin: 28px 0;
  padding: 58px 0;
  background: linear-gradient(135deg, #f1f5f9, #ecfeff);
  border-radius: 36px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--gray);
}

.section-more {
  color: var(--teal-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease, opacity 0.36s ease;
}

.movie-card a:hover img {
  transform: scale(1.08);
  opacity: 0.86;
}

.poster-play {
  position: absolute;
  inset: auto 12px 12px auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 184, 166, 0.92);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card a:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.28);
}

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

.movie-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  color: #0f172a;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card-meta {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 45px;
  color: #475569;
  font-size: 14px;
  margin: 10px 0 0;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--teal-dark);
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.category-title {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.category-desc {
  margin-top: 8px;
  color: #64748b;
}

.page-hero {
  padding: 70px 0;
  color: #fff;
  background:
    radial-gradient(circle at 72% 18%, rgba(45, 212, 191, 0.36), transparent 32%),
    linear-gradient(135deg, #0f766e 0%, #0891b2 55%, #0f172a 100%);
}

.page-hero p:not(.hero-eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dffafe;
  font-size: 18px;
}

.page-stack {
  padding: 54px 0;
  display: grid;
  gap: 36px;
}

.category-panel {
  border-radius: 26px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 1px 7px rgba(15, 23, 42, 0.08);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 0 16px;
  background: #fff;
}

.filter-bar input {
  flex: 1 1 300px;
}

.filter-bar select {
  flex: 0 1 180px;
}

.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin-top: 28px;
}

.search-page-form input {
  flex: 1;
  font-size: 17px;
}

.watch-area {
  padding: 28px 0 0;
  background: #020617;
}

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

.breadcrumb a {
  color: #67e8f9;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  display: block;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.26));
  cursor: pointer;
  z-index: 3;
}

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

.play-orb {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 20px 40px rgba(20, 184, 166, 0.34);
  font-size: 34px;
  padding-left: 5px;
}

.overlay-copy {
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.46);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 42px 0 70px;
}

.detail-main h1 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-main .detail-meta {
  color: #475569;
  margin-bottom: 10px;
}

.detail-main .detail-meta span {
  background: #f1f5f9;
}

.detail-card,
.side-card {
  margin-top: 22px;
  border-radius: 22px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  color: #334155;
  margin: 0 0 14px;
  font-size: 16px;
}

.accent-card {
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 98px;
}

.side-related {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.side-related:last-child {
  border-bottom: 0;
}

.side-related img {
  width: 116px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.side-related strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
}

.side-related small {
  display: block;
  margin-top: 6px;
  color: #64748b;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #1e293b, #020617);
  padding: 52px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer p {
  color: #94a3b8;
  margin: 12px 0 0;
}

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

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

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

.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  font-size: 14px;
}

.is-hidden-card {
  display: none;
}

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

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

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

  .detail-side {
    display: none;
  }

  .header-search {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
  }

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

  .main-nav {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }

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

  .nav-link {
    padding: 9px 0;
  }

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

  .hero {
    min-height: 560px;
    height: 74vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 82px;
  }

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

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

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

  .feature-band {
    border-radius: 24px;
  }

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

  .search-page-form {
    flex-direction: column;
  }
}

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

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

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

  .hero-meta,
  .detail-meta {
    gap: 8px;
  }

  .btn {
    width: 100%;
  }

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

  .movie-card-title {
    min-height: 42px;
    font-size: 14px;
  }

  .movie-card-desc {
    display: none;
  }

  .page-hero {
    padding: 48px 0;
  }

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

  .player-shell {
    border-radius: 16px 16px 0 0;
  }

  .play-orb {
    width: 70px;
    height: 70px;
  }

  .detail-card,
  .side-card,
  .category-panel {
    padding: 18px;
    border-radius: 18px;
  }
}
