:root {
  --deep: #012A36;
  --night: #29274C;
  --violet: #7E52A0;
  --mauve: #D295BF;
  --blush: #E6BCCD;
  --text: #FFF8FC;
  --muted: #D8CAD4;
  --ink: #140F1F;
  --line: rgba(255, 248, 252, 0.1);
  --panel: rgba(12, 22, 40, 0.78);
  --panel-soft: rgba(230, 188, 205, 0.08);
  --shadow: 0 24px 80px rgba(1, 14, 24, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(126, 82, 160, 0.35), transparent 24%),
    radial-gradient(circle at 80% 12%, rgba(210, 149, 191, 0.24), transparent 20%),
    linear-gradient(180deg, #061f2c 0%, #171633 38%, #241d40 100%);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }

.panel,
.modal-dialog,
.auth-card,
.sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 480px);
  gap: 48px;
  align-items: center;
  padding: 40px 20px;
  width: min(1240px, 100%);
  margin: 0 auto;
}

.auth-shell--page {
  min-height: 100vh;
}

.auth-card {
  padding: 28px;
}

.auth-visual {
  display: grid;
  align-content: center;
}

.auth-visual--split {
  min-height: 100%;
}

.auth-brand {
  display: grid;
  gap: 22px;
}

.auth-brand--split {
  max-width: 620px;
  justify-items: start;
  text-align: left;
  gap: 16px;
}

.auth-form-shell {
  width: 100%;
  display: grid;
  gap: 18px;
}

.logo-lockup {
  display: grid;
  gap: 24px;
}

.brand-logo {
  width: min(340px, 48vw);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 42px rgba(230, 188, 205, 0.18));
}

.brand-logo--small {
  width: 168px;
  height: 168px;
  border-radius: 40px;
}

.brand-logo--auth {
  width: 260px;
}

.panel-kicker,
.sidebar-card__meta,
.search-field span,
.filters-grid span,
.content-form span,
.auth-form span,
.choice-grid span {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blush);
}

.auth-brand h1,
.choice-copy h2,
.profile-header h2,
.brand--sidebar strong {
  margin: 0 0 14px;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.auth-brand p,
.auth-copy,
.choice-copy p,
.summary-copy,
.profile-header p,
.mini-card p,
.empty-state,
.helper-copy,
.status-copy,
.section-head span,
.stat-box span {
  color: var(--muted);
  line-height: 1.55;
}

.auth-copy {
  padding: 26px;
}

.auth-points {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

.auth-card {
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: 680px;
  width: min(680px, 100%);
}

.auth-card--side {
  width: 100%;
  max-width: 480px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 248, 252, 0.08);
}

.auth-tab,
.side-link,
.ghost-button,
.action-button,
.modal-close {
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: 160ms ease;
}

.auth-tab,
.side-link,
.ghost-button,
.action-button {
  padding: 13px 16px;
}

.auth-tab.is-active,
.side-link.is-active,
.auth-tab:hover,
.side-link:hover,
.ghost-button:hover,
.action-button:hover,
.modal-close:hover {
  background: rgba(230, 188, 205, 0.1);
  border-color: rgba(230, 188, 205, 0.16);
}

.auth-tab.is-active {
  background: linear-gradient(135deg, rgba(230, 188, 205, 0.2), rgba(126, 82, 160, 0.18));
  border-color: rgba(230, 188, 205, 0.22);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.side-link {
  text-align: left;
  color: rgba(255, 248, 252, 0.74);
}

.side-link.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(230, 188, 205, 0.22), rgba(126, 82, 160, 0.18));
  border-color: rgba(230, 188, 205, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ghost-button--accent {
  background: linear-gradient(135deg, var(--mauve), var(--blush));
  color: var(--ink);
  font-weight: 700;
}

.ghost-button--accent:hover {
  background: linear-gradient(135deg, #e4a7c8, #f0cad8);
}

.auth-form,
.filters-grid,
.catalogue-grid,
.mini-grid,
.content-form,
.choice-grid,
.side-nav,
.sidebar-stack,
.profile-badges,
.stats-list,
.profile-sections {
  display: grid;
  gap: 14px;
}

.auth-form[hidden],
.modal[hidden],
#continue-session-button[hidden] {
  display: none !important;
}

.auth-form label,
.search-field,
.filters-grid label,
.content-form label,
.choice-grid label {
  display: grid;
  gap: 8px;
}

.auth-form input,
.search-field input,
.filters-grid select,
.content-form input,
.content-form select,
.content-form textarea,
.choice-grid select {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 248, 252, 0.07);
  border: 1px solid rgba(255, 248, 252, 0.14);
  border-radius: 18px;
  outline: none;
  appearance: none;
}

.filters-grid select,
.content-form select,
.choice-grid select {
  color: #f7f5fb;
  background:
    linear-gradient(180deg, rgba(32, 40, 61, 0.96), rgba(20, 26, 42, 0.96));
  border-color: rgba(193, 210, 238, 0.16);
}

select option {
  color: #f7f5fb;
  background: #1a2336;
}

.auth-form input::placeholder,
.search-field input::placeholder,
.content-form input::placeholder,
.content-form textarea::placeholder {
  color: rgba(216, 202, 212, 0.66);
}

.auth-form--panel {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 248, 252, 0.08);
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.app-frame {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  border-radius: 32px;
  background: rgba(4, 18, 28, 0.32);
  border: 1px solid rgba(255, 248, 252, 0.05);
  box-shadow: none;
}

.sidebar {
  padding: 10px 0;
  display: grid;
  align-content: start;
  gap: 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand--sidebar {
  width: 100%;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0;
  margin-bottom: 16px;
}

.brand strong {
  display: block;
  font-size: 1.35rem;
}

.sidebar-card {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(126, 82, 160, 0.18), rgba(230, 188, 205, 0.08));
  border: 1px solid rgba(230, 188, 205, 0.12);
}

.ghost-button--quiet {
  padding-inline: 0;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
}

.ghost-button--inline {
  padding: 0;
  min-height: auto;
  border-radius: 0;
  color: var(--blush);
}

.ghost-button--inline:hover {
  background: transparent;
  border-color: transparent;
  color: #f3d4df;
}

.page-shell {
  min-width: 0;
}

.topbar {
  display: block;
  align-items: center;
  margin-bottom: 32px;
}
.card-actions,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice-panel,
.profile-header,
.profile-summary,
.profile-sections > .panel {
  padding: 22px;
}

.choice-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at right, rgba(230, 188, 205, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(1, 42, 54, 0.5), rgba(126, 82, 160, 0.18));
  border: 0;
  box-shadow:
    0 20px 60px rgba(10, 6, 28, 0.18);
}

.choice-copy h2 {
  font-size: clamp(2.3rem, 4.4vw, 4.6rem);
  text-wrap: balance;
}

.choice-copy p:last-child {
  max-width: 60ch;
  font-size: 1.02rem;
}

.choice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
}

.choice-grid button {
  align-self: end;
  min-height: 54px;
}

.section-head,
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.section-head h3,
.profile-summary h3,
.modal-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.section-head__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filters-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 20px;
}

.filters-grid--inline {
  margin-bottom: 28px;
}

.catalogue-stack {
  display: grid;
  gap: 24px;
}

.theme-shelf {
  display: grid;
  gap: 14px;
}

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

.content-card {
  overflow: hidden;
  position: relative;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(26, 25, 52, 0.78), rgba(10, 18, 34, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.content-card--compact .card-image {
  min-height: 200px;
}

.content-card--compact .card-description {
  min-height: 60px;
}

.content-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 48px rgba(8, 10, 28, 0.24);
}

.content-card:focus-visible {
  outline: 2px solid rgba(230, 188, 205, 0.72);
  outline-offset: 4px;
}

.card-image {
  min-height: 248px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.chip-row,
.tag-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.content-chip,
.tag-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.content-chip {
  color: var(--text);
  background: rgba(1, 42, 54, 0.4);
  border: 1px solid rgba(255, 248, 252, 0.12);
}

.content-chip--type {
  color: #fff8fc;
  font-weight: 700;
}

.content-chip--youtube {
  background: linear-gradient(135deg, #ff6674, #b92e44);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 18px rgba(207, 62, 77, 0.28);
}

.content-chip--twitch {
  background: linear-gradient(135deg, #9a6cd1, #6d3f97);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 18px rgba(126, 82, 160, 0.32);
}

.content-chip--game {
  background: linear-gradient(135deg, #f8de7f, #e8b93d);
  border-color: rgba(255, 255, 255, 0.12);
  color: #2b2110;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 18px rgba(240, 200, 90, 0.24);
}

.content-chip--length {
  background: linear-gradient(135deg, rgba(6, 49, 63, 0.96), rgba(1, 32, 44, 0.94));
  color: #eef8fb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 18px rgba(1, 42, 54, 0.18);
}

.tag-pill {
  border: 1px solid rgba(148, 221, 255, 0.16);
  background: linear-gradient(135deg, rgba(7, 63, 82, 0.88), rgba(2, 34, 46, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(200, 242, 255, 0.12),
    0 0 16px rgba(49, 127, 156, 0.12);
}

.tag-pill--theme {
  color: #d6f5ff;
}

.tag-pill--intention {
  color: #d6f5ff;
}

.tag-pill--length {
  color: #d6f5ff;
}

.card-body {
  padding: 24px 22px 22px;
}

.card-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  line-height: 1.15;
}

.card-description {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
  min-height: 74px;
}

.tag-stack {
  margin-bottom: 22px;
}

.expert-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 248, 252, 0.08);
  display: grid;
  gap: 10px;
}

.expert-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.action-button {
  flex: 1;
  min-height: 44px;
}

.card-actions {
  margin-top: 22px;
}

.card-icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 18, 24, 0.42);
  color: #fff8fc;
  backdrop-filter: blur(12px);
}

.card-icon-button:hover {
  background: rgba(210, 149, 191, 0.18);
  border-color: rgba(230, 188, 205, 0.22);
}

.shelf-grid .content-card:nth-child(6n + 2) {
  background:
    linear-gradient(180deg, rgba(255, 247, 198, 0.16), rgba(255, 247, 198, 0.04)),
    linear-gradient(180deg, rgba(49, 41, 18, 0.42), rgba(16, 18, 28, 0.84));
}

.shelf-grid .content-card:nth-child(6n + 3) {
  background:
    linear-gradient(180deg, rgba(183, 237, 255, 0.16), rgba(183, 237, 255, 0.04)),
    linear-gradient(180deg, rgba(6, 45, 68, 0.42), rgba(16, 18, 28, 0.84));
}

.shelf-grid .content-card:nth-child(6n + 4) {
  background:
    linear-gradient(180deg, rgba(255, 226, 235, 0.14), rgba(255, 226, 235, 0.04)),
    linear-gradient(180deg, rgba(54, 23, 48, 0.4), rgba(16, 18, 28, 0.84));
}

.action-button.is-active[data-action="seen"] {
  background: rgba(1, 42, 54, 0.9);
  border-color: rgba(230, 188, 205, 0.22);
}

.action-button.is-active[data-action="watchlist"] {
  background: rgba(126, 82, 160, 0.28);
  border-color: rgba(210, 149, 191, 0.22);
}

.profile-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.tabs-shell {
  position: relative;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.stat-box,
.expertise-pill,
.mini-card {
  padding: 14px;
  border-radius: 20px;
  background: var(--panel-soft);
  border: 1px solid rgba(230, 188, 205, 0.12);
}

.stat-box strong {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 2px;
}

.mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card h4 {
  margin: 0 0 8px;
}

.content-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-span-2 {
  grid-column: span 2;
}

.preview-box {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 110px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(230, 188, 205, 0.16);
}

.preview-box img {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 14px;
}

.status-copy[data-tone="success"] {
  color: #ffd8e6;
}

.status-copy[data-tone="error"] {
  color: #ffb6c4;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 18, 0.72);
  backdrop-filter: blur(10px);
}

.modal-dialog {
  position: relative;
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
}

.modal-close {
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
}

.empty-state {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(230, 188, 205, 0.16);
}

@media (max-width: 1240px) {
  .auth-shell,
  .app-frame,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px;
  }

  .auth-shell {
    padding: 20px 12px;
    gap: 24px;
  }

  .app-frame {
    padding: 12px;
  }

  .topbar,
  .filters-grid,
  .content-form,
  .shelf-grid,
  .mini-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .preview-box {
    flex-direction: column;
    align-items: stretch;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .preview-box img {
    width: 100%;
    height: auto;
  }

  .brand-logo {
    width: 160px;
  }
}
