:root {
  --bg: #f5fdff;
  --panel: rgba(255, 255, 255, 0.86);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(14, 165, 233, 0.16);
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --teal: #14b8a6;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(8, 145, 178, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 42%, #eff6ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  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, rgba(236, 254, 255, 0.96), rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.96));
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.28);
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--cyan-dark), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--cyan), var(--teal));
  transition: transform 0.25s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.top-search,
.mobile-search,
.hero-search,
.search-page-form {
  display: flex;
  align-items: center;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.top-search input,
.mobile-search input,
.hero-search input,
.search-page-form input {
  min-width: 190px;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  background: transparent;
  color: var(--text);
}

.top-search button,
.mobile-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  color: #ffffff;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--cyan-dark);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

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

.mobile-nav-link {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font-weight: 800;
}

.mobile-nav-link.active {
  color: var(--cyan-dark);
}

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 26px auto 0;
}

.hero-stage {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-radius: 36px;
  background: linear-gradient(135deg, #0f172a, #155e75);
  box-shadow: var(--shadow);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #164e63, #0f766e);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(26px, 6vw, 76px);
  top: 50%;
  width: min(640px, calc(100% - 52px));
  transform: translateY(-50%);
  color: #ffffff;
}

.hero-label,
.detail-label,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #0e7490;
  font-size: 0.88rem;
  font-weight: 900;
  background: rgba(207, 250, 254, 0.9);
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #075985;
  font-size: 0.84rem;
  font-weight: 800;
  background: rgba(224, 242, 254, 0.9);
}

.hero-actions,
.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.25);
}

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

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

.hero-dots {
  position: absolute;
  left: clamp(26px, 6vw, 76px);
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

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

.hero-side {
  display: grid;
  gap: 24px;
}

.glass-panel,
.side-panel,
.story-panel,
.category-tile,
.movie-card,
.filter-panel,
.rank-sidebar {
  border: 1px solid rgba(14, 165, 233, 0.12);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.side-panel {
  border-radius: 28px;
  padding: 24px;
}

.side-panel h2,
.rank-sidebar h2,
.story-panel h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.side-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #0e7490;
  font-weight: 800;
  background: rgba(207, 250, 254, 0.78);
}

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

.compact-link {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-link:hover {
  transform: translateX(4px);
  background: rgba(236, 254, 255, 0.96);
}

.compact-link span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.compact-link img {
  grid-row: 1 / 3;
  width: 54px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #c7f9ff, #dbeafe);
}

.compact-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-link em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.text-link {
  min-height: 42px;
  color: var(--cyan-dark);
  background: #e0f7fb;
}

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

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

.category-tile {
  border-radius: var(--radius);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(8, 145, 178, 0.2);
}

.category-tile a {
  display: block;
  min-height: 226px;
  padding: 22px;
}

.category-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.category-tile h3 {
  margin: 18px 0 10px;
  font-size: 1.35rem;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.category-sample {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-sample a {
  min-height: auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0e7490;
  font-size: 0.82rem;
  font-weight: 800;
  background: #ecfeff;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 58px rgba(8, 145, 178, 0.2);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.92);
  backdrop-filter: blur(8px);
}

.poster-type {
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  margin-top: 12px;
}

.card-tags span {
  padding: 4px 8px;
  font-size: 0.76rem;
  background: #f0fdfa;
}

.page-hero,
.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 26px auto 0;
  border-radius: 36px;
  padding: clamp(32px, 6vw, 72px);
  color: #ffffff;
  background: radial-gradient(circle at 18% 12%, rgba(103, 232, 249, 0.36), transparent 30%), linear-gradient(135deg, #0f172a, #155e75 52%, #0f766e);
  box-shadow: var(--shadow);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.category-hero,
.search-hero {
  background: radial-gradient(circle at 88% 18%, rgba(45, 212, 191, 0.3), transparent 28%), linear-gradient(135deg, #164e63, #1e3a8a);
}

.rank-hero {
  background: radial-gradient(circle at 84% 14%, rgba(250, 204, 21, 0.22), transparent 30%), linear-gradient(135deg, #0f172a, #7c2d12);
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 24px;
}

.filter-search {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
}

.filter-search span {
  color: var(--cyan-dark);
  font-weight: 900;
}

.filter-search input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(8, 145, 178, 0.16);
  border-radius: 16px;
  outline: 0;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-reset {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.rank-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-sidebar,
.story-panel {
  border-radius: 28px;
  padding: 24px;
}

.breadcrumb {
  width: min(1280px, calc(100% - 32px));
  margin: 22px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

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

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

.detail-poster img {
  width: 260px;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  object-fit: cover;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.28);
}

.detail-info h1 {
  margin: 16px 0 16px;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dffcff;
  background: rgba(255, 255, 255, 0.12);
}

.watch-section {
  scroll-margin-top: 92px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.28);
  cursor: pointer;
}

.player-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
}

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #0e7490;
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.play-overlay strong {
  font-size: 1.15rem;
}

.player-frame.is-playing .play-overlay {
  display: none;
}

.story-panel p {
  color: #334155;
  font-size: 1.05rem;
}

.search-page-form {
  width: min(720px, 100%);
  margin-top: 28px;
}

.search-page-form input {
  flex: 1;
  min-width: 0;
  color: #0f172a;
}

.site-footer {
  margin-top: 80px;
  padding: 38px 0;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.76);
}

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

.footer-brand {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
}

.footer-inner p {
  max-width: 640px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #67e8f9;
  font-weight: 800;
}

[data-card].hidden {
  display: none;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-stage {
    min-height: 560px;
  }

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

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

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

  .row-heading,
  .filter-panel,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .detail-poster img {
    width: min(240px, 75vw);
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 20px, 1280px);
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero,
  .section,
  .page-hero,
  .detail-hero,
  .breadcrumb {
    width: min(100% - 20px, 1280px);
  }

  .hero-content {
    left: 22px;
    width: calc(100% - 44px);
  }

  .hero-actions,
  .compact-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .text-link {
    width: 100%;
  }

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

  .page-hero,
  .detail-hero {
    border-radius: 28px;
  }
}
