:root {
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --teal: #0d9488;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --gray: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 20px 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: #1f2937;
  background: linear-gradient(180deg, #ecfeff 0%, #eff6ff 36%, #f8fafc 100%);
  line-height: 1.65;
}

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: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.28);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-name {
  font-size: 21px;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #cffafe;
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select {
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 11px 16px;
  min-width: 245px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.player-overlay {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
  color: var(--cyan-dark);
  background: #fff;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

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

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.28), transparent 30%), linear-gradient(120deg, var(--cyan), var(--blue) 52%, var(--teal));
}

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

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

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

.hero-slide-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 42px;
  padding: 64px 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  font-size: clamp(32px, 4.5vw, 56px);
}

.hero-desc,
.page-hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e0f2fe;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-tags a,
.filter-chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 8px 14px;
  color: #fff;
  font-weight: 700;
}

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

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  color: var(--cyan-dark);
  background: #fff;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-media {
  position: relative;
  min-height: 440px;
}

.hero-poster {
  position: absolute;
  inset: 0 34px 0 0;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.2);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

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

.hero-card-float {
  position: absolute;
  right: 0;
  bottom: 22px;
  width: min(320px, 86%);
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.28);
}

.hero-card-float strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.hero-card-float p {
  margin: 0;
  color: #dbeafe;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

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

main {
  min-height: 60vh;
}

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

.home-main {
  padding: 46px 0 70px;
}

.content-section {
  margin-bottom: 58px;
}

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

.section-head h2,
.category-title h2,
.detail-panel h2,
.search-panel h1 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.15;
}

.section-head p,
.category-title p,
.search-panel p {
  margin: 0;
  color: var(--gray);
}

.section-link {
  display: inline-flex;
  align-items: center;
  color: var(--cyan-dark);
  font-weight: 900;
}

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

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

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

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

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

.pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.pill-type {
  top: 10px;
  left: 10px;
  background: var(--cyan);
}

.pill-year {
  top: 10px;
  right: 10px;
  background: var(--blue);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 7px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-info p {
  min-height: 46px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
}

.category-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 58px;
}

.category-tile {
  overflow: hidden;
  position: relative;
  min-height: 148px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.18);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #0f766e, #06b6d4);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.22), transparent 34%), linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
}

.page-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

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

.category-title {
  margin-bottom: 22px;
}

.search-panel {
  margin-bottom: 34px;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 14px;
  margin-top: 22px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-width: 0;
  color: #0f172a;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.filter-summary {
  margin: 14px 0 0;
  color: #64748b;
  font-weight: 700;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ranking-index {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 20px;
  font-weight: 900;
}

.ranking-row img {
  width: 112px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  background: #e0f2fe;
}

.ranking-row h2 {
  margin: 0 0 5px;
  color: #0f172a;
  font-size: 20px;
}

.ranking-row p {
  margin: 0;
  color: #64748b;
}

.ranking-row .primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.sidebar-panel,
.detail-panel,
.watch-panel {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sidebar-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.sidebar-panel h2 {
  margin: 0 0 16px;
  color: #0f172a;
}

.side-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  position: relative;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.side-card img {
  width: 96px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #e0f2fe;
}

.side-card span {
  position: absolute;
  left: 8px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  font-size: 12px;
}

.side-card h3 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.detail-main {
  padding: 36px 0 70px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-weight: 700;
}

.breadcrumbs a {
  color: var(--cyan-dark);
}

.watch-panel {
  overflow: hidden;
  margin-bottom: 24px;
  background: #020617;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68));
  border-radius: 0;
}

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

.player-overlay .play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  font-size: 32px;
}

.detail-panel {
  padding: 28px;
  margin-bottom: 24px;
}

.detail-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: #e0f2fe;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

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

.detail-title h1 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #0369a1;
  background: #e0f2fe;
  font-weight: 800;
  font-size: 13px;
}

.detail-title p {
  margin: 0;
  color: #475569;
  font-size: 18px;
}

.detail-panel h2 {
  margin-top: 28px;
  font-size: 26px;
}

.detail-panel h2:first-child {
  margin-top: 0;
}

.detail-panel p {
  color: #475569;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-tags a {
  color: var(--cyan-dark);
  background: #ecfeff;
}

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

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

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-grid p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #cbd5e1;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.footer-grid a:hover {
  color: #67e8f9;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .sidebar-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-slide-inner {
    grid-template-columns: 1fr;
    padding: 42px 0 76px;
  }

  .hero-media {
    min-height: 380px;
  }

  .hero-poster {
    inset: 0;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .brand-name {
    font-size: 18px;
  }

  .hero-track,
  .hero-slide-inner {
    min-height: 620px;
  }

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

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

  .ranking-row {
    grid-template-columns: 48px 86px minmax(0, 1fr);
  }

  .ranking-row .primary-btn {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .ranking-row img {
    width: 86px;
    height: 64px;
  }

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