* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
  min-width: 320px;
  overflow-x: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.84));
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 9px;
  border-left: 11px solid #ffffff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #34d399, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 1 1 auto;
}

.nav-link {
  color: #d1d5db;
  font-size: 14px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #34d399;
}

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

.header-search input,
.search-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(71, 85, 105, 0.86);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  border-radius: 999px;
  padding: 9px 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(52, 211, 153, 0.86);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.header-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #ffffff;
  background: #10b981;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover {
  background: #059669;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #e5e7eb;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: 100%;
  padding: 10px 22px 18px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-panel a {
  color: #d1d5db;
  padding: 8px 0;
}

.page-main {
  padding-top: 64px;
}

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

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

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

.hero-image,
.spotlight-image,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.28), transparent 32%), #0f172a;
}

.image-missing {
  opacity: 0;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.88) 42%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - 1240px) / 2));
  padding: 40px 0;
}

.eyebrow {
  color: #34d399;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-line {
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(16, 185, 129, 0.36);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, #10b981, #14b8a6);
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 54px rgba(16, 185, 129, 0.36);
}

.ghost-button {
  color: #d1d5db;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.58);
}

.ghost-button:hover {
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.54);
  background: rgba(30, 41, 59, 0.72);
}

.hero-arrow,
.spotlight-arrow {
  position: absolute;
  z-index: 4;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  font-size: 32px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover,
.spotlight-arrow:hover {
  background: rgba(15, 23, 42, 0.98);
  transform: translateY(-1px);
}

.hero-prev,
.spotlight-prev {
  left: 24px;
  top: 50%;
}

.hero-next,
.spotlight-next {
  right: 24px;
  top: 50%;
}

.hero-dots,
.spotlight-dots {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dot,
.spotlight-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active,
.spotlight-dot.active {
  width: 34px;
  background: #10b981;
}

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

.section-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.2;
  color: #ffffff;
}

.section-heading a {
  color: #34d399;
  font-weight: 700;
}

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

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

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.56);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 24px 52px rgba(16, 185, 129, 0.1);
}

.cover-frame {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: radial-gradient(circle at 35% 20%, rgba(16, 185, 129, 0.2), transparent 35%), #111827;
}

.compact-card .cover-frame {
  height: 210px;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.card-link:hover .cover-image {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.9));
}

.cover-tags {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.26);
}

.card-body {
  padding: 18px;
}

.compact-card .card-body {
  padding: 14px;
}

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

.card-link:hover h3 {
  color: #34d399;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #9ca3af;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.spotlight-section,
.rail-section {
  background: rgba(30, 41, 59, 0.32);
}

.spotlight {
  position: relative;
  height: 430px;
  border-radius: 28px;
  overflow: hidden;
  background: #111827;
}

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

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

.spotlight-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.48) 58%, transparent 100%);
}

.spotlight-content {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 36px;
  z-index: 2;
}

.spotlight-content h3 {
  margin: 0 0 8px;
  font-size: 34px;
  color: #ffffff;
}

.spotlight-content p {
  max-width: 760px;
  margin: 0 0 16px;
  color: #d1d5db;
}

.spotlight-content a {
  display: inline-flex;
  border-radius: 999px;
  background: #10b981;
  color: #ffffff;
  padding: 10px 20px;
  font-weight: 800;
}

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

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

.category-card {
  overflow: hidden;
  min-height: 260px;
  border: 1px solid rgba(51, 65, 85, 0.74);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.58);
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.5);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  height: 150px;
  background: radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.24), transparent 40%), #111827;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-info {
  padding: 18px;
}

.category-info h3 {
  margin: 0 0 8px;
  font-size: 21px;
  color: #ffffff;
}

.category-info p {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

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

.section-actions button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.7);
  color: #ffffff;
  font-size: 24px;
}

.movie-rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-card {
  flex: 0 0 310px;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 22px;
}

.mosaic-grid .movie-card:first-child {
  grid-row: span 2;
}

.mosaic-grid .movie-card:first-child .cover-frame {
  height: 540px;
}

.inner-page {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 75% 30%, rgba(16, 185, 129, 0.24), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b);
}

.small-hero {
  min-height: 300px;
}

.page-hero-content {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
}

.page-hero p {
  max-width: 760px;
}

.filter-bar,
.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar {
  grid-template-columns: minmax(0, 1fr) 180px;
}

.empty-state {
  display: none;
  margin: 20px 0;
  padding: 24px;
  border: 1px solid rgba(71, 85, 105, 0.6);
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.42);
  text-align: center;
}

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

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

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  filter: blur(3px);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.88) 52%, rgba(15, 23, 42, 0.62) 100%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

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

.breadcrumb a {
  color: #34d399;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: radial-gradient(circle at 30% 18%, rgba(16, 185, 129, 0.24), transparent 40%), #111827;
  border: 1px solid rgba(71, 85, 105, 0.65);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.detail-info h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.detail-meta {
  display: grid;
  gap: 9px;
  margin: 0 0 28px;
  color: #cbd5e1;
}

.player-section {
  padding-top: 56px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  border: 1px solid rgba(51, 65, 85, 0.86);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.26), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  box-shadow: 0 24px 64px rgba(16, 185, 129, 0.36);
  font-size: 30px;
  padding-left: 5px;
}

.movie-article {
  border: 1px solid rgba(51, 65, 85, 0.68);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.42);
  padding: clamp(24px, 4vw, 42px);
}

.movie-article h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 26px;
}

.movie-article p {
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.9;
}

.movie-article p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: #0f172a;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 9px;
  align-content: start;
}

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

.footer-links a {
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

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

  .header-search {
    width: 210px;
  }

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

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

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

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

  .header-inner {
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    margin-left: 16px;
    max-width: calc(100% - 32px);
  }

  .hero-arrow,
  .spotlight-arrow {
    display: none;
  }

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

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

  .mosaic-grid .movie-card:first-child {
    grid-row: auto;
  }

  .mosaic-grid .movie-card:first-child .cover-frame {
    height: 320px;
  }

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

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

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

@media (max-width: 620px) {
  .brand-text {
    font-size: 18px;
  }

  .hero {
    height: 540px;
  }

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

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

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

  .cover-frame,
  .compact-card .cover-frame {
    height: 270px;
  }

  .spotlight {
    height: 360px;
  }

  .spotlight-content {
    left: 20px;
    right: 20px;
    bottom: 24px;
  }

  .spotlight-content h3 {
    font-size: 26px;
  }

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

  .rail-card {
    flex-basis: 280px;
  }

  .detail-poster img {
    height: 420px;
  }
}
