:root {
  --sky: #0ea5e9;
  --blue: #2563eb;
  --rose: #f43f5e;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5edf7;
  --card: #ffffff;
  --soft: #f0f9ff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fcff 0%, #ffffff 36%, #f0f9ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: white;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 16px 30px rgba(14, 165, 233, 0.28);
}

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

.brand-text strong {
  font-size: 24px;
  background: linear-gradient(90deg, var(--sky), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  color: #334155;
  border-radius: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--sky);
  background: #e0f2fe;
}

.top-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.top-search input,
.mobile-search input,
.large-search input,
.movie-search-input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.top-search input {
  width: 210px;
  padding: 11px 16px;
}

.top-search button,
.mobile-search button,
.large-search button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  padding: 11px 18px;
  font-weight: 700;
}

.category-strip {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 12px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.category-strip a {
  flex: 0 0 auto;
  padding: 7px 12px;
  color: #0369a1;
  border-radius: 999px;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  background: #e0f2fe;
  color: var(--sky);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px 22px 20px;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #e0f2fe;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(110deg, rgba(240, 249, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 45%, rgba(14, 165, 233, 0.24) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 14% 20%, rgba(14, 165, 233, 0.22), transparent 34%), radial-gradient(circle at 88% 82%, rgba(37, 99, 235, 0.24), transparent 30%);
}

.hero-content {
  position: relative;
  max-width: 1240px;
  min-height: 620px;
  margin: 0 auto;
  padding: 72px 22px 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  gap: 48px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #0369a1;
  background: rgba(224, 242, 254, 0.88);
  border: 1px solid rgba(125, 211, 252, 0.8);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.hero-copy p,
.page-hero p,
.detail-line {
  max-width: 720px;
  color: #475569;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.65);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.detail-copy .primary-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.secondary-btn,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  padding: 14px 22px;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.25);
}

.secondary-btn {
  color: #0369a1;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(125, 211, 252, 0.8);
  padding: 13px 21px;
}

.primary-btn:hover,
.secondary-btn:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover,
.ranking-row:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(15, 23, 42, 0.24);
  border: 8px solid rgba(255, 255, 255, 0.86);
  transform: rotate(2deg);
}

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

.hero-poster span,
.detail-poster span,
.poster-play {
  position: absolute;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(14, 165, 233, 0.88);
  box-shadow: 0 16px 32px rgba(14, 165, 233, 0.34);
}

.hero-poster span {
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 38px;
  height: 38px;
  color: var(--sky);
  background: #e0f2fe;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: #bae6fd;
}

.hero-dot.active {
  width: 30px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
}

.quick-search-section {
  max-width: 940px;
  margin: -32px auto 0;
  padding: 0 22px;
  position: relative;
  z-index: 4;
}

.large-search {
  padding: 8px;
  border-radius: 30px;
}

.large-search input {
  flex: 1;
  min-width: 0;
  padding: 15px 20px;
  font-size: 17px;
}

.large-search button {
  border-radius: 999px;
  padding: 15px 26px;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 22px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  color: #0f172a;
  letter-spacing: -0.02em;
}

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

.section-more,
.text-link {
  color: #0369a1;
  background: #e0f2fe;
  padding: 10px 15px;
}

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

.category-card,
.category-overview-card,
.movie-card,
.ranking-panel,
.watch-card,
.story-card,
.side-card,
.ranking-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
  min-height: 156px;
  padding: 24px;
  background: linear-gradient(135deg, white, #f0f9ff);
}

.category-card strong {
  display: block;
  color: #0f172a;
  font-size: 22px;
  margin-bottom: 12px;
}

.category-card span {
  color: var(--muted);
  line-height: 1.7;
}

.two-column-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  align-items: start;
}

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

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

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

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

.movie-card {
  overflow: hidden;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #dbeafe;
}

.poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.card-body {
  padding: 16px;
}

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

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 9px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.meta-row span {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 5px 9px;
}

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

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

.ranking-panel {
  position: sticky;
  top: 110px;
  padding: 24px;
}

.ranking-panel h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 40px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
}

.rank-number,
.ranking-index {
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  border-radius: 14px;
  text-align: center;
  font-weight: 900;
}

.rank-number {
  padding: 9px 0;
}

.rank-item img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.rank-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  margin-top: 48px;
  background: linear-gradient(180deg, white, #e0f2fe);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.1fr 1.6fr;
  gap: 36px;
}

.footer-brand {
  color: var(--sky);
  font-size: 26px;
}

.footer-inner p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 700;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #ffffff 55%, #dbeafe);
}

.page-hero {
  padding: 74px 22px 64px;
}

.page-hero > div,
.category-hero,
.detail-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.small-hero h1,
.category-hero h1 {
  margin: 0 0 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #0369a1;
  font-weight: 700;
}

.breadcrumb strong {
  color: #0f172a;
}

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

.category-overview-card {
  overflow: hidden;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  background: #e0f2fe;
}

.category-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.category-overview-card div {
  padding: 20px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  color: #0f172a;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.listing-tools {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.movie-search-input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

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

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 14px;
  color: #0369a1;
  background: white;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--sky), var(--blue));
}

.empty-state {
  margin: 28px 0 0;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #bae6fd;
  border-radius: 20px;
  background: #f0f9ff;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.ranking-index {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-size: 22px;
}

.ranking-thumb img {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  background-image: linear-gradient(90deg, rgba(240, 249, 255, 0.98), rgba(255, 255, 255, 0.95) 44%, rgba(14, 165, 233, 0.3)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.22), transparent 34%);
}

.detail-inner {
  position: relative;
  padding: 56px 22px 70px;
}

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

.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  border: 8px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 34px 82px rgba(15, 23, 42, 0.22);
}

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

.detail-poster span {
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.detail-copy h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.watch-card,
.story-card,
.side-card {
  padding: 24px;
}

.watch-card h2,
.story-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: #0f172a;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.56));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 24px 48px rgba(14, 165, 233, 0.35);
  font-size: 30px;
}

.watch-player.playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.story-card p {
  color: #334155;
  line-height: 1.95;
  font-size: 17px;
}

.side-card dl {
  display: grid;
  gap: 13px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
  font-size: 13px;
}

.side-card dd {
  margin: -8px 0 0;
  color: #0f172a;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .top-search {
    display: none;
  }

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

  .two-column-showcase,
  .detail-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .desktop-nav,
  .category-strip {
    display: none;
  }

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

  .header-inner {
    min-height: 66px;
  }

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

  .hero-content,
  .detail-layout,
  .footer-inner,
  .listing-tools {
    grid-template-columns: 1fr;
  }

  .hero-slider,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 46px 22px 94px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .home-grid,
  .category-movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-copy p {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-hero,
  .detail-inner,
  .quick-search-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-text em {
    display: none;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

  .large-search,
  .mobile-search {
    border-radius: 22px;
  }

  .large-search button,
  .mobile-search button {
    padding-left: 14px;
    padding-right: 14px;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .home-grid,
  .category-movie-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

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

  .card-body p,
  .tag-row {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .detail-section,
  .related-section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .watch-card,
  .story-card,
  .side-card {
    padding: 16px;
    border-radius: 18px;
  }
}
