:root {
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --teal: #14b8a6;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --soft: #f0fdfa;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 38%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(8, 145, 178, 0.16);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-link,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0e7490;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.28);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

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

.desktop-nav a,
.mobile-panel a {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--cyan-dark);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 310px;
}

.top-search input,
.mobile-panel input,
.filter-bar input,
.home-search-panel input {
  width: 100%;
  border: 1px solid rgba(6, 182, 212, 0.26);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus,
.home-search-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.top-search button,
.mobile-panel button,
.home-search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  font-weight: 750;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 16px;
  gap: 12px;
  flex-direction: column;
}

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

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 120px 22px 96px;
  color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.page-hero p {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #facc15;
  background: rgba(15, 23, 42, 0.42);
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  max-width: 760px;
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.9;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.secondary-button,
.light-button,
.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-button {
  padding: 13px 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.28);
}

.secondary-button {
  padding: 12px 21px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.secondary-button:hover,
.light-button:hover {
  transform: translateY(-2px);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

.home-search-panel,
.content-section,
.page-main,
.detail-main {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 22px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 8;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.home-search-panel h2 {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
}

.home-search-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.8;
}

.home-search-panel form {
  display: flex;
  gap: 10px;
}

.content-section {
  padding-top: 76px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.section-heading > span {
  width: 5px;
  height: 38px;
  margin-top: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--teal));
}

.section-heading h2 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.36);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #083344, #164e63);
}

.poster-wrap img,
.category-card img,
.rank-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img,
.category-card img,
.rank-poster img {
  transition: transform 0.48s ease;
}

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.rank-item:hover .rank-poster img {
  transform: scale(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.9);
  font-size: 13px;
  font-weight: 850;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--cyan-dark);
  font-size: 12px;
  font-weight: 850;
}

.card-body h2,
.rank-content h2 {
  margin-top: 10px;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body h2 a:hover,
.rank-content h2 a:hover {
  color: var(--cyan-dark);
}

.card-body p,
.rank-content p {
  display: -webkit-box;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.75;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.tag-row span {
  color: #0f766e;
  background: #ccfbf1;
}

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

.category-card {
  position: relative;
  display: flex;
  min-height: 150px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.2));
}

.category-card span,
.category-card small {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
}

.category-card span {
  bottom: 44px;
  font-size: 20px;
  font-weight: 900;
}

.category-card small {
  bottom: 18px;
  color: #dbeafe;
  line-height: 1.5;
}

.overview-grid .category-card,
.category-card.large {
  min-height: 210px;
}

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

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

.rank-panel {
  align-self: start;
  padding: 24px;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  margin-bottom: 18px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
}

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  align-items: stretch;
  padding: 14px;
}

.rank-panel .rank-item {
  grid-template-columns: 86px 1fr;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.rank-poster {
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #083344, #164e63);
}

.rank-content h2 {
  margin-top: 8px;
}

.rank-panel .rank-content h2,
.rank-panel .rank-content h2 a {
  color: #ffffff;
}

.rank-panel .rank-content p {
  color: #cbd5e1;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-size: 12px;
  font-weight: 900;
}

.text-link {
  margin-top: 12px;
  color: var(--cyan-dark);
}

.wide {
  width: 100%;
  margin-top: 18px;
}

.cyan-feature {
  max-width: 1240px;
  margin: 84px auto 0;
  padding: 44px 36px;
  border-radius: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.24);
}

.cyan-feature h2 {
  font-size: 38px;
  line-height: 1.18;
  font-weight: 900;
}

.cyan-feature p {
  max-width: 760px;
  margin-top: 16px;
  line-height: 1.9;
  color: #ecfeff;
}

.light-button {
  margin-top: 24px;
  padding: 12px 20px;
  color: var(--cyan-dark);
  background: #ffffff;
}

.page-main,
.detail-main {
  padding-top: 34px;
  padding-bottom: 78px;
}

.page-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
  padding: 48px;
  border-radius: 32px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.45), transparent 34%), linear-gradient(135deg, #0f172a, #164e63 56%, #0f766e);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 18px;
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero span {
  display: block;
  max-width: 720px;
  margin-top: 14px;
  color: #dbeafe;
  line-height: 1.85;
}

.filter-bar {
  margin-top: 28px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 42px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
  font-size: 16px;
}

.detail-main {
  max-width: 1180px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  padding: 28px;
  border: 1px solid rgba(6, 182, 212, 0.14);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  min-height: 460px;
  border-radius: 26px;
  background: linear-gradient(135deg, #083344, #164e63);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin-top: 18px;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin-top: 18px;
  color: #475569;
  font-size: 18px;
  line-height: 1.9;
}

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

.detail-meta span {
  color: #0f766e;
  background: #ccfbf1;
}

.detail-tags {
  margin: 18px 0 28px;
}

.player-section {
  margin-top: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.28), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

.play-layer span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
  clip-path: polygon(32% 24%, 32% 76%, 78% 50%);
}

.play-layer strong {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.9);
  font-size: 18px;
}

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

.detail-text {
  margin-top: 34px;
  padding: 32px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.detail-text h2 {
  margin-top: 24px;
  font-size: 26px;
  font-weight: 900;
}

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

.detail-text p {
  margin-top: 12px;
  color: #475569;
  line-height: 2;
  font-size: 17px;
}

.detail-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.detail-pager a {
  min-width: 0;
  padding: 14px 18px;
  border-radius: 18px;
  color: var(--cyan-dark);
  background: #ecfeff;
  font-weight: 800;
}

.site-footer {
  margin-top: 78px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p {
  max-width: 520px;
  margin-top: 16px;
  line-height: 1.85;
}

.footer-grid h2 {
  margin-bottom: 14px;
  color: #22d3ee;
  font-size: 18px;
  font-weight: 900;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin-top: 9px;
  color: #cbd5e1;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

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

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

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

  .split-layout {
    grid-template-columns: 1fr;
  }
}

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

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

  .nav-shell {
    gap: 12px;
  }

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

  .hero-content {
    padding-top: 92px;
  }

  .home-search-panel {
    grid-template-columns: 1fr;
    margin-top: 0;
    border-radius: 0;
  }

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

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

  .detail-poster {
    min-height: auto;
    aspect-ratio: 3 / 4;
  }

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 17px;
  }

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

  .hero-content h1 {
    font-size: 38px;
  }

  .home-search-panel form,
  .mobile-panel form {
    flex-direction: column;
  }

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

  .rank-item,
  .rank-panel .rank-item {
    grid-template-columns: 92px 1fr;
  }

  .page-hero,
  .detail-hero,
  .detail-text {
    padding: 24px;
    border-radius: 24px;
  }

  .detail-pager {
    flex-direction: column;
  }
}
