:root {
  --rose: #f43f5e;
  --rose-dark: #e11d48;
  --pink: #db2777;
  --blue: #2563eb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-hover: 0 18px 48px rgba(17, 24, 39, 0.16);
  --radius: 18px;
}

* {
  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(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f9fafb 100%);
  line-height: 1.6;
}

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

img,
video {
  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(229, 231, 235, 0.9);
  box-shadow: 0 6px 28px rgba(17, 24, 39, 0.06);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.35);
  font-size: 15px;
}

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

.main-nav a {
  font-size: 15px;
  color: #374151;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: var(--rose);
}

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

.search-form input,
.mobile-search input,
.local-filter input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 15px;
  outline: none;
  min-width: 210px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.mobile-search input:focus,
.local-filter input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.search-form button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.filter-btn,
.play-main {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.search-form button,
.mobile-search button,
.primary-btn,
.play-main {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 12px 26px rgba(244, 63, 94, 0.28);
}

.search-form button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.play-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(244, 63, 94, 0.36);
}

.ghost-btn,
.filter-btn {
  color: #374151;
  background: #ffffff;
  border: 1px solid var(--line);
}

.ghost-btn:hover,
.filter-btn:hover,
.filter-btn.active {
  color: #ffffff;
  background: var(--rose);
  border-color: var(--rose);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  color: #374151;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
}

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

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.14) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 610px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: #ffffff;
  padding: 68px 0;
}

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

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 630px;
  margin: 0 0 28px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

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

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  font-size: 30px;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

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

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

.page-hero,
.category-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  padding: 64px 0;
}

.page-hero h1,
.category-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}

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

.main-content {
  padding: 56px 0;
}

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

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

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-more {
  color: var(--rose);
  font-weight: 700;
}

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

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

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.thumb {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #111827;
}

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

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

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--rose);
}

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

.meta {
  display: flex;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 10px;
}

.tag-row span {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 8px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 12px;
}

.horizontal-card .card-link {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.horizontal-thumb {
  height: 140px;
}

.large-thumb {
  height: 380px;
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.05));
}

.large-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #ffffff;
}

.large-copy span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.large-copy h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.large-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile {
  min-height: 170px;
  padding: 24px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #be123c);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.local-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 180px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.rank-thumb {
  height: 104px;
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-copy h2,
.rank-copy h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-copy p {
  margin: 0 0 10px;
  color: var(--muted);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-box.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
}

.play-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  padding: 14px 26px;
}

.detail-panel,
.side-panel,
.text-panel {
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-panel {
  margin-top: 24px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.detail-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
}

.detail-info span,
.side-info span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
}

.detail-panel h2,
.text-panel h2 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.detail-panel p,
.text-panel p {
  color: #374151;
}

.side-cover {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 18px;
}

.side-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-panel h3 {
  margin: 0 0 14px;
}

.side-info {
  display: grid;
  gap: 10px;
  color: #374151;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.hidden-card {
  display: none !important;
}

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

.site-footer {
  color: #d1d5db;
  background: #111827;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid p {
  color: #9ca3af;
}

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

.footer-grid a:hover {
  color: #fb7185;
}

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

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

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

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

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

  .player-layout {
    grid-template-columns: 1fr;
  }
}

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

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .movie-grid,
  .default-grid,
  .search-grid,
  .category-grid,
  .horizontal-grid,
  .large-grid,
  .category-list {
    grid-template-columns: 1fr;
  }

  .horizontal-card .card-link {
    grid-template-columns: 1fr;
  }

  .horizontal-thumb,
  .thumb {
    height: 230px;
  }

  .local-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .local-filter input {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 44px 96px 1fr;
    gap: 12px;
  }

  .rank-thumb {
    height: 82px;
  }

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