
:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --teal: #14b8a6;
  --cyan: #22d3ee;
  --shadow: 0 22px 60px rgba(20, 184, 166, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.14), transparent 30%), linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.content-section,
.detail-shell,
.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #042f2e;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.35);
  font-size: 14px;
}

.logo-text,
.footer-logo {
  font-size: 22px;
  background: linear-gradient(90deg, #2dd4bf, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #2dd4bf;
}

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 190px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(20, 184, 166, 0.16);
  color: #5eead4;
  font-weight: 700;
  cursor: pointer;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border);
  padding: 16px;
  background: rgba(2, 6, 23, 0.96);
}

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

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
}

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

.hero {
  position: relative;
  height: clamp(520px, 70vw, 720px);
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide,
.hero-mask {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, transform 1.2s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
  transform: scale(1);
}

.hero-mask {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.28) 100%), linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.2) 48%, rgba(2, 6, 23, 0.48) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: clamp(64px, 10vw, 110px);
  max-width: 1180px;
}

.eyebrow,
.eyebrow-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #5eead4;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.eyebrow span,
.eyebrow-text {
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(20, 184, 166, 0.13);
  border-radius: 999px;
  padding: 6px 12px;
}

.hero h1,
.hero h2 {
  max-width: 780px;
  margin: 16px 0 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 74px);
}

.hero h2 {
  font-size: clamp(28px, 5vw, 58px);
}

.hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-meta span,
.detail-meta span,
.tag-list span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--border);
  padding: 7px 12px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  padding: 13px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--teal), #0891b2);
  color: white;
  box-shadow: 0 20px 45px rgba(20, 184, 166, 0.22);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.64);
  color: #dbeafe;
}

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

.full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

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

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

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

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

.content-section.alt {
  position: relative;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head a {
  color: #5eead4;
  font-weight: 800;
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
}

.rail .movie-card {
  flex: 0 0 190px;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #020617;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.82) 100%);
  opacity: 0.9;
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #5eead4;
  font-weight: 800;
  font-size: 12px;
  padding: 5px 9px;
}

.poster-line {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-line {
  opacity: 1;
  transform: translateY(0);
}

.movie-info {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.movie-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fafc;
  font-size: 16px;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta span:last-child {
  color: #5eead4;
}

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

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.33);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 212, 191, 0.52);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.92));
}

.category-content {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
}

.category-content strong {
  font-size: 24px;
}

.category-content span {
  color: #cbd5e1;
  line-height: 1.6;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 212, 191, 0.52);
}

.rank-poster {
  display: block;
  width: 96px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
}

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

.rank-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-title {
  overflow: hidden;
  color: #f8fafc;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-desc {
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-tags {
  color: var(--subtle);
  font-size: 13px;
}

.rank-num {
  color: #5eead4;
  font-weight: 900;
}

.page-hero {
  padding: 78px 0 44px;
  background: radial-gradient(circle at 15% 15%, rgba(20, 184, 166, 0.16), transparent 34%), linear-gradient(180deg, #020617 0%, rgba(15, 23, 42, 0.72) 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero-inner h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero-inner p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 13px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 14px;
}

.empty-state {
  display: none;
  margin: 28px 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: #cbd5e1;
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.ranking-spots {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}

.ranking-spot {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ranking-spot:first-child {
  min-height: 280px;
}

.ranking-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.9));
}

.ranking-spot span,
.ranking-spot strong,
.ranking-spot em {
  position: relative;
  z-index: 1;
}

.ranking-spot span {
  color: #5eead4;
  font-weight: 900;
}

.ranking-spot strong {
  margin-top: 8px;
  font-size: 22px;
}

.ranking-spot em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.55;
}

.detail-shell {
  padding: 34px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #5eead4;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.watch-area,
.side-panel,
.detail-copy,
.side-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.25);
}

.watch-area {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0.44);
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.player-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0891b2);
  color: white;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(20, 184, 166, 0.3);
}

.player-cover:hover {
  background: rgba(0, 0, 0, 0.34);
}

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

.player-error {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  width: min(80%, 420px);
  transform: translate(-50%, -50%);
  border-radius: 16px;
  padding: 18px;
  background: rgba(127, 29, 29, 0.92);
  color: #fee2e2;
  text-align: center;
  font-weight: 700;
}

.player-error.is-visible {
  display: block;
}

.detail-copy {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 26px;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.detail-copy h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-copy p {
  color: #cbd5e1;
  line-height: 1.85;
}

.detail-copy .lead {
  color: #e2e8f0;
  font-size: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.detail-poster {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #020617;
}

.side-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.side-card strong {
  color: #f8fafc;
}

.side-card a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #cbd5e1;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.side-card span {
  color: #5eead4;
}

.site-footer {
  margin-top: 44px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0;
  color: #94a3b8;
}

.footer-inner p {
  max-width: 560px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #5eead4;
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

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

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

  .header-inner {
    height: 64px;
  }

  .hero {
    height: 620px;
  }

  .hero-arrow {
    display: none;
  }

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

  .rank-row {
    grid-template-columns: 76px 1fr;
  }

  .rank-num {
    grid-column: 1 / -1;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .footer-inner,
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .content-section,
  .detail-shell,
  .page-hero-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

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

  .hero h1 {
    font-size: 34px;
  }

  .hero h2 {
    font-size: 28px;
  }

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

  .category-grid,
  .category-grid.large,
  .ranking-spots {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info strong {
    font-size: 14px;
  }

  .detail-copy {
    padding: 20px;
  }
}
