:root {
  --sakura-50: #fef6f9;
  --sakura-100: #fdedf3;
  --sakura-200: #fcd9e7;
  --sakura-400: #f78bb8;
  --sakura-500: #f06292;
  --sakura-600: #e91e63;
  --cream-50: #fffcf5;
  --cream-100: #fff0cf;
  --cream-500: #facc15;
  --spring-500: #22c55e;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(233, 30, 99, 0.16);
  --shadow: 0 18px 48px rgba(233, 30, 99, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background: linear-gradient(135deg, var(--sakura-50) 0%, var(--cream-50) 52%, #f0fdf4 100%);
  min-height: 100vh;
}

img {
  background: linear-gradient(135deg, var(--sakura-100), var(--cream-100));
}

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 12px 32px rgba(233, 30, 99, 0.12);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sakura-400), var(--sakura-600));
  box-shadow: 0 10px 22px rgba(233, 30, 99, 0.26);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  background: linear-gradient(90deg, var(--sakura-600), var(--sakura-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.header-search {
  flex: 1;
  max-width: 450px;
  position: relative;
  display: flex;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-panel input,
.search-panel select {
  width: 100%;
  border: 2px solid var(--sakura-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px 112px 12px 18px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-panel input:focus,
.search-panel select:focus {
  border-color: var(--sakura-400);
  box-shadow: 0 0 0 4px rgba(247, 139, 184, 0.16);
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-btn,
.secondary-btn,
.player-play {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-panel button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--sakura-500);
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.primary-btn:hover,
.player-play:hover {
  transform: translateY(-1px) scale(1.02);
  background: var(--sakura-600);
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #374151;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #ffffff;
  background: var(--sakura-500);
  box-shadow: 0 10px 22px rgba(233, 30, 99, 0.18);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: var(--sakura-500);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.mobile-search {
  position: relative;
  margin-bottom: 12px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.46) 48%, rgba(247, 139, 184, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(22px, 6vw, 72px);
  right: clamp(22px, 6vw, 72px);
  bottom: clamp(32px, 7vw, 76px);
  z-index: 2;
  max-width: 680px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--sakura-200);
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

.hero-content p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.hero-tags span,
.detail-tags a,
.detail-tags span,
.tag-row a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--sakura-600);
  background: var(--sakura-100);
  font-size: 14px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
}

.primary-btn {
  color: #ffffff;
  background: var(--sakura-500);
  box-shadow: 0 12px 24px rgba(233, 30, 99, 0.25);
}

.secondary-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 20px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--sakura-400);
}

.section-block {
  margin-top: 46px;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: #1f2937;
}

.section-head p,
.page-intro {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.8;
}

.more-link {
  color: var(--sakura-600);
  font-weight: 800;
}

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

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

.movie-list {
  display: grid;
  gap: 18px;
}

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(233, 30, 99, 0.16);
}

.movie-card-horizontal {
  flex-direction: row;
  min-height: 176px;
}

.movie-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin: 0;
  background: linear-gradient(135deg, var(--sakura-100), var(--cream-100));
}

.wide-poster {
  width: 260px;
  min-width: 260px;
  aspect-ratio: 16 / 10;
}

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

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

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

.category-badge {
  top: 12px;
  left: 12px;
  background: var(--sakura-500);
}

.duration-badge {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-card-body {
  flex: 1;
  padding: 16px;
}

.movie-card h2,
.related-card h3,
.rank-title {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-meta,
.movie-stats,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card-meta,
.movie-stats {
  margin-top: 12px;
}

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

.category-card {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--sakura-600);
  font-size: 22px;
}

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

.feature-panel,
.search-panel,
.filter-panel,
.detail-panel,
.player-panel,
.rank-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.feature-panel,
.search-panel,
.filter-panel,
.rank-panel {
  padding: 24px;
}

.filter-panel,
.search-panel {
  margin: 24px 0;
}

.filter-panel input {
  max-width: 520px;
  padding-right: 18px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 190px 130px;
  gap: 12px;
}

.search-panel input,
.search-panel select {
  padding-right: 18px;
}

.search-panel button {
  position: static;
  min-height: 48px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sakura-600);
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(31, 41, 55, 0.08);
  font-weight: 800;
}

.pagination span,
.pagination a:hover {
  color: #ffffff;
  background: var(--sakura-500);
}

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

.player-panel {
  overflow: hidden;
  padding: 0;
  margin-bottom: 24px;
  background: #111827;
}

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

.player-play {
  position: absolute;
  inset: auto auto 32px 32px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  color: #ffffff;
  background: var(--sakura-500);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.player.is-playing .player-play {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  z-index: 3;
  display: none;
  padding: 12px 16px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
}

.player.has-message .player-message {
  display: block;
}

.detail-panel {
  padding: 26px;
  margin-bottom: 24px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-panel h2,
.sidebar h2,
.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
}

.detail-panel p {
  color: #4b5563;
  line-height: 1.9;
}

.sidebar {
  position: sticky;
  top: 96px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-card figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card figure span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border-radius: 8px;
  padding: 2px 6px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.related-card p {
  color: var(--muted);
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.rank-number {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cream-500), var(--sakura-500));
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(253, 237, 243, 0.82), rgba(255, 240, 207, 0.82));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: var(--sakura-600);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.empty-state {
  padding: 36px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
}

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

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

  .sidebar {
    position: static;
  }

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

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

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

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

  .mobile-nav-link {
    display: flex;
    margin-top: 8px;
  }

  .hero-carousel,
  .hero-slide img {
    min-height: 560px;
  }

  .hero-controls {
    left: 22px;
    right: auto;
    bottom: 18px;
  }

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

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

  .movie-card-horizontal {
    flex-direction: column;
  }

  .wide-poster {
    width: 100%;
    min-width: 0;
  }

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

  .rank-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .page-main,
  .nav-shell,
  .mobile-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 20px, 1180px);
  }

  .brand-text small {
    display: none;
  }

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

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

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 86px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .detail-panel,
  .feature-panel,
  .search-panel,
  .filter-panel,
  .rank-panel {
    padding: 18px;
  }

  .player-play {
    left: 18px;
    bottom: 18px;
  }

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