:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --blue: #2563eb;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  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: var(--text);
  background: radial-gradient(circle at top left, rgba(13, 148, 136, 0.10), transparent 32rem), var(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(13, 148, 136, 0.35);
}

.brand-text {
  font-size: 25px;
  line-height: 1;
  background: linear-gradient(90deg, var(--teal-dark), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  color: #334155;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-button:hover {
  color: var(--teal-dark);
  background: rgba(13, 148, 136, 0.10);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  display: grid;
  gap: 4px;
  min-width: 178px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.dropdown-panel a:hover {
  color: var(--teal-dark);
  background: #ecfeff;
}

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

.top-search input,
.mobile-search input,
.filter-input,
.search-large input {
  width: 250px;
  height: 42px;
  padding: 0 16px;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  outline: 0;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.search-large input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.16);
}

.top-search button,
.mobile-search button,
.search-large button,
.btn-primary,
.btn-light,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button,
.search-large button,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 25px rgba(13, 148, 136, 0.24);
}

.btn-light {
  color: #0f172a;
  background: #fff;
}

.btn-ghost {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.top-search button:hover,
.mobile-search button:hover,
.search-large button:hover,
.btn-primary:hover,
.btn-light:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

.mobile-nav-link {
  padding: 11px 14px;
  color: #334155;
  background: #f8fafc;
  border-radius: 14px;
  font-weight: 800;
}

.mobile-nav-link.is-active {
  color: var(--teal-dark);
  background: #ccfbf1;
}

main {
  min-height: 60vh;
}

.container,
.section,
.hero,
.page-hero,
.detail-wrap {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  margin-top: 28px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #0f766e 54%, #1d4ed8 100%);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 40% auto auto;
  width: 420px;
  height: 420px;
  background: rgba(45, 212, 191, 0.35);
  filter: blur(80px);
  border-radius: 999px;
}

.hero-slide {
  display: none;
  position: relative;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 42px;
  min-height: 570px;
  padding: 58px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeIn 0.55s ease both;
}

.hero-content {
  align-self: center;
  max-width: 720px;
}

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

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.045em;
}

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

.hero-summary {
  max-width: 710px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta span,
.detail-meta span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

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

.hero-media {
  position: relative;
  align-self: center;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 22px -16px -18px 36px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  transform: rotate(5deg);
}

.hero-media img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 30px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #5eead4;
}

.section {
  margin-top: 58px;
}

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

.section-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

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

.section-more {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 10px 16px;
  color: var(--teal-dark);
  background: #ccfbf1;
  border-radius: 999px;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

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

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  font-size: 24px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.poster-meta,
.poster-year {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-meta {
  top: 12px;
  left: 12px;
}

.poster-year {
  right: 12px;
  bottom: 12px;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body h3 a:hover {
  color: var(--teal-dark);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 13px;
  color: #64748b;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  color: var(--teal-dark);
  background: #ecfeff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.14);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #7c3aed, #0d9488);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #ea580c, #0891b2);
}

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -52px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
}

.rank-panel,
.search-panel,
.info-panel {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: border 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  border-color: #99f6e4;
  transform: translateX(4px);
}

.compact-card img {
  width: 78px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.compact-card strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border-radius: 12px;
  font-weight: 950;
}

.page-hero {
  margin-top: 28px;
  padding: 44px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #0f766e 58%, #2563eb);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 20px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.filter-input {
  width: min(100%, 420px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 16px;
  color: #64748b;
  font-weight: 800;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e293b 48%, #0f766e);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.15);
  transform: scale(1.05);
}

.detail-content {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  padding: 42px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.detail-title p {
  max-width: 820px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.player-section,
.detail-section {
  margin-top: 34px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.player-section h2,
.detail-section h2,
.rank-panel h2,
.search-panel h2,
.info-panel h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 950;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  color: #fff;
  border: 0;
  background: rgba(2, 6, 23, 0.45);
  cursor: pointer;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.1);
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, rgba(13, 148, 136, 0.16), rgba(2, 6, 23, 0.82));
}

.player-start {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  font-size: 38px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.text-block p {
  margin: 0 0 14px;
  color: #334155;
  font-size: 16px;
}

.search-large {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 24px;
}

.search-large input {
  flex: 1;
  width: auto;
  height: 52px;
  padding: 0 20px;
}

.search-large button {
  height: 52px;
  padding: 0 26px;
}

.no-results {
  padding: 34px;
  color: #64748b;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
}

.site-footer {
  margin-top: 70px;
  color: #e2e8f0;
  background: linear-gradient(135deg, #1e293b, #0f172a 56%, #134e4a);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 34px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0;
}

.footer-logo .brand-text {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p,
.footer-block p,
.footer-block a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-block {
  display: grid;
  align-content: start;
  gap: 8px;
}

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

.footer-block a:hover {
  color: #5eead4;
}

.footer-bottom {
  padding: 18px 24px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .hero-slide {
    padding: 42px;
  }

  .hero-media {
    max-width: 420px;
  }

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

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

@media (max-width: 760px) {
  .container,
  .section,
  .hero,
  .page-hero,
  .detail-wrap,
  .footer-inner {
    width: min(100% - 28px, 1240px);
  }

  .header-inner {
    padding: 0 14px;
  }

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

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

  .hero-slide,
  .page-hero,
  .detail-content {
    padding: 28px;
  }

  .hero-slide {
    min-height: auto;
  }

  .hero-dots {
    left: 28px;
    bottom: 20px;
  }

  .hero-media {
    display: none;
  }

  .section-header,
  .toolbar,
  .search-large {
    align-items: stretch;
    flex-direction: column;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .poster-link {
    aspect-ratio: 3 / 2;
  }

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

  .player-section,
  .detail-section,
  .rank-panel,
  .search-panel,
  .info-panel {
    padding: 18px;
    border-radius: 20px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: auto 64px minmax(0, 1fr);
  }

  .compact-card img {
    width: 64px;
    height: 46px;
  }
}
