:root {
  --bg: #0f1320;
  --bg-deep: #090d18;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --surface-high: #1b1f2d;
  --line: rgba(255, 255, 255, 0.1);
  --line-pink: rgba(255, 177, 197, 0.24);
  --text: #dfe1f5;
  --muted: #bda8b0;
  --muted-2: #847986;
  --pink: #ffb1c5;
  --pink-hot: #ff6b9d;
  --blue: #a2e7ff;
  --blue-hot: #3cd7ff;
  --violet: #ddb7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --glow-pink: 0 0 32px rgba(255, 107, 157, 0.18);
  --glow-blue: 0 0 32px rgba(60, 215, 255, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Geist", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 5%, rgba(255, 107, 157, 0.11), transparent 34rem),
    radial-gradient(circle at 83% 35%, rgba(60, 215, 255, 0.11), transparent 32rem),
    linear-gradient(180deg, #0b0f1b 0%, var(--bg-deep) 48%, #080c16 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 70%, transparent);
}

button,
input,
select,
textarea { font: inherit; }

button {
  border: 0;
  cursor: pointer;
  color: var(--text);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 27, 0.82);
  backdrop-filter: blur(24px);
}

.topbar__inner {
  width: min(1500px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  font-family: "Syne", serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--pink);
  text-shadow: 0 0 24px rgba(255, 177, 197, 0.3);
}

.tabs {
  display: flex;
  gap: 36px;
  align-items: center;
}

.tab {
  position: relative;
  padding: 22px 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tab.active {
  color: var(--pink);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--pink);
  box-shadow: var(--glow-pink);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.app {
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 56px;
  text-align: center;
}

.hero h1 {
  margin: 20px 0 0;
  font-family: "Syne", serif;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--pink);
}

.search-shell {
  width: min(632px, 100%);
  min-height: 74px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 14px 0 24px;
  border: 1px solid rgba(255, 177, 197, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  box-shadow: 0 28px 80px rgba(255, 107, 157, 0.08);
  backdrop-filter: blur(20px);
}

.search-icon {
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
}

.search-area {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 700;
}

.search-area::placeholder {
  color: #c9c9d8;
}

.search-btn {
  min-width: 92px;
  min-height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.spotlight {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  padding: 38px;
}

.poster-panel {
  display: grid;
  gap: 20px;
  align-content: start;
}

.cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: var(--surface-high);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.42);
}

.skeleton-box,
.skeleton-line,
.skeleton-copy,
.recommendation-skeleton {
  position: relative;
  overflow: hidden;
  color: transparent;
  background: linear-gradient(90deg, rgba(255,255,255,0.055), rgba(255,255,255,0.11), rgba(255,255,255,0.055));
  background-size: 220% 100%;
  animation: skeletonPulse 1.55s ease-in-out infinite;
}

.skeleton-line {
  display: block;
  min-height: 22px;
  border-radius: 999px;
}

.skeleton-line.short { width: 104px; }
.skeleton-line.medium { width: min(420px, 70%); }
.skeleton-line.tiny { width: 150px; }

.skeleton-copy {
  width: min(680px, 100%);
  min-height: 104px;
  border-radius: 14px;
}

.recommendation-skeleton {
  min-height: 254px;
  border-radius: 20px;
  border: 1px solid var(--line);
}

@keyframes skeletonPulse {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.poster-actions {
  display: grid;
  gap: 14px;
}

.primary-btn,
.link-btn,
.ghost-btn,
.update-btn,
.text-btn {
  min-height: 46px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 800;
  font-size: 13px;
}

.primary-btn {
  background: linear-gradient(135deg, #ff73a4, #ffb1c5);
  color: #3f001b;
  box-shadow: var(--glow-pink);
}

.link-btn,
.ghost-btn,
.update-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.ghost-btn {
  min-height: 34px;
  padding: 0 20px;
  border-radius: 10px;
  color: var(--muted);
}

.text-btn {
  min-height: auto;
  padding: 0;
  color: var(--pink);
  background: transparent;
}

.spotlight-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.badge-row,
.metric-row,
.tags,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.capsule {
  min-width: 104px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.capsule.blue {
  color: var(--blue);
  background: rgba(162, 231, 255, 0.12);
  border: 1px solid rgba(162, 231, 255, 0.24);
}

.capsule.pink {
  color: var(--pink);
  background: rgba(255, 177, 197, 0.12);
  border: 1px solid rgba(255, 177, 197, 0.24);
}

#titleChip {
  min-width: 0;
  padding: 0;
  margin-top: 6px;
  display: block;
  background: none;
  border: 0;
  color: #f3f3fb;
  font-family: "Syne", serif;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  text-transform: none;
  letter-spacing: 0;
}

.native-title {
  margin: 26px 0 18px;
  color: var(--muted-2);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.metric-row {
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.metric {
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

.metric span {
  color: var(--pink);
  margin-right: 6px;
}

.metric small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.description-wrap {
  padding: 18px 0 20px;
}

.description-wrap h2,
.section-head h2,
.stats-card h2,
.favorites-card h2,
.filters-card h2 {
  margin: 0;
  font-family: "Syne", serif;
  font-size: 15px;
  line-height: 1.2;
}

.description {
  max-width: 720px;
  margin-top: 18px;
  color: #cdbfc8;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

.description:not(.skeleton-copy) {
  min-height: 0;
}

.description p {
  margin: 0 0 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 14px;
  border-radius: 999px;
  color: #d8d8e8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.entry-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 150px;
  gap: 14px;
  align-items: end;
  margin-top: auto;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255,255,255,0.075);
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: rgba(15, 19, 32, 0.48);
  padding: 0 14px;
}

textarea {
  min-height: 96px;
  padding: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(162, 231, 255, 0.45);
  box-shadow: var(--glow-blue);
}

select option {
  color: #101320;
}

.update-btn {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.08);
}

.notes-drawer {
  margin-top: 14px;
  color: var(--muted);
}

.notes-drawer summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--blue);
}

.notes-drawer textarea,
.notes-drawer .detail-actions,
.trailer {
  margin-top: 12px;
}

.trailer iframe,
.trailer img {
  width: 100%;
  border: 0;
  border-radius: 16px;
}

.sync {
  margin-top: 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 348px);
  gap: 24px;
  margin-top: 32px;
  margin-bottom: 88px;
}

.main-column,
.side-column {
  display: grid;
  align-content: start;
  gap: 24px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: -8px;
}

.section-head h2 {
  display: flex;
  gap: 12px;
  align-items: center;
}

.section-head span {
  color: var(--blue);
}

.continue-grid,
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 250px));
  gap: 22px;
  min-height: 222px;
  align-items: start;
}

.library-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  max-height: 462px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-gutter: stable;
}

.library-grid::-webkit-scrollbar {
  width: 10px;
}

.library-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
}

.library-grid::-webkit-scrollbar-thumb {
  border: 2px solid rgba(10, 14, 27, 0.75);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink), var(--blue));
}

.watchlist-item,
.recommendation-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(0,0,0,0.22);
}

.watchlist-item {
  min-height: 220px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255,255,255,0.025);
  font-weight: 800;
  text-align: center;
}

.watchlist-item .small-cover {
  width: 100%;
  height: 126px;
  object-fit: cover;
  display: block;
}

.watchlist-body {
  padding: 14px 16px 16px;
}

.watchlist-body strong {
  display: block;
  color: #f2f2fa;
  font-size: 15px;
  line-height: 1.25;
}

.watchlist-progress {
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
}

.watchlist-progress span {
  display: block;
  height: 100%;
  width: var(--progress, 40%);
  background: linear-gradient(90deg, var(--pink), var(--blue));
}

.item-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 20px);
}

.item-actions button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(10,14,27,0.7);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 11px;
  font-weight: 800;
}

.item-actions .favBtn.active {
  color: #3f001b;
  background: linear-gradient(135deg, #ff73a4, #ffb1c5);
  border-color: rgba(255, 177, 197, 0.55);
}

.muted,
.watchlist-body .muted {
  color: var(--muted);
  font-size: 12px;
}

.recommendations-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
  min-height: 264px;
}

.discovery-suggestions {
  margin-top: 48px;
  margin-bottom: 16px;
}

.recommendation-item {
  padding: 12px;
  cursor: pointer;
}

.recommendation-item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rec-title {
  display: block;
  margin-top: 14px;
  color: #f4f4fa;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-score {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-card,
.favorites-card,
.filters-card {
  padding: 24px;
}

.stats-grid {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.stat-counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-box {
  min-height: 84px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.055);
}

.stat-box strong {
  color: var(--blue);
  font-family: "Syne", serif;
  font-size: 30px;
}

.stat-box:nth-child(2) strong {
  color: var(--pink);
}

.stat-box span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.rate-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rate-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.rate-track span {
  display: block;
  height: 100%;
  width: var(--rate, 0%);
  background: linear-gradient(90deg, var(--blue), var(--pink));
}

.favorite-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.favorite-item:last-child {
  border-bottom: 0;
}

.favorite-rank {
  color: var(--muted-2);
  font-weight: 900;
}

.favorite-item img,
.unfavorite-btn {
  display: none;
}

.favorite-item .title {
  display: block;
  color: #f3f3fa;
  font-weight: 900;
}

.favorite-item .score {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filters-card {
  display: grid;
  gap: 12px;
}

.filters-card h2 {
  margin-bottom: 8px;
}

.list-controls-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 210px) minmax(160px, 210px);
  align-items: end;
  gap: 14px;
  margin: 8px 0 32px;
  padding: 18px;
}

.list-hero {
  padding: 42px 0 22px;
}

.list-hero h1 {
  margin: 0;
  font-family: "Syne", serif;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.05;
}

.list-hero p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.quote-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 48px 0 88px;
  padding: 22px 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.quote-content {
  display: flex;
  gap: 14px;
  align-items: baseline;
  min-width: 0;
}

.quote-text {
  margin: 0;
  color: #dfd5dc;
  font-size: 16px;
  font-style: italic;
  font-weight: 700;
}

.quote-author {
  margin: 0;
  color: #f1edf3;
  font-weight: 900;
}

.site-footer {
  min-height: 140px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  color: var(--muted);
  background: #0b0f1b;
  font-size: 12px;
  font-weight: 800;
}

.site-footer strong {
  display: block;
  color: var(--pink);
  font-family: "Syne", serif;
  font-size: 16px;
  margin-bottom: 10px;
}

.site-footer nav {
  display: flex;
  gap: 32px;
}

.site-footer > span {
  justify-self: end;
}

.hidden-hooks {
  display: none;
}

.no-favorites,
.no-recommendations {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

@media (hover: hover) {
  .ghost-btn:hover,
  .link-btn:hover,
  .update-btn:hover,
  .search-btn:hover,
  .watchlist-item:hover,
  .recommendation-item:hover {
    border-color: var(--line-pink);
    box-shadow: var(--glow-pink);
  }

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

@media (max-width: 1040px) {
  .spotlight,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .poster-panel {
    grid-template-columns: minmax(220px, 320px) 1fr;
    align-items: end;
  }

  .poster-actions {
    align-self: end;
  }

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

  .filters-card {
    grid-column: 1 / -1;
  }

  .list-controls-bar {
    grid-template-columns: minmax(260px, 1fr) minmax(160px, 210px) minmax(160px, 210px);
  }
}

@media (max-width: 760px) {
  .topbar__inner,
  .site-footer {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 16px 0;
  }

  .top-actions,
  .site-footer > span {
    justify-self: start;
  }

  .tabs {
    gap: 24px;
  }

  .hero {
    min-height: 280px;
    gap: 32px;
  }

  .search-shell {
    grid-template-columns: 24px 1fr;
    border-radius: 24px;
    padding: 18px;
  }

  .search-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .spotlight {
    padding: 20px;
  }

  .poster-panel,
  .entry-panel,
  .side-column,
  .list-controls-bar,
  .stat-counters {
    grid-template-columns: 1fr;
  }

  .quote-bar,
  .quote-content {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 24px;
  }
}

@media (max-width: 520px) {
  .app,
  .topbar__inner {
    width: min(100% - 28px, 1152px);
  }

  .continue-grid,
  .library-grid,
  .recommendations-list {
    grid-template-columns: 1fr;
  }

  .metric {
    font-size: 20px;
  }
}
