* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container-custom {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.site-nav a {
  padding: 0.6rem 0.85rem;
  border-radius: 0.75rem;
  color: #475569;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #0f766e;
  background: #ccfbf1;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: min(28vw, 320px);
}

.header-search input,
.mobile-menu input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.8rem;
  background: #ffffff;
  color: #0f172a;
  padding: 0.72rem 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-menu input:focus,
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.header-search button,
.mobile-menu button,
.hero-search button {
  border: 0;
  border-radius: 0.8rem;
  padding: 0.72rem 1rem;
  background: #0d9488;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: #f1f5f9;
  border-radius: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.mobile-menu.open {
  display: grid;
  gap: 0.75rem;
}

.mobile-menu a {
  padding: 0.8rem 0.6rem;
  border-radius: 0.8rem;
  color: #334155;
  font-weight: 700;
}

.mobile-menu form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

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

.hero-track,
.hero-slide,
.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

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

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.62) 44%, rgba(15, 23, 42, 0.22) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.18) 55%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #5eead4;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.5rem, 6vw, 5.75rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 1.25rem 0 0;
  max-width: 680px;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.hero-tags,
.detail-meta,
.card-meta,
.tag-row,
.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-tags {
  margin-top: 1.25rem;
}

.hero-tags span,
.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 0.42rem 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-actions {
  margin-top: 1.7rem;
}

.btn-primary,
.btn-ghost,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border-radius: 0.85rem;
  padding: 0.7rem 1.35rem;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  color: #ffffff;
  background: #0d9488;
  box-shadow: 0 16px 30px rgba(13, 148, 136, 0.24);
}

.btn-primary:hover {
  background: #0f766e;
  transform: translateY(-2px);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover,
.btn-light:hover {
  transform: translateY(-2px);
}

.btn-light {
  color: #0f766e;
  background: #ccfbf1;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.35);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-control.prev {
  left: 1rem;
}

.hero-control.next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  z-index: 5;
  display: flex;
  gap: 0.45rem;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 0.7rem;
  height: 0.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 2.3rem;
  background: #5eead4;
}

.home-intro {
  padding: 3rem 0 1rem;
  background: #ffffff;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 1.5rem;
  align-items: stretch;
}

.home-intro h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.home-intro p {
  margin: 0;
  color: #64748b;
  max-width: 780px;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  max-width: 680px;
  margin-top: 1.4rem;
}

.quick-panel {
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.quick-panel h3 {
  margin: 0 0 0.8rem;
  color: #0f172a;
}

.quick-panel h3 + .quick-links {
  margin-bottom: 1rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.quick-links a {
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: #ffffff;
  color: #0f766e;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.quick-links.soft a {
  color: #475569;
  background: #f1f5f9;
}

.content-section {
  padding-top: 3.5rem;
  padding-bottom: 1rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
  color: #1e293b;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0.45rem 0 0;
  color: #64748b;
}

.section-more {
  flex: none;
  color: #0d9488;
  font-weight: 800;
}

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

.video-card {
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
}

.card-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-score,
.card-type {
  position: absolute;
  top: 0.75rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-score {
  left: 0.75rem;
  background: rgba(20, 184, 166, 0.88);
}

.card-type {
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.68);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
  color: #0f172a;
}

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1em;
  margin: 0.55rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.card-meta {
  margin-top: 0.8rem;
  color: #64748b;
  font-size: 0.85rem;
}

.card-meta span + span::before {
  content: "·";
  margin-right: 0.65rem;
  color: #94a3b8;
}

.tag-row {
  margin-top: 0.8rem;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  padding: 0.22rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.page-hero {
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.25), transparent 30%), linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
}

.page-hero.compact {
  padding: 4.5rem 0 4rem;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 1rem 0 0;
  color: #dbeafe;
}

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

.category-card {
  display: grid;
  gap: 0.45rem;
  min-height: 8rem;
  padding: 1.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: #5eead4;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
}

.category-card strong {
  font-size: 1.15rem;
  color: #0f172a;
}

.category-card span {
  color: #64748b;
}

.genre-grid .category-card {
  min-height: 6rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.35fr));
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.empty-state {
  display: none;
  margin: 2rem 0;
  padding: 2rem;
  border-radius: 1rem;
  background: #ffffff;
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

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

.rank-list {
  display: grid;
  gap: 0.8rem;
}

.rank-row {
  border-radius: 1rem;
  background: #ffffff;
}

.rank-row a {
  display: grid;
  grid-template-columns: 3.4rem 4.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 5.2rem;
  padding: 0.65rem 1rem;
}

.rank-num {
  color: #0d9488;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.8rem;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.rank-main {
  display: grid;
  gap: 0.2rem;
}

.rank-main strong {
  color: #0f172a;
  font-size: 1rem;
}

.rank-main em {
  color: #64748b;
  font-size: 0.9rem;
  font-style: normal;
}

.rank-score {
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  padding: 0.35rem 0.65rem;
  font-weight: 900;
}

.detail-hero {
  padding: 4rem 0;
  background: radial-gradient(circle at 78% 18%, rgba(20, 184, 166, 0.22), transparent 28%), linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, #0f172a, #0d9488);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #bae6fd;
  font-weight: 700;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.detail-lead {
  max-width: 860px;
  margin: 1.2rem 0 0;
  color: #e2e8f0;
  font-size: 1.12rem;
}

.detail-meta {
  margin-top: 1.2rem;
}

.detail-copy .tag-row {
  margin-top: 1rem;
}

.detail-actions {
  margin-top: 1.6rem;
}

.player-section {
  padding-top: 3rem;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.25);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.8rem;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  cursor: pointer;
}

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

.play-icon {
  display: inline-flex;
  width: 4.4rem;
  height: 4.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0d9488;
  box-shadow: 0 20px 40px rgba(13, 148, 136, 0.35);
  font-size: 1.7rem;
  padding-left: 0.2rem;
}

.detail-section {
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.detail-section h2 {
  margin: 0 0 0.8rem;
  font-size: 1.55rem;
  color: #0f172a;
}

.detail-section p {
  margin: 0;
  color: #475569;
}

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

.compact-card {
  border-radius: 1rem;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
}

.compact-card a {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 0.75rem;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.compact-title,
.compact-meta {
  padding: 0 0.75rem;
}

.compact-title {
  color: #0f172a;
  font-weight: 900;
  line-height: 1.35;
}

.compact-meta {
  color: #64748b;
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 4rem;
  padding: 3rem 0;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.footer-logo {
  color: #ffffff;
}

.footer-inner p {
  max-width: 560px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-start;
}

.footer-links a {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .header-search {
    display: none;
  }
}

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

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

  .hero-carousel {
    min-height: 600px;
    height: 78vh;
  }

  .hero-control {
    display: none;
  }

  .intro-grid,
  .detail-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row a {
    grid-template-columns: 2.6rem 3.8rem 1fr;
  }

  .rank-score {
    grid-column: 3;
    width: max-content;
  }

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

@media (max-width: 560px) {
  .container-custom {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 2.35rem;
  }

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

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

  .page-hero.compact,
  .detail-hero {
    padding: 3rem 0;
  }

  .detail-section {
    padding: 1.2rem;
  }
}
