:root {
  --bg-start: #f8fafc;
  --bg-mid: #eff6ff;
  --bg-end: #f0fdfa;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --text: #111827;
  --muted: #6b7280;
  --line: #ccfbf1;
  --teal: #14b8a6;
  --teal-dark: #0d9488;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --yellow: #ca8a04;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 14px 30px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 70px rgba(15, 23, 42, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-start), var(--bg-mid), var(--bg-end));
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.narrow-container {
  width: min(100% - 32px, 980px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(153, 246, 228, 0.65);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

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

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

.logo-icon {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 0 32px rgba(20, 184, 166, 0.45);
  animation: pulseGlow 2.2s ease-in-out infinite;
}

.logo-text,
.footer-logo {
  font-size: clamp(20px, 2vw, 26px);
  background: linear-gradient(90deg, var(--teal-dark), var(--blue-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #374151;
  font-weight: 600;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a,
.section-link,
.category-strip-head a,
.breadcrumb a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover,
.section-link:hover,
.category-strip-head a:hover,
.breadcrumb a:hover {
  color: var(--teal-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.search-form input,
.filter-panel select {
  min-height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  width: min(100%, 280px);
  padding: 0 16px;
}

.search-form input:focus,
.filter-panel select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.22);
}

.search-form button,
.mobile-menu-toggle {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  box-shadow: var(--shadow-sm);
}

.search-form button {
  padding: 0 18px;
}

.compact-search button {
  width: 42px;
  padding: 0;
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  font-size: 22px;
}

.mobile-panel {
  border-top: 1px solid #ecfeff;
  background: #ffffff;
}

.mobile-panel-inner {
  padding: 16px 0 20px;
}

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

.mobile-panel nav a {
  padding: 11px 14px;
  border-radius: 14px;
  color: #374151;
  background: #f8fafc;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
}

.hero-bg,
.hero-bg img,
.hero-overlay,
.page-hero-bg,
.page-hero-bg img {
  position: absolute;
  inset: 0;
}

.hero-bg img,
.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: opacity 0.35s ease, transform 0.6s ease;
}

.hero-overlay {
  background:
    radial-gradient(circle at 70% 20%, rgba(45, 212, 191, 0.35), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.22));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 42px;
  min-height: 70vh;
  padding: 72px 0;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #5eead4;
  font-weight: 700;
}

.eyebrow span {
  animation: pulseGlow 2s ease-in-out infinite;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.btn-glass {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline {
  color: var(--teal-dark);
  border: 2px solid var(--teal);
  background: #ffffff;
}

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-xl);
}

.hero-panel-title {
  margin-bottom: 14px;
  font-weight: 800;
  color: #e0f2fe;
}

.hero-thumbs {
  display: grid;
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  text-align: left;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.72);
  background: rgba(20, 184, 166, 0.28);
}

.hero-thumb img {
  width: 88px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 700;
}

.section {
  padding: 74px 0;
}

.section-gradient {
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(239, 246, 255, 0.96));
}

.section-gradient-soft {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(240, 253, 250, 0.96));
}

.section-title-row,
.category-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.section-title-row h2,
.category-strip-head h3,
.detail-card h2,
.sidebar-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #111827;
  font-weight: 850;
}

.section-title-row h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.category-strip-head h3,
.detail-card h2,
.sidebar-card h2 {
  font-size: 24px;
}

.section-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.section-link,
.category-strip-head a {
  color: var(--teal-dark);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card,
.movie-list-card,
.category-card,
.detail-card,
.sidebar-card {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
}

.movie-card:hover,
.movie-list-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.movie-poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f172a, #115e59);
}

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

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

.movie-poster-wrap::after,
.list-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-poster-wrap::after,
.movie-list-card:hover .list-poster::after {
  opacity: 1;
}

.category-pill,
.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.category-pill {
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  background: var(--teal);
}

.duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.78);
}

.rank-badge {
  top: 10px;
  right: 10px;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
}

.play-hover {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  padding: 18px;
}

.movie-card-large .movie-card-body {
  padding: 24px;
}

.movie-card-body h3,
.list-body h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
  transition: color 0.2s ease;
}

.movie-card-large .movie-card-body h3 {
  font-size: 24px;
}

.movie-card:hover h3,
.movie-list-card:hover h3 {
  color: var(--teal-dark);
}

.movie-card-body p,
.list-body p,
.category-card p,
.detail-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.movie-card-body p,
.list-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.movie-card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  -webkit-line-clamp: 2;
}

.list-body p {
  margin: 0 0 10px;
  -webkit-line-clamp: 2;
}

.stats-row,
.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

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

.tag-row span,
.detail-tags span,
.genre-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  padding: 5px 9px;
}

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

.list-stack {
  margin-top: 24px;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  min-height: 126px;
  border-radius: 16px;
}

.list-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #115e59);
}

.list-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 16px 16px 16px 0;
}

.category-strip {
  margin-bottom: 54px;
}

.category-strip:last-child {
  margin-bottom: 0;
}

.category-strip-head h3 span,
.detail-card h2 span,
.sidebar-card h2 span {
  width: 5px;
  height: 30px;
  border-radius: 999px;
  background: var(--teal);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 0, rgba(20, 184, 166, 0.38), transparent 28%),
    linear-gradient(135deg, #0f172a, #115e59 52%, #1d4ed8);
}

.compact-page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
}

.category-page-hero {
  min-height: 440px;
  display: flex;
  align-items: center;
}

.page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.54), rgba(15, 23, 42, 0.28));
}

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

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

.category-card {
  display: block;
  min-height: 250px;
  padding: 28px;
  border-radius: 22px;
}

.category-card-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-size: 24px;
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
}

.category-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #f0fdfa;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 800;
}

.filter-panel select {
  width: 100%;
  padding: 0 14px;
}

.page-search {
  margin-top: 26px;
}

.page-search input {
  width: min(100%, 520px);
}

.search-summary {
  margin-bottom: 22px;
  color: #4b5563;
  font-weight: 700;
}

.detail-section {
  padding: 34px 0 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 32px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #111827;
  box-shadow: var(--shadow-xl);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #111827;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.25), rgba(15, 23, 42, 0.66));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 22px 48px rgba(20, 184, 166, 0.32);
  font-size: 30px;
}

.player-play-text {
  font-size: 18px;
  font-weight: 850;
}

.detail-card,
.sidebar-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 20px;
}

.detail-card:first-of-type {
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

.detail-card h1 {
  margin: 0 0 22px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.detail-meta-grid span {
  padding: 12px;
  border-radius: 14px;
  color: #374151;
  background: #f8fafc;
  font-weight: 700;
}

.genre-pill {
  margin-bottom: 16px;
  padding: 9px 14px;
  background: linear-gradient(90deg, #f0fdfa, #eff6ff);
}

.detail-tags {
  margin-bottom: 20px;
}

.detail-tags span {
  padding: 7px 11px;
}

.summary-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
}

.detail-sidebar {
  min-width: 0;
}

.sidebar-card {
  position: sticky;
  top: 100px;
  margin-top: 0;
}

.sidebar-card .movie-list-card {
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 92px;
  box-shadow: none;
  border: 1px solid #eef2f7;
}

.sidebar-card .list-body {
  padding: 10px 10px 10px 0;
}

.sidebar-card .list-body h3 {
  margin-bottom: 6px;
  font-size: 14px;
}

.sidebar-card .list-body p {
  display: none;
}

.sidebar-card .list-meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 12px;
}

.site-footer {
  padding: 52px 0 24px;
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 38px;
}

.site-footer p {
  max-width: 460px;
  color: #cbd5e1;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-bottom {
  width: min(100% - 32px, 1280px);
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  color: #94a3b8;
  text-align: center;
}

@keyframes pulseGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(45, 212, 191, 0));
    opacity: 1;
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(45, 212, 191, 0.85));
    opacity: 0.72;
  }
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-panel {
    max-width: 640px;
  }

  .four-cols,
  .feature-grid,
  .category-grid,
  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-card {
    position: static;
  }

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

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

  .header-inner {
    min-height: 64px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    display: block;
    padding: 46px 0;
  }

  .hero-panel {
    margin-top: 34px;
  }

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

  .hero-actions,
  .detail-actions,
  .section-title-row,
  .category-strip-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section {
    padding: 48px 0;
  }

  .four-cols,
  .feature-grid,
  .category-grid,
  .filter-panel,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .movie-list-card,
  .sidebar-card .movie-list-card {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .list-body {
    padding: 12px 12px 12px 0;
  }

  .list-body h3 {
    font-size: 15px;
  }

  .list-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .detail-card,
  .sidebar-card {
    padding: 20px;
  }

  .player-play-icon {
    width: 68px;
    height: 68px;
  }
}
