:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --cyan: #0891b2;
  --amber: #f59e0b;
  --rose: #e11d48;
  --slate: #0f172a;
  --card: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal), var(--cyan));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  box-shadow: 0 12px 24px rgba(251, 191, 36, 0.32);
}

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

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

.brand-text small {
  color: #ccfbf1;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fde68a;
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.top-search input,
.mobile-panel input,
.hero-search input,
.search-page-form input,
.card-filter {
  border: 1px solid rgba(255, 255, 255, 0.22);
  outline: 0;
}

.top-search input {
  width: 230px;
  height: 38px;
  padding: 0 16px;
  color: #ffffff;
  border-radius: 999px 0 0 999px;
  background: rgba(255, 255, 255, 0.16);
}

.top-search input::placeholder {
  color: #d1fae5;
}

.top-search button,
.hero-search button,
.mobile-panel button,
.search-page-form button {
  border: 0;
  height: 38px;
  padding: 0 16px;
  color: #0f172a;
  font-weight: 800;
  background: var(--amber);
  border-radius: 0 999px 999px 0;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  color: #ffffff;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mobile-panel.is-open {
  display: grid;
}

.mobile-panel a {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel form {
  grid-column: 1 / -1;
  display: flex;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px 0 0 14px;
}

.mobile-panel input::placeholder {
  color: #d1fae5;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  color: #ffffff;
  background: var(--slate);
  min-height: 720px;
  overflow: hidden;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 25%, rgba(20, 184, 166, 0.36), transparent 34%), linear-gradient(180deg, rgba(15, 23, 42, 0.14), #0f172a 97%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 72px;
  padding: 72px 0 120px;
}

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

.eyebrow,
.hero-kicker {
  margin: 0 0 12px;
  color: #fcd34d;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 680px;
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: 19px;
}

.hero-tags,
.detail-meta,
.channel-links,
.hero-cats,
.footer-links,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.34);
}

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

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
}

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

.hero-poster span,
.score,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.hero-poster span {
  right: 18px;
  top: 18px;
  width: 58px;
  height: 58px;
  color: #0f172a;
  background: #fbbf24;
  border-radius: 50%;
}

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

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

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

.hero-bottom {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 30px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 420px;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-search,
.search-page-form {
  display: flex;
  min-width: 0;
}

.hero-search input,
.search-page-form input {
  min-width: 0;
  flex: 1;
  height: 46px;
  padding: 0 18px;
  color: #0f172a;
  background: #ffffff;
  border-radius: 999px 0 0 999px;
}

.hero-cats a,
.channel-links a,
.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hero-mini-card {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.hero-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.hero-mini-card span {
  position: absolute;
  inset: auto 8px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.content-section,
.page-main,
.detail-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.soft-panel {
  width: min(1280px, calc(100% - 32px));
  margin-top: 72px;
  padding: 36px;
  border-radius: 36px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff 58%, #fff7ed);
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-more,
.text-link {
  color: #0f766e;
  background: #ccfbf1;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.score {
  right: 12px;
  top: 12px;
  min-width: 48px;
  height: 34px;
  padding: 0 10px;
  color: #0f172a;
  background: #fbbf24;
  border-radius: 999px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #f97316);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.28);
}

.movie-info {
  padding: 18px;
}

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

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

.meta-line,
.one-line,
.category-card p,
.page-hero p,
.detail-one-line,
.detail-content p,
.site-footer p {
  color: var(--muted);
}

.meta-line {
  margin: 8px 0 0;
  font-size: 13px;
}

.one-line {
  display: -webkit-box;
  margin: 12px 0 0;
  min-height: 48px;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: #0f766e;
  background: #ccfbf1;
  border-color: transparent;
  font-size: 12px;
}

.category-entry {
  margin-top: -1px;
}

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

.category-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  color: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  box-shadow: 0 16px 40px rgba(15, 118, 110, 0.18);
}

.category-tile::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  top: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  z-index: -1;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.82);
}

.tile-2,
.tile-7 {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.tile-3,
.tile-8 {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.tile-4,
.tile-9 {
  background: linear-gradient(135deg, #e11d48, #f97316);
}

.tile-5,
.tile-10 {
  background: linear-gradient(135deg, #334155, #0f766e);
}

.page-main {
  padding: 42px 0 80px;
}

.page-hero {
  position: relative;
  padding: 60px;
  color: #ffffff;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #115e59, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(38px, 6vw, 66px);
}

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

.channel-links {
  margin-top: 24px;
}

.category-list-section {
  padding-top: 42px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-card h2 {
  margin: 4px 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-row img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.filter-bar {
  display: flex;
  gap: 14px;
  margin: 28px 0 0;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.card-filter,
.year-filter {
  height: 48px;
  border-radius: 999px;
  background: #f8fafc;
}

.card-filter {
  flex: 1;
  padding: 0 18px;
  color: var(--text);
  border: 1px solid var(--line);
}

.year-filter {
  width: 180px;
  padding: 0 16px;
  border: 1px solid var(--line);
}

.listing-section {
  padding-top: 34px;
}

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

.detail-main {
  padding: 28px 0 80px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 36px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.95;
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  padding: 52px;
  align-items: center;
  color: #ffffff;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

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

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(36px, 6vw, 70px);
}

.detail-one-line {
  max-width: 880px;
  color: #e2e8f0;
  margin: 18px 0 0;
  font-size: 19px;
}

.detail-meta {
  margin-top: 24px;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
}

.watch-now {
  margin-top: 28px;
}

.player-section,
.detail-content {
  margin-top: 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.28), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 4;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0f172a;
  font-size: 34px;
  background: #fbbf24;
  box-shadow: 0 18px 50px rgba(251, 191, 36, 0.36);
}

.play-cover strong {
  font-size: 22px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.detail-content article {
  padding: 32px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 900;
}

.detail-content p {
  margin: 0;
  font-size: 16px;
}

.related-grid .compact .one-line {
  min-height: 42px;
}

.site-footer {
  margin-top: 88px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 460px;
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.08);
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1180px) {
  .main-nav {
    gap: 14px;
  }

  .top-search input {
    width: 170px;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
  }

  .hero-mini {
    display: none;
  }

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

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

@media (max-width: 860px) {
  .header-inner {
    gap: 16px;
  }

  .main-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 42px;
  }

  .hero-poster {
    width: min(260px, 74vw);
    transform: none;
  }

  .hero-dots {
    bottom: 210px;
  }

  .hero-bottom {
    bottom: 16px;
  }

  .hero-cats {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .hero-cats a {
    white-space: nowrap;
  }

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

  .movie-grid,
  .listing-grid,
  .category-grid,
  .category-list-grid,
  .detail-content {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .detail-poster {
    width: min(260px, 76vw);
  }

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

  .year-filter {
    width: 100%;
  }

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

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

@media (max-width: 560px) {
  .brand-text small {
    display: none;
  }

  .hero-carousel {
    min-height: 820px;
  }

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }

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

  .hero-search input,
  .hero-search button,
  .search-page-form input,
  .search-page-form button {
    width: 100%;
    border-radius: 999px;
  }

  .hero-dots {
    bottom: 250px;
  }

  .content-section,
  .page-main,
  .detail-main {
    width: min(100% - 24px, 1280px);
  }

  .soft-panel,
  .page-hero {
    padding: 24px;
    border-radius: 26px;
  }

  .movie-grid,
  .listing-grid,
  .category-grid,
  .category-list-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .player-shell {
    border-radius: 24px;
  }
}
