@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap");

:root {
  --primary: #14b8a6;
  --primary-dark: #0d9488;
  --accent: #06b6d4;
  --secondary: #f97316;
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.95rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  color: #fff;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.25);
}

.brand-text {
  font-size: 1.3rem;
  background: linear-gradient(90deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: #f3f4f6;
  color: #374151;
  border-radius: 0.65rem;
  padding: 0.45rem 0.7rem;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
}

.mobile-nav.open {
  display: grid;
  gap: 0.4rem;
}

.mobile-nav-link {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #374151;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: #f0fdfa;
  color: var(--primary-dark);
}

.hero {
  position: relative;
  height: 600px;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.72) 32%, rgba(0, 0, 0, 0.25) 70%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 5.5rem;
  width: min(1180px, calc(100% - 3rem));
  transform: translateX(-50%);
  color: #fff;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  margin: 1rem 0 0.75rem;
  max-width: 880px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.05;
  font-weight: 800;
}

.hero-content p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

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

.primary-button {
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 30px rgba(6, 182, 212, 0.22);
}

.ghost-button {
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
  left: 1.5rem;
}

.hero-next {
  right: 1.5rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 2;
  display: flex;
  gap: 0.6rem;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 2.2rem;
  background: #fff;
}

.page-section,
.library-section,
.detail-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

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

.kicker {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-head h2,
.page-title h1,
.detail-content h2 {
  margin: 0;
  color: var(--dark);
  font-weight: 800;
  line-height: 1.15;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
}

.section-head p,
.page-title p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--primary-dark);
  background: #f0fdfa;
  padding: 0.55rem 1rem;
}

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

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #ecfeff, #f0fdfa);
}

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

.card-link:hover .poster-wrap img,
.feature-card:hover img {
  transform: scale(1.06);
}

.card-badge,
.card-year {
  position: absolute;
  top: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.card-badge {
  left: 0.75rem;
  background: var(--secondary);
}

.card-year {
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.card-link:hover .card-play {
  opacity: 1;
}

.card-body {
  padding: 1rem;
}

.card-body h2,
.card-body h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.card-link:hover h2,
.card-link:hover h3 {
  color: var(--primary-dark);
}

.card-body p {
  min-height: 3.1rem;
  margin: 0.45rem 0 0.8rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.feature-card a {
  position: relative;
  display: block;
  height: 24rem;
  overflow: hidden;
  border-radius: 1.3rem;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.feature-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
}

.feature-overlay .tag-row span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.feature-overlay h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.55rem;
  line-height: 1.2;
}

.feature-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.rank-item a {
  display: grid;
  grid-template-columns: 2rem 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
}

.rank-num {
  color: var(--secondary);
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
}

.rank-item img {
  width: 3rem;
  height: 4rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.search-panel {
  margin-bottom: 2rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  outline: none;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: #374151;
  background: #f3f4f6;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-button.active,
.filter-button:hover {
  color: #fff;
  background: var(--primary-dark);
}

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

.page-title {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem 1.5rem;
}

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

.category-card {
  display: block;
  min-height: 10rem;
  padding: 1.2rem;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
  display: inline-flex;
  width: 2.7rem;
  height: 2.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
}

.category-card h2,
.category-card h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1.15rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  color: #fff;
  background: #000;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.24));
}

.detail-hero-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.08;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.meta-row span {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.detail-info p {
  max-width: 830px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 5.2rem;
  height: 5.2rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 2rem;
  box-shadow: 0 16px 35px rgba(6, 182, 212, 0.28);
}

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

.detail-panel,
.side-panel {
  padding: 1.4rem;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.detail-panel + .detail-panel {
  margin-top: 1rem;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.detail-panel p {
  margin: 0;
  color: #374151;
  white-space: pre-line;
}

.side-panel .movie-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.side-panel .poster-wrap {
  aspect-ratio: 16 / 9;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-inner p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

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

  .feature-grid,
  .split-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head {
    display: block;
  }

  .section-link {
    margin-top: 1rem;
  }

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

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

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

  .rank-item a {
    grid-template-columns: 2rem 3rem minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .page-section,
  .library-section,
  .detail-section,
  .page-title,
  .detail-hero-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-content {
    width: calc(100% - 2rem);
    bottom: 4.5rem;
  }

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

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

  .card-body {
    padding: 0.8rem;
  }

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