:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.82);
  --card: #111827;
  --line: #1e293b;
  --line-light: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --teal: #14b8a6;
  --teal-light: #2dd4bf;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --red: #ef4444;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 30rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line-light);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.34);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  color: var(--muted-2);
  font-weight: 650;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
}

.nav-link.active {
  color: var(--teal-light);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: white;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.07);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.84) 35%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.78), transparent 66%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 70px;
}

.hero-copy {
  max-width: 720px;
  animation: fade-up 0.62s ease both;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--teal-light);
  font-weight: 800;
}

.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal-light);
  box-shadow: 0 0 24px var(--teal-light);
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.7;
}

.hero-meta,
.meta-row,
.detail-meta,
.breadcrumb,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span,
.tag-row span,
.type-badge,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.hero-meta span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span,
.tag-row span {
  padding: 8px 12px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.btn-primary {
  color: white;
  background: var(--teal);
}

.btn-primary:hover {
  background: #0d9488;
}

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

main {
  min-height: 60vh;
}

.page-shell,
.home-sections {
  padding: 58px 0 76px;
}

.home-sections {
  display: grid;
  gap: 72px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p,
.page-title p,
.detail-title p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: var(--teal-light);
  font-weight: 800;
}

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

.movie-card,
.category-card,
.rank-card,
.info-panel,
.player-panel,
.search-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(20, 184, 166, 0.44);
  box-shadow: 0 26px 50px rgba(20, 184, 166, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(20, 184, 166, 0.24), transparent 54%),
    #111827;
}

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

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

.play-dot {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  background: rgba(20, 184, 166, 0.88);
}

.type-badge,
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 7px 10px;
  color: white;
  background: rgba(15, 23, 42, 0.9);
}

.badge-rank {
  right: auto;
  left: 10px;
  background: rgba(20, 184, 166, 0.9);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0;
  overflow: hidden;
  color: white;
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-info h3 a:hover {
  color: var(--teal-light);
}

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

.meta-row {
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.meta-row span:last-child {
  color: var(--yellow);
}

.tag-row {
  margin-top: 12px;
  gap: 6px;
}

.tag-row span {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--teal-light);
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.18);
}

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

.category-card {
  position: relative;
  padding: 24px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(34, 211, 238, 0.06)),
    rgba(15, 23, 42, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.48);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.7;
}

.category-card span {
  margin-top: 20px;
  color: var(--teal-light);
  font-weight: 800;
}

.page-title {
  margin-bottom: 30px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(34, 211, 238, 0.04)),
    rgba(15, 23, 42, 0.72);
}

.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.page-chip {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-chip.active,
.page-chip:hover {
  color: white;
  background: rgba(20, 184, 166, 0.9);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 82px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  font-size: 30px;
  font-weight: 900;
  color: var(--teal-light);
  text-align: center;
}

.rank-card img {
  width: 96px;
  height: 132px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.rank-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-score {
  color: var(--yellow);
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  padding: 42px 0 30px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.14), transparent 36rem),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0));
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow);
  background: #111827;
}

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

.breadcrumb {
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: var(--teal-light);
}

.detail-title h1 {
  font-size: clamp(36px, 6vw, 58px);
  letter-spacing: -0.04em;
}

.detail-title p {
  max-width: 850px;
  font-size: 17px;
}

.detail-meta {
  margin: 20px 0 22px;
}

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

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 28px;
  padding-bottom: 76px;
}

.player-panel,
.info-panel {
  padding: 24px;
}

.player-panel {
  grid-column: 1 / -1;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: black;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.28), rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 28px;
  background: rgba(20, 184, 166, 0.92);
  box-shadow: 0 0 40px rgba(20, 184, 166, 0.5);
}

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

.info-panel p {
  margin: 0 0 18px;
  color: var(--muted-2);
  line-height: 1.9;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.18s ease;
}

.side-item:hover {
  background: rgba(20, 184, 166, 0.12);
}

.side-item img {
  width: 74px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.side-item strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-item small {
  color: var(--muted);
}

.search-panel {
  padding: 24px;
  margin-bottom: 28px;
}

.search-bar input,
.search-bar select {
  min-height: 48px;
  border: 1px solid var(--line-light);
  border-radius: 14px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.search-bar input {
  flex: 1 1 280px;
  padding: 0 16px;
}

.search-bar select {
  padding: 0 14px;
}

.search-empty {
  display: none;
  padding: 32px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-light);
  border-radius: 18px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 40px;
  padding: 48px 0;
}

.footer-brand {
  margin-bottom: 18px;
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted-2);
}

.footer-links a:hover {
  color: var(--teal-light);
}

.footer-bottom {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-controls {
    right: 16px;
    bottom: 18px;
  }

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

  .category-grid,
  .footer-grid,
  .detail-layout,
  .detail-main {
    grid-template-columns: 1fr;
  }

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

  .rank-card {
    grid-template-columns: 58px 82px 1fr;
  }

  .rank-card img {
    width: 82px;
    height: 112px;
  }

  .rank-score {
    grid-column: 2 / -1;
  }
}

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

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

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .hero {
    height: 520px;
  }

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

  .hero p {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    min-height: 42px;
    padding: 0 16px;
  }

  .home-sections,
  .page-shell {
    padding: 36px 0 56px;
  }

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

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

  .movie-info {
    padding: 12px;
  }

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

  .movie-info p {
    min-height: 42px;
    font-size: 13px;
  }

  .page-title,
  .player-panel,
  .info-panel,
  .search-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .rank-card {
    grid-template-columns: 46px 74px 1fr;
    gap: 12px;
  }

  .rank-number {
    font-size: 22px;
  }

  .rank-card img {
    width: 74px;
    height: 104px;
  }

  .rank-card h2 {
    font-size: 17px;
  }

  .detail-title h1 {
    font-size: 34px;
  }
}
