:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --cyan: #06b6d4;
  --slate: #0f172a;
  --soft: #ecfdf5;
  --radius: 24px;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f0fdfa 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.18);
}

.header-search {
  display: flex;
  align-items: center;
  width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.header-search input,
.wide-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.header-search input {
  color: #ffffff;
  padding: 10px 0 10px 16px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.header-search button,
.wide-search button {
  border: 0;
  color: #ffffff;
  background: var(--emerald);
  font-weight: 700;
  padding: 10px 16px;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 8px;
  background: #ffffff;
}

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

.mobile-links,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-categories {
  margin-top: 10px;
}

.mobile-categories a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  height: min(78vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: var(--slate);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade,
.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1240px;
  color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.sub-hero span,
.section-heading span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #6ee7b7;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.hero-content h2 {
  margin: 18px 0 0;
  color: #d1fae5;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 850;
}

.hero-content p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 36px rgba(16, 185, 129, 0.28);
}

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

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

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

.hero-dot {
  width: 46px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
  background: var(--emerald);
}

.home-search-band,
.page-section,
.sub-hero,
.detail-hero-inner,
.site-footer .footer-inner,
.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 5;
  padding: 30px;
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-band h2,
.section-heading h2,
.sub-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.home-search-band p,
.section-heading p,
.sub-hero p,
.filter-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.wide-search {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.wide-search input {
  padding: 0 20px;
}

.page-section {
  padding: 74px 0;
}

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

.section-link {
  color: var(--emerald-dark);
  background: var(--soft);
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

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

.movie-card:hover .poster-wrap img,
.list-card:hover .list-thumb img {
  transform: scale(1.08);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 20%, rgba(15, 23, 42, 0.78) 100%);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.28);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-body strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #047857;
  font-size: 13px;
}

.tag-row span,
.tag-cloud span {
  background: #ecfdf5;
}

.soft-panel {
  width: min(1240px, calc(100% - 32px));
  padding: 46px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
  box-shadow: var(--shadow);
}

.dark-panel {
  width: min(1240px, calc(100% - 32px));
  padding: 46px;
  color: #ffffff;
  border-radius: 32px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: var(--shadow);
}

.dark-panel .section-heading h2,
.dark-panel .list-card strong {
  color: #ffffff;
}

.dark-panel .section-heading p,
.dark-panel .list-card span,
.dark-panel .list-card em {
  color: rgba(255, 255, 255, 0.68);
}

.category-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.category-preview {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

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

.category-preview-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}

.category-preview-head a {
  color: var(--emerald-dark);
  font-weight: 800;
}

.ranking-list,
.latest-list {
  display: grid;
  gap: 14px;
}

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

.list-card {
  display: grid;
  grid-template-columns: auto 118px 1fr;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.latest-list .list-card {
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.list-card:hover {
  transform: translateY(-3px);
  background: rgba(16, 185, 129, 0.15);
}

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

.list-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.list-content {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.list-content strong {
  color: var(--ink);
  font-size: 17px;
}

.list-content span,
.list-content em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.subpage {
  min-height: 70vh;
}

.sub-hero {
  padding: 76px 0 32px;
}

.sub-hero p {
  max-width: 760px;
  font-size: 17px;
}

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

.category-tile {
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 24px;
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.12);
}

.category-tile span {
  color: var(--emerald-dark);
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--ink);
  line-height: 1.7;
}

.category-tile em {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  font-style: normal;
}

.category-tile em a {
  color: #047857;
  font-size: 13px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #d1fae5;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 580px);
  gap: 22px;
  align-items: end;
  margin-bottom: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.filter-panel h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 900;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.empty-state {
  display: none;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 18px;
}

.empty-state.visible {
  display: block;
}

.full-width-panel {
  margin-top: 20px;
}

.detail-hero {
  position: relative;
  min-height: 720px;
  color: #ffffff;
  background: var(--poster) center / cover no-repeat, var(--slate);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 44px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.75);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 34px;
  align-items: center;
}

.player-card,
.detail-info,
.content-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.player-card {
  padding: 14px;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.player-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.55) 100%);
  transition: background 0.2s ease, opacity 0.2s ease;
}

.player-button span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.96);
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.4);
  font-size: 38px;
  transform: translateX(4px);
}

.player-box.is-playing .player-button {
  opacity: 0;
  pointer-events: none;
}

.player-state {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.player-box.is-playing .player-state {
  display: none;
}

.detail-info {
  padding: 34px;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.one-line {
  margin: 18px 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.15);
}

.small-actions {
  margin-top: 26px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-bottom: 20px;
}

.content-card {
  color: var(--ink);
  padding: 30px;
  border-color: var(--line);
  background: #ffffff;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.review-card {
  background: linear-gradient(135deg, #ecfdf5, #f0f9ff);
}

.site-footer {
  margin-top: 64px;
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 1.6fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-inner p {
  max-width: 520px;
  line-height: 1.8;
}

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

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(16, 185, 129, 0.22);
}

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

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

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

  .home-search-band,
  .filter-panel,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .featured-grid,
  .compact-grid,
  .home-ranking,
  .category-preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

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

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

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

  .home-search-band,
  .soft-panel,
  .dark-panel,
  .filter-panel,
  .category-preview,
  .content-card,
  .detail-info {
    padding: 22px;
    border-radius: 22px;
  }

  .wide-search,
  .filter-controls {
    grid-template-columns: 1fr;
  }

  .wide-search button {
    min-height: 48px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .home-ranking,
  .category-preview-list {
    grid-template-columns: 1fr;
  }

  .list-card {
    grid-template-columns: auto 96px 1fr;
  }

  .list-card:not(:has(.rank-number)) {
    grid-template-columns: 96px 1fr;
  }

  .list-card:not(:has(.rank-number)) .list-thumb {
    grid-column: 1;
  }

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

  .detail-hero-inner {
    padding-bottom: 42px;
  }

  .player-button span {
    width: 74px;
    height: 74px;
    font-size: 30px;
  }
}
