:root {
  --bg: #f9fafb;
  --bg-soft: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.1);
  --white: #ffffff;
  --emerald: #10b981;
  --teal: #14b8a6;
  --cyan: #0891b2;
  --rose: #f43f5e;
  --orange: #f97316;
  --amber: #f59e0b;
  --slate: #1f2937;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.1);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.96), rgba(8, 145, 178, 0.96));
  color: #ffffff;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-size: 20px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 10px 20px rgba(244, 63, 94, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  overflow: hidden;
}

.nav-links a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.mobile-panel a:hover {
  color: #fde68a;
  transform: translateY(-1px);
}

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

.header-search input,
.global-search input,
.local-search input,
.search-toolbar input,
.search-toolbar select {
  border: 0;
  border-radius: 999px;
  outline: none;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  min-width: 220px;
}

.header-search button,
.global-search button,
.local-search button,
.search-toolbar button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.25);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-panel {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.98), rgba(8, 145, 178, 0.98));
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track,
.hero-slide,
.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  background:
    radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.36), transparent 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.44) 56%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 88px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.28);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 12px;
  max-width: 760px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span,
.meta-line span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  font-size: 14px;
}

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

.primary-btn,
.ghost-btn,
.category-panel-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.32);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.category-panel-head a:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-flow {
  padding: 56px 0 72px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.section-heading a {
  color: var(--teal);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

.poster-wrap img {
  transition: transform 0.45s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.hot-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.hot-badge {
  top: 12px;
  left: 12px;
  background: var(--rose);
}

.year-badge {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.play-bubble {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body .meta-line span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

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

.tag-row span,
.detail-tags a {
  border-radius: 999px;
  padding: 5px 10px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.tinted-section,
.rank-panel,
.category-panel {
  border-radius: 30px;
  padding: 28px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  box-shadow: var(--shadow-soft);
}

.horizontal-list,
.rank-grid,
.rank-list {
  display: grid;
  gap: 14px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: auto 118px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.rank-no {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.rank-item img {
  height: 76px;
  border-radius: 14px;
  background: #111827;
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item span:last-child {
  color: #64748b;
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 24px;
  overflow: hidden;
  padding: 22px;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.12));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.page-wrap {
  min-height: 60vh;
}

.page-hero-small {
  color: #ffffff;
  padding: 76px 0 64px;
  background:
    radial-gradient(circle at 80% 18%, rgba(244, 63, 94, 0.34), transparent 28%),
    linear-gradient(135deg, #0f766e, #0891b2 45%, #1e293b);
}

.page-hero-small h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero-small p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a:hover {
  color: #fde68a;
}

.local-search,
.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

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

.search-toolbar select {
  min-width: 180px;
}

.category-panels {
  padding: 56px 0;
  display: grid;
  gap: 28px;
}

.category-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.category-panel-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

.category-panel-head a {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

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

.mini-card a {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.mini-card img {
  aspect-ratio: 3 / 4;
  background: #111827;
}

.mini-card strong,
.mini-card span {
  display: block;
  padding: 0 12px;
}

.mini-card strong {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.mini-card span {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.empty-result {
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

.detail-hero {
  position: relative;
  padding: 72px 0 56px;
  color: #ffffff;
  background: #0f172a;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--detail-cover);
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: 0.62;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(20, 184, 166, 0.35), transparent 28%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.54));
}

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

.detail-title-row {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 30px;
  align-items: end;
}

.detail-title-row > img {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  background: #111827;
}

.detail-title-row h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
}

.detail-title-row p {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.detail-tags a {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.13);
}

.watch-section {
  padding: 42px 0 20px;
}

.watch-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 45%, rgba(16, 185, 129, 0.24), transparent 26%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.16));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.94);
  font-size: 38px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 38px);
}

.player-cover small {
  color: rgba(255, 255, 255, 0.78);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 28px 0 20px;
}

.detail-copy,
.detail-side {
  border-radius: 28px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-copy h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-copy p {
  margin: 0 0 24px;
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-side dd {
  margin: 0;
  color: #1f2937;
}

.related-grid {
  margin-bottom: 42px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
  padding: 48px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 20px;
}

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.7;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

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

.is-filtered-out {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .brand {
    font-size: 18px;
  }

  .header-search {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .category-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-item a {
    grid-template-columns: auto 92px 1fr;
  }

  .rank-item img {
    height: 68px;
  }

  .detail-title-row,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-title-row > img {
    width: 200px;
  }

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

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

  .local-search input,
  .search-toolbar input,
  .search-toolbar select {
    width: 100%;
    min-width: 0;
  }
}
