:root {
  --accent: #00A3AF;
  --accent-dark: #008C97;
  --accent-light: #E6F7F8;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --bg: #f6f8fb;
  --card: #ffffff;
  --shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.20);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #33B8C2);
  box-shadow: 0 10px 22px rgba(0, 163, 175, 0.28);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent-dark);
  background: var(--accent-light);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-light);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--accent-dark);
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-slide > img,
.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  max-width: 1180px;
}

.hero-kicker,
.page-hero span,
.category-overview-body span {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 163, 175, 0.28);
}

.hero h1,
.detail-intro h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.hero p,
.detail-intro p {
  max-width: 720px;
  margin: 0 0 28px;
  font-size: clamp(17px, 2vw, 24px);
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #33B8C2);
  box-shadow: 0 16px 32px rgba(0, 163, 175, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.outline-btn:hover,
.movie-card:hover {
  transform: translateY(-4px);
}

.primary-btn.small {
  min-height: 42px;
  padding: 0 20px;
}

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

.outline-btn {
  color: var(--accent-dark);
  border: 1px solid rgba(0, 163, 175, 0.28);
  background: #fff;
}

.outline-btn.full {
  width: 100%;
  margin-top: 16px;
}

.hero-meta,
.movie-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.hero-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-category-strip {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.hero-strip-inner {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-strip-inner a {
  padding: 9px 15px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.home-layout,
.page-layout,
.category-overview,
.detail-layout {
  padding: 54px 0;
}

.content-section {
  margin-bottom: 62px;
}

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

.section-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #33B8C2);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 163, 175, 0.22);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.03em;
}

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

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow-strong);
}

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

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.movie-thumb img,
.movie-poster img,
.category-card img,
.category-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-card:hover img,
.category-overview-card:hover img {
  transform: scale(1.05);
}

.movie-duration,
.movie-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.movie-duration {
  right: 10px;
  bottom: 10px;
  background: rgba(2, 6, 23, 0.72);
}

.movie-category {
  left: 10px;
  top: 10px;
  background: var(--accent);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(0, 163, 175, 0.32);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.movie-card:hover .movie-info h3 {
  color: var(--accent-dark);
}

.movie-info p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  gap: 8px 12px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta.light {
  color: rgba(255, 255, 255, 0.88);
}

.movie-card-list .movie-card-link {
  display: flex;
}

.movie-thumb-list {
  width: 270px;
  aspect-ratio: 16 / 10;
  flex: 0 0 270px;
}

.movie-info-list {
  flex: 1;
  padding: 24px;
}

.movie-info-list h3 {
  font-size: 22px;
}

.tag-row,
.detail-tags,
.mini-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-row span,
.detail-tags a,
.mini-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
}

.movie-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-gradient {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.86));
}

.poster-gradient h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.score-section {
  padding: 30px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--accent-light), #ffffff);
  box-shadow: var(--shadow);
}

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

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

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: saturate(1.05);
}

.category-card::after,
.category-overview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.78));
}

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

.category-card span {
  width: max-content;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 800;
}

.category-card strong {
  display: block;
  margin-top: 12px;
  font-size: 22px;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.center-actions {
  justify-content: center;
  margin-top: 28px;
}

.browse-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #475569;
  background: #e5e7eb;
  font-weight: 800;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #33B8C2);
}

.empty-state {
  display: none;
  padding: 20px;
  margin-bottom: 18px;
  border-radius: 16px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #33B8C2);
}

.simple-hero::after,
.category-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 30px 30px;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

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

.category-overview {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-cover {
  position: relative;
  z-index: 2;
  overflow: hidden;
  min-height: 240px;
}

.category-overview-card::before {
  display: none;
}

.category-overview-body {
  padding: 30px;
}

.category-overview-body h2 {
  margin: 16px 0 10px;
  font-size: 30px;
}

.category-overview-body p {
  margin: 0 0 16px;
  color: var(--muted);
}

.mini-links {
  margin-bottom: 18px;
}

.detail-hero {
  position: relative;
  height: auto;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.38));
}

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

.detail-hero-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  color: #fff;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  box-shadow: var(--shadow-strong);
}

.detail-layout {
  padding-top: 42px;
}

.player-panel {
  margin-bottom: 36px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.35);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 44px rgba(0, 163, 175, 0.35);
  font-size: 34px;
}

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

.detail-main-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 24px;
  margin-bottom: 48px;
}

.detail-article,
.detail-side {
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.detail-article p {
  margin: 0 0 24px;
  color: #475569;
  font-size: 17px;
}

.info-table {
  display: grid;
  gap: 0;
}

.info-table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-table span {
  color: var(--muted);
}

.info-table strong {
  color: var(--accent-dark);
  text-align: right;
}

.site-footer {
  margin-top: 32px;
  padding: 38px 0 20px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 520px;
  margin: 10px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

.from-red {
  --card-accent: #ef4444;
}

.from-teal {
  --card-accent: #00A3AF;
}

.from-blue {
  --card-accent: #3b82f6;
}

.from-orange {
  --card-accent: #f97316;
}

.from-purple {
  --card-accent: #8b5cf6;
}

.from-indigo {
  --card-accent: #6366f1;
}

.from-pink {
  --card-accent: #ec4899;
}

.from-green {
  --card-accent: #22c55e;
}

.from-yellow {
  --card-accent: #f59e0b;
}

.from-slate {
  --card-accent: #475569;
}

.category-hero,
.simple-hero {
  background: linear-gradient(135deg, var(--card-accent, var(--accent)), #33B8C2);
}

.category-overview-card .category-overview-body span {
  background: var(--card-accent, var(--accent));
}

@media (max-width: 1180px) {
  .grid-6,
  .grid-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .mobile-toggle {
    display: block;
  }

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

  .hero {
    min-height: 580px;
  }

  .hero-arrow {
    display: none;
  }

  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .movie-card-list .movie-card-link,
  .category-overview-card,
  .detail-hero-content,
  .detail-main-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .movie-thumb-list {
    width: 100%;
    flex-basis: auto;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}

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

  .header-inner {
    height: 64px;
  }

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

  .hero {
    height: 76vh;
    min-height: 560px;
  }

  .hero h1,
  .detail-intro h1 {
    font-size: 38px;
  }

  .hero p,
  .detail-intro p {
    font-size: 17px;
  }

  .hero-dots {
    bottom: 104px;
  }

  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .score-section,
  .player-panel,
  .detail-article,
  .detail-side {
    padding: 20px;
  }

  .page-hero {
    padding: 66px 0;
  }

  .category-card {
    min-height: 210px;
  }

  .movie-info-list {
    padding: 18px;
  }

  .player-cover span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
