:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --orange: #ea580c;
  --green: #16a34a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
  color: var(--gray-800);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, #0f766e, var(--cyan), var(--blue));
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

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

.nav-links a {
  font-weight: 650;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links .is-active {
  color: #ccfbf1;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  width: 290px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.nav-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 8px 10px;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.nav-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: var(--teal);
  background: var(--white);
  padding: 8px 16px;
  font-weight: 750;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(90deg, #0f766e, #06b6d4, #2563eb);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 25%, rgba(34, 211, 238, 0.38), transparent 28%),
    linear-gradient(90deg, rgba(13, 148, 136, 0.96) 0%, rgba(8, 145, 178, 0.84) 42%, rgba(15, 23, 42, 0.54) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

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

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 750;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.08;
  font-weight: 900;
  text-shadow: 0 12px 35px rgba(15, 23, 42, 0.28);
}

.hero-copy p {
  margin: 0 0 24px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.4vw, 24px);
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.tag-cloud a {
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--teal);
  background: var(--white);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.22);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

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

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  max-width: 780px;
  overflow-x: auto;
}

.hero-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
  border: 0;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(15, 23, 42, 0.32);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(12px);
}

.hero-dot span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.hero-dot.is-active {
  color: var(--white);
  background: rgba(13, 148, 136, 0.86);
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.hero-category-links a {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.home-section,
.page-layout,
.detail-layout {
  padding: 56px 0;
}

.section-head,
.strip-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2,
.strip-head h2,
.side-panel h2,
.content-card h2,
.player-section h2 {
  margin: 0 0 6px;
  color: var(--gray-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
}

.section-head p,
.strip-head p {
  margin: 0;
  color: var(--gray-500);
}

.section-link,
.text-link,
.strip-head > a {
  color: var(--teal);
  background: #ccfbf1;
}

.category-strip {
  margin-top: 36px;
  padding-top: 34px;
  border-top: 1px solid var(--gray-200);
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap,
.movie-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.poster-wrap {
  aspect-ratio: 3 / 4;
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.74));
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--teal);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), #f59e0b);
  font-weight: 900;
  text-align: center;
}

.movie-info {
  padding: 18px;
}

.movie-category {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--teal);
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 800;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-info h3 a:hover {
  color: var(--teal);
}

.movie-info p {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--gray-500);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 14px;
}

.movie-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--gray-100);
}

.rank-list {
  display: grid;
  gap: 16px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 150px;
}

.movie-card-horizontal .movie-thumb {
  height: 100%;
}

.movie-card-horizontal .movie-info p {
  min-height: auto;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 15%, rgba(34, 211, 238, 0.36), transparent 25%),
    linear-gradient(90deg, #0f766e, var(--cyan), var(--blue));
  padding: 70px 0;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.crumb a:hover {
  color: var(--white);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  color: var(--gray-700);
  font-weight: 800;
}

.pill.is-active,
.pill:hover {
  color: var(--white);
  background: var(--teal);
}

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

.filter-box input,
.filter-box select,
.search-page-input {
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  outline: 0;
  background: var(--white);
  padding: 0 14px;
  color: var(--gray-800);
}

.filter-box input:focus,
.filter-box select:focus,
.search-page-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.full-width,
.full-width input {
  width: 100%;
}

.compact-toolbar {
  align-items: stretch;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
}

.side-panel,
.content-card,
.player-section {
  border-radius: 22px;
  background: var(--white);
  padding: 24px;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

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

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

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

.category-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.category-cover {
  min-height: 210px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

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

.category-card div {
  padding: 22px 22px 22px 0;
}

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

.category-card p {
  margin: 0 0 20px;
  color: var(--gray-500);
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  border-radius: 22px;
  background: var(--white);
  padding: 12px;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.search-page-input {
  flex: 1;
}

.detail-top {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.34), transparent 24%),
    linear-gradient(90deg, #0f766e, #0891b2, #1d4ed8);
  padding: 44px 0 58px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.34);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.12;
  font-weight: 900;
}

.detail-one-line {
  max-width: 850px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 21px;
}

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

.detail-layout {
  display: grid;
  gap: 26px;
}

.video-player-box {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(2, 6, 23, 0.28);
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--teal);
  background: var(--white);
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

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

.content-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  white-space: pre-line;
}

.related-list .movie-card-horizontal {
  grid-template-columns: 150px minmax(0, 1fr);
}

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

.site-footer {
  margin-top: 40px;
  color: var(--white);
  background: linear-gradient(90deg, var(--gray-900), #1f2937, var(--gray-900));
}

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

@media (max-width: 1024px) {
  .grid-3,
  .grid-4,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-search {
    width: 230px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 800px) {
  .site-nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  .site-header.is-open .nav-links,
  .site-header.is-open .nav-search {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hero-carousel {
    height: 650px;
  }

  .hero-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-category-links {
    justify-content: flex-start;
    max-width: none;
  }

  .toolbar,
  .section-head,
  .strip-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-box {
    flex-direction: column;
  }

  .detail-grid,
  .category-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-card div {
    padding: 0 22px 22px;
  }

  .detail-poster {
    max-width: 260px;
  }
}

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

  .grid-3,
  .grid-4,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal,
  .related-list .movie-card-horizontal {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .movie-card-horizontal .movie-info {
    padding: 12px;
  }

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

  .hero-copy p,
  .detail-one-line {
    font-size: 17px;
  }

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