/* ================================================================
   BONZA CHAT — Common Styles
   Shared across all dashboard / inner pages.
   Canonical source: dashboard.html
   ================================================================ */


/* ========== CSS VARIABLES ========== */
:root {
  --purple-300: #DFBCFF;
  --purple-400: #CC95FF;
  --purple-700: #653395;
  --purple-800: #432362;
  --purple-900: #1F102D;
  --neutral-300: #D4D4D4;
  --neutral-400: #9E9E9E;
  --neutral-500: #777;
  --neutral-600: #4B4B4B;
  --neutral-700: #2E2E2E;
  --neutral-800: #131313;
  --neutral-900: #000;
  --green-400: #56FFA4;
  --green-700: #0B6C37;
  --green-800: #054623;
  --green-900: #021D0F;
  --yellow-400: #FEFF77;
  --yellow-700: #656612;
  --yellow-800: #3A3A08;
  --yellow-900: #1B1B03;
}


/* ========== RESET & BODY ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Heebo', sans-serif;
  background: #000;
  color: #fff;
  display: flex;
  height: 100vh;
  height: 100dvh; /* dynamic viewport height — accounts for browser chrome on mobile */
  overflow: hidden;
}


/* ========== SIDEBAR ========== */
.sidebar {
  width: 237px;
  min-width: 237px;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  height: 100vh;
  transition: width 0.3s ease, min-width 0.3s ease;
  position: relative;
  overflow: hidden;
}
.sidebar.collapsed {
  width: 72px;
  min-width: 72px;
}

/* Sidebar header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.sidebar-logo { height: 25px; }
.sidebar-logo-text { height: 17px; }
.sidebar.collapsed .sidebar-logo-text { display: none; }
.sidebar.collapsed .sidebar-logo { height: 25px; }

/* Sidebar toggle button */
.sidebar-toggle {
  background: var(--neutral-800);
  border: none;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle img { width: 20px; height: 20px; filter: invert(1); }
.sidebar.collapsed .sidebar-toggle {
  position: absolute;
  right: 0;
  top: 20px;
  padding: 0;
  background: none;
}

/* Sidebar navigation */
.sidebar-nav { display: flex; flex-direction: column; gap: 24px; }
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }

/* Sidebar items */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--neutral-400);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  position: relative;
  transition: background 0.2s;
}
.sidebar-item:hover { background: var(--neutral-700); color: #fff; }
.sidebar-item.active { background: var(--neutral-700); color: #fff; }
.sidebar-item img { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-item-label { flex: 1; }
.sidebar.collapsed .sidebar-item-label { display: none; }
.sidebar.collapsed .sidebar-item { padding: 10px; width: 40px; }

/* Sidebar badge */
.sidebar-badge {
  background: var(--purple-400);
  color: #000;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  padding: 2px 8px;
  border-radius: 14px;
}
.sidebar.collapsed .sidebar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  padding: 2px 4px;
}

/* Sidebar footer */
.sidebar-footer { display: flex; flex-direction: column; gap: 16px; padding: 0 10px; }
.sidebar-socials { display: flex; gap: 16px; }
.sidebar.collapsed .sidebar-socials { flex-direction: column; }
.sidebar-socials img { width: 20px; height: 20px; opacity: 0.7; }
.sidebar-copyright { font-size: 12px; color: var(--neutral-600); line-height: 16px; }
.sidebar.collapsed .sidebar-copyright { display: none; }


/* ========== MAIN CONTENT WRAPPER ========== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  /* Positioning context for children that use `position: absolute;
     inset: 0` (e.g. .chat-lock-screen). Without this the lock screen
     would escape to the document body and stretch awkwardly. */
  position: relative;
}

/* Content area */
.content-area {
  display: flex;
  gap: 16px;
  padding: 0 16px 16px;
  flex: 1;
  position: relative;
}

.main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}


/* ========== TOPBAR ========== */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  height: 72px;
  flex-shrink: 0;
}
.topbar-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-title { flex: 1; font-size: 24px; font-weight: 500; line-height: 32px; }

/* Back button used by header.astro when `showBackButton` is set
   (single-album, etc.). Duplicated in bn_credits.css / bn_pricing.css
   for legacy pages — defining here makes it work everywhere by default
   so future pages with a back button don't need to import extra CSS. */
.btn-back {
  background: var(--neutral-800);
  border: none;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-back img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

/* Make astro-island wrappers transparent to flex layout */
.topbar > astro-island {
  display: contents;
}

/* Credits box */
.credits-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
}
.credits-amount { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.credits-amount img { width: 20px; height: 20px; }
.btn-buy {
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 20px rgba(255, 255, 255, 0.56);
  cursor: pointer;
}

/* Profile box */
.profile-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 10px;
  padding: 4px 8px 4px 4px;
  cursor: pointer;
}
.profile-avatar {
  background: var(--purple-800);
  border-radius: 32px;
  padding: 4px;
  display: flex;
}
.profile-avatar img { width: 24px; height: 24px; }
.profile-pro {
  background: var(--purple-400);
  color: #000;
  font-size: 12px;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 4px;
  margin-left: -6px;
}
.profile-box > img { width: 16px; height: 16px; }

/* Profile dropdown menu */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  min-width: 340px;
  max-width: 340px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

@media (max-width: 768px) {
  .profile-dropdown {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    min-width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    border-radius: 0 0 16px 16px;
  }
}

/* ========== MOBILE OVERLAY & MENU BUTTON ========== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.mobile-menu-btn img { height: 25px; }


/* ========== SKELETON LOADERS ========== */
.skeleton {
  background: linear-gradient(90deg, var(--neutral-800) 25%, var(--neutral-700) 50%, var(--neutral-800) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-banner {
  width: 100%;
  height: 200px;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
}

.skeleton-text {
  height: 20px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.title {
  height: 24px;
  width: 80%;
  margin-bottom: 12px;
}

.skeleton-image {
  width: 100%;
  height: 248px;
  border-radius: 12px;
}

.skeleton-button {
  width: 100px;
  height: 32px;
  border-radius: 8px;
}

.skeleton-filter {
  height: 40px;
  width: 100%;
  margin-bottom: 12px;
  border-radius: 8px;
}


/* ========== BANNER CAROUSEL ========== */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
}
.banner-track {
  display: flex;
  transition: transform 0.5s ease;
}
.banner-slide {
  display: flex;
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  min-height: 200px;
  background: url('/images/banner-bg.jpg') center/cover no-repeat;
}
.banner-content {
  padding: 40px;
  width: 366px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.banner-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--purple-400);
  line-height: 32px;
}
.banner-desc {
  font-size: 14px;
  color: #fff;
  line-height: 20px;
}
.btn-generate {
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 20px rgba(255,255,255,0.56);
  cursor: pointer;
  align-self: flex-start;
}
.banner-image {
  flex: 1;
  position: relative;
}
.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}
.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-700);
  cursor: pointer;
  transition: background 0.2s;
}
.banner-dot.active {
  background: #fff;
}


/* ========== CHARACTERS HEADER ========== */
.chars-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Model type filter buttons */
.model-type-buttons {
  display: flex;
  gap: 12px;
  flex: 1;
}
.filter-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-600);
  border-radius: 40px;
  padding: 4px 20px;
  height: 48px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
  font-family: 'Heebo', sans-serif;
}
.filter-pill:hover {
  background: var(--neutral-700);
}
.filter-pill.active {
  background: #fff;
  border-color: #fff;
}
.filter-pill.active .filter-pill-name {
  color: #000;
}
.filter-pill-name {
  font-size: 14px;
  color: var(--neutral-400);
  line-height: 20px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 8px;
  padding: 8px 16px 8px 8px;
  width: 330px;
}
.search-box img {
  width: 16px;
  height: 16px;
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Heebo', sans-serif;
  font-size: 12px;
  flex: 1;
}
.search-box input::placeholder {
  color: var(--neutral-500);
}
.mobile-filter-btn {
  display: none;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 8px;
  padding: 8px 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}


/* ========== FILTERS SIDEBAR ========== */
.filters-panel {
  width: 221px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  position: fixed;
  right: 16px;
  top: 80px;
  max-height: calc(100vh - 96px);
  z-index: 10;
}
.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filters-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--neutral-400);
}
.btn-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--neutral-700);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-reset img {
  width: 16px;
  height: 16px;
}

.filter-divider {
  height: 1px;
  background: var(--neutral-700);
}

.filter-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-400);
}
.filter-section-title img {
  width: 20px;
  height: 20px;
}

/* Age slider — dual range */
.age-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--neutral-500);
}
.range-slider {
  position: relative;
  width: 100%;
  height: 16px;
}
.range-slider input[type="range"] {
  -webkit-appearance: none;
  position: absolute;
  width: 100%;
  height: 6px;
  background: none;
  pointer-events: none;
  top: 5px;
  margin: 0;
  padding: 0;
}
.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple-900);
  border: 1px solid var(--purple-400);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 2;
}
.range-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple-900);
  border: 1px solid var(--purple-400);
  cursor: pointer;
  pointer-events: all;
}
.range-track {
  position: absolute;
  height: 6px;
  top: 5px;
  background: var(--neutral-700);
  border-radius: 999px;
  width: 100%;
}
.range-fill {
  position: absolute;
  height: 6px;
  top: 5px;
  background: var(--purple-400);
  border-radius: 999px;
}
.age-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.age-input {
  background: var(--neutral-700);
  border: 1px solid var(--neutral-600);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  text-align: center;
  width: 72px;
  font-family: 'Heebo', sans-serif;
}
.age-to {
  font-size: 12px;
  color: var(--neutral-600);
}

/* Checkboxes */
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  font-size: 12px;
  color: var(--neutral-400);
  cursor: pointer;
}
.filter-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--neutral-700);
  border: 1px solid var(--neutral-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.filter-checkbox.checked {
  background: var(--purple-400);
  border-color: var(--purple-400);
}
.filter-checkbox.checked::after {
  content: '';
  width: 10px;
  height: 7px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(-45deg);
  margin-top: -2px;
}


/* ========== CUSTOM SCROLLBAR ========== */
/* Thin dark scrollbar for content areas.
   Apply to any scroll container by adding the class or targeting directly. */
.content-area::-webkit-scrollbar,
.upgrade-right::-webkit-scrollbar { width: 4px; }
.content-area::-webkit-scrollbar-thumb,
.upgrade-right::-webkit-scrollbar-thumb { background: var(--neutral-700); border-radius: 4px; }


/* ========== RESPONSIVE — MOBILE (<=768px) ========== */
@media (max-width: 768px) {
  body { flex-direction: column; }

  /* Sidebar — off-canvas */
  .sidebar {
    position: fixed;
    left: -237px;
    top: 0;
    z-index: 100;
    transition: left 0.3s ease;
  }
  .sidebar.open { left: 0; }
  .sidebar.collapsed { left: -72px; width: 72px; min-width: 72px; }
  .sidebar.collapsed.open { left: 0; }
  .sidebar-overlay.show { display: block; }

  .mobile-menu-btn { display: block; }

  /* Topbar adjustments */
  .topbar { 
    flex-wrap: nowrap; 
    gap: 8px; 
    padding: 12px;
  }
  .topbar-title { display: none; } /* Hide page title on mobile */
  
  /* Mobile menu on left */
  .mobile-menu-btn { 
    flex-shrink: 0;
    margin-right: auto; /* Push everything else to the right */
  }
  
  /* Credits and profile stay together on right */
  .credits-box { flex-shrink: 0; }
  .profile-box { flex-shrink: 0; margin-left: 0; }
  
  /* Hide Buy Credits button on mobile */
  .btn-buy-desktop { display: none !important; }
  
  /* Content area — stack */
  .content-area {
    flex-direction: column;
    padding: 0 12px 12px;
  }
  
  /* Main col — remove right margin on mobile */
  .main-col {
    margin-right: 0;
  }
  
  /* Filters — hidden on mobile, toggles inline */
  .filters-panel {
    display: none;
    width: 100%;
    position: static;
    max-height: none;
    right: auto;
    top: auto;
  }
  .filters-panel.show {
    display: flex;
  }
  .mobile-filter-btn {
    display: flex;
  }
  
  /* Banner */
  .banner-slide {
    flex-direction: column;
  }
  .banner-content {
    width: 100%;
    padding: 24px;
  }
  .banner-image {
    height: 180px;
  }
  
  /* Characters header */
  .chars-header {
    flex-direction: column;
    gap: 8px;
  }
  .search-box {
    width: 100%;
  }
}

/* Show Buy Credits button on desktop */
@media (min-width: 769px) {
  .btn-buy-desktop { display: block !important; }
}


/* ========================================================================
   DASHBOARD MODALS
   Username, 18+ age-gate, and Upgrade modals (from dashboard.html)
   ======================================================================== */


/* ========== USERNAME MODAL ========== */
.username-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.username-overlay.show { display: flex; }

.username-modal {
  background: #000;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.username-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
  overflow: hidden;
}
.username-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/username-header-bg.png') center/cover no-repeat;
  opacity: 0.6;
  pointer-events: none;
}
.username-header > * { position: relative; z-index: 1; }
.username-header-icon { width: 32px; height: 32px; }
.username-header h3 { font-size: 18px; font-weight: 500; line-height: 24px; margin: 0; }
.username-header p { font-size: 12px; color: #fff; line-height: 16px; margin: 0; }

.username-body {
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.username-field { width: 100%; display: flex; flex-direction: column; gap: 24px; }
.username-input-group { display: flex; flex-direction: column; gap: 4px; }
.username-input-group label { font-size: 12px; color: #fff; padding: 0 8px; line-height: 16px; }

.username-input {
  width: 100%;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-family: 'Heebo', sans-serif;
  font-size: 12px;
  line-height: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.username-input::placeholder { color: var(--neutral-500); }
.username-input:focus { border-color: var(--purple-400); }

.username-rules {
  background: var(--purple-900);
  border: 1px solid var(--purple-800);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.username-rules-title { font-size: 12px; font-weight: 600; color: var(--purple-400); line-height: 16px; }

.username-rule {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--purple-800);
  font-size: 12px;
  line-height: 16px;
}
.username-rule:last-child { border-bottom: none; }
.username-rule img { width: 16px; height: 16px; flex-shrink: 0; }
.username-rule.pass { color: #56FFA4; }
.username-rule.neutral { color: var(--purple-400); }

.btn-save-username {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 2px 20px rgba(255, 255, 255, 0.56);
  transition: background 0.2s;
}
.btn-save-username:hover { background: #eee; }


/* ========== 18+ AGE-GATE MODAL ========== */
.age-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1001;
  align-items: center;
  justify-content: center;
}
.age-overlay.show { display: flex; }

.age-modal {
  background: #000;
  border: 1px solid #571626;
  border-radius: 16px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.age-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
  background: linear-gradient(to bottom, #2b0912, #571626);
}
.age-header-icon { width: 32px; height: 32px; }
.age-header h3 { font-size: 18px; font-weight: 500; line-height: 24px; color: #FFA4B9; margin: 0; }
.age-header p { font-size: 12px; color: #FFA4B9; line-height: 16px; margin: 0; }

.age-body {
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.age-content { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.age-text { font-size: 12px; line-height: 16px; color: var(--neutral-400); white-space: pre-line; }

.age-links { display: flex; gap: 8px; width: 100%; }
.age-link-btn {
  flex: 1;
  background: var(--neutral-700);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  color: #fff;
  font-family: 'Heebo', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.age-link-btn:hover { background: var(--neutral-600); }

.btn-age-confirm {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 2px 20px rgba(255, 255, 255, 0.56);
  transition: background 0.2s;
}
.btn-age-confirm:hover { background: #eee; }


/* ========== UPGRADE MODAL ========== */
.upgrade-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1002;
  align-items: center;
  justify-content: center;
}
.upgrade-overlay.show { display: flex; }

.upgrade-modal {
  background: #000;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  width: 720px;
  max-width: 92vw;
  max-height: 90vh;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  display: flex;
}

/* Upgrade — left panel */
.upgrade-left {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 32px 16px;
}
.upgrade-left-bg { position: absolute; inset: 0; background: #be78ff; z-index: 0; }
.upgrade-left-bg img {
  position: absolute;
  width: 172%;
  height: 292%;
  top: -96%;
  left: -36%;
  opacity: 0.9;
}
.upgrade-left-girl {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(calc(-50% - 24px));
  width: 509px;
  height: 963px;
  object-fit: cover;
  opacity: 0.4;
  mix-blend-mode: plus-lighter;
  z-index: 1;
  pointer-events: none;
}
.upgrade-left > * { position: relative; z-index: 2; }
.upgrade-logo { height: 40px; }
.upgrade-left-text { text-align: center; padding: 0 32px; }
.upgrade-left-text h2 { font-size: 40px; font-weight: 500; line-height: 40px; margin: 0 0 16px; }
.upgrade-left-text p { font-size: 14px; line-height: 20px; color: #fff; margin: 0; }
.upgrade-dots { display: flex; gap: 8px; justify-content: center; }
.upgrade-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
.upgrade-dot.active { background: #fff; }

/* Upgrade — right panel */
.upgrade-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 40px 24px;
  overflow-y: auto;
}
.upgrade-right::-webkit-scrollbar { width: 4px; }
.upgrade-right::-webkit-scrollbar-thumb { background: var(--neutral-700); border-radius: 4px; }

.upgrade-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}
.upgrade-header h3 { font-size: 18px; font-weight: 500; line-height: 24px; margin: 0; }
.upgrade-header p { font-size: 12px; line-height: 16px; color: var(--neutral-400); margin: 0; }
.upgrade-header .green { color: #56FFA4; }

.upgrade-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--purple-400);
  border-radius: 4px;
  padding: 2px 6px 2px 2px;
  font-size: 12px;
  color: var(--purple-900);
}
.upgrade-premium-badge img { width: 16px; height: 16px; }

.upgrade-features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.upgrade-feature {
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.upgrade-feature img { width: 24px; height: 24px; }
.upgrade-feature span { font-size: 14px; line-height: 20px; }

.upgrade-badges { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upgrade-badges-row { display: flex; gap: 8px; }
.upgrade-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--purple-900);
  border: 1px solid var(--purple-800);
  border-radius: 4px;
  padding: 2px 6px 2px 2px;
  font-size: 12px;
  color: var(--purple-400);
}
.upgrade-badge img { width: 16px; height: 16px; }

.upgrade-actions { display: flex; gap: 16px; }
.btn-upgrade-close {
  background: var(--neutral-700);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-upgrade-close:hover { background: var(--neutral-600); }

.btn-upgrade-cta {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 20px rgba(255, 255, 255, 0.56);
  transition: background 0.2s;
}
.btn-upgrade-cta:hover { background: #eee; }

/* Upgrade modal — mobile */
@media (max-width: 768px) {
  .upgrade-modal { flex-direction: column; max-height: 90vh; }
  .upgrade-left { min-height: 200px; padding: 24px 16px; }
  .upgrade-left-text h2 { font-size: 28px; line-height: 32px; }
  .upgrade-right { max-height: 60vh; }
}


/* ========== CHARACTER CARDS GRID ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.char-card {
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  padding: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.char-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.char-card-img {
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

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

.char-card-badges {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 2px;
}

.char-badge {
  background: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.char-badge-icon {
  width: 12px;
  height: 12px;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.gfLocation {
  width: 20px !important;
  height: auto;
  filter: invert(1);
  flex-shrink: 0;
}

.char-roleplay-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgb(255 255 255 / 80%);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  color: #000000;
  text-transform: capitalize;
  border: 1px solid rgb(44 44 44 / 17%);
}

.char-card-info {
  padding: 8px 12px 16px;
}

.char-card-name {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  margin-bottom: 4px;
}

.char-card-name a {
  color: #fff;
  text-decoration: none;
}

.char-card-name a:hover {
  color: var(--purple-400);
}

.char-card-hobbies {
  font-size: 12px;
  color: var(--neutral-400);
  line-height: 16px;
  height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ========== CHARACTER FILTERS ========== */
.character-filters {
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
}

.filter-toggle {
  display: none;
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  align-items: center;
  justify-content: space-between;
  font-family: 'Heebo', sans-serif;
}

.filter-toggle img {
  width: 20px;
  height: 20px;
}

.filter-badge {
  background: var(--purple-700);
  color: #fff;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.filter-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-content.collapsed {
  display: none;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-400);
}

.filter-section-title img {
  width: 20px;
  height: 20px;
}

.filter-divider {
  height: 1px;
  background: var(--neutral-700);
}

/* Age Range Slider */
.age-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--neutral-500);
}

.range-slider {
  position: relative;
  width: 100%;
  height: 16px;
}

.range-slider input[type="range"] {
  -webkit-appearance: none;
  position: absolute;
  width: 100%;
  height: 6px;
  background: none;
  pointer-events: none;
  top: 5px;
  margin: 0;
  padding: 0;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple-900);
  border: 1px solid var(--purple-400);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 2;
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple-900);
  border: 1px solid var(--purple-400);
  cursor: pointer;
  pointer-events: all;
}

.range-track {
  position: absolute;
  height: 6px;
  top: 5px;
  background: var(--neutral-700);
  border-radius: 999px;
  width: 100%;
}

.range-fill {
  position: absolute;
  height: 6px;
  top: 5px;
  background: var(--purple-400);
  border-radius: 999px;
}

/* Category Pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill {
  background: var(--neutral-700);
  border: 1px solid var(--neutral-600);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--neutral-400);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Heebo', sans-serif;
}

.category-pill:hover {
  background: var(--neutral-600);
  border-color: var(--neutral-500);
}

.category-pill.active {
  background: var(--purple-700);
  border-color: var(--purple-400);
  color: #fff;
}

/* Filter Actions */
.filter-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--neutral-700);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
  transition: background 0.2s ease;
}

.btn-reset:hover {
  background: var(--neutral-600);
}

.btn-reset img {
  width: 16px;
  height: 16px;
}


/* ========== SKELETON LOADING ========== */
.skeleton {
  animation: shimmer 1.5s infinite;
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-image {
  width: 100%;
  height: 248px;
  border-radius: 12px;
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}


/* ========== CHATTERS CONTAINER ========== */
.chatters-container {
  width: 100%;
}

.chatters-header {
  margin-bottom: 24px;
}

.chatters-header h2 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
}

.chatters-header p {
  color: var(--neutral-400);
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state img {
  width: 120px;
  height: 120px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--neutral-400);
  font-size: 14px;
  margin-bottom: 16px;
}

.empty-state button {
  background: var(--purple-400);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
}

.error-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
}

.error-state p {
  color: var(--neutral-400);
  margin-bottom: 16px;
}

.error-state button {
  background: var(--purple-400);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
}

.loading-indicator {
  text-align: center;
  padding: 24px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--neutral-700);
  border-top-color: var(--purple-400);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet (<=1024px) */
/* ========== TABLET (<=1024px) ========== */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .filters-panel { width: 200px; }
  .main-col { margin-right: 216px; }
  .search-box { width: 220px; }
  .banner-content { width: 280px; padding: 24px; }
}

/* ========== MOBILE (<=768px) ========== */
@media (max-width: 768px) {
  body { flex-direction: column; }

  /* Sidebar — off-canvas */
  .sidebar {
    position: fixed;
    left: -237px;
    top: 0;
    z-index: 100;
    transition: left 0.3s ease;
  }
  .sidebar.open { left: 0; }
  .sidebar.collapsed { left: -72px; width: 72px; min-width: 72px; }
  .sidebar.collapsed.open { left: 0; }
  .sidebar-overlay.show { display: block; }

  .mobile-menu-btn { display: block; }

  /* Topbar - keep everything on one row */
  .topbar { flex-wrap: nowrap; gap: 8px; padding: 12px; }
  .topbar-title { display: none; }
  .credits-box { 
    margin-left: auto; 
    gap: 8px;
    padding: 4px 8px 4px 10px;
  }
  .credits-box .btn-buy { 
    padding: 6px 12px;
    font-size: 11px;
  }
  .credits-amount {
    font-size: 14px;
  }
  .profile-box { margin-left: 0; }

  /* Content area — stack */
  .content-area { flex-direction: column; padding: 0 12px 12px; }

  /* Main col — remove right margin on mobile */
  .main-col { margin-right: 0; }

  /* Filters — hidden on mobile, toggles inline */
  .filters-panel {
    display: none;
    width: 100%;
    position: static;
    max-height: none;
    right: auto;
    top: auto;
  }
  .filters-panel.show { display: flex; }
  .mobile-filter-btn { display: flex; }

  /* Banner - keep row direction on mobile */
  .banner-slide { 
    flex-direction: row !important;
    min-height: 220px;
  }
  .banner-content { 
    width: 45%;
    padding: 20px 16px;
    gap: 16px;
    justify-content: center;
  }
  .banner-title {
    font-size: 18px;
    line-height: 24px;
    margin: 0;
  }
  .banner-desc {
    font-size: 12px;
    line-height: 16px;
    margin: 0;
  }
  .btn-generate {
    font-size: 12px;
    padding: 8px 16px;
  }
  .banner-image { 
    width: 55%;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .banner-image img {
    object-fit: contain;
    object-position: right center;
  }

  /* Cards — 2 columns */
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Search */
  .chars-header { 
    flex-wrap: wrap;
    gap: 12px; 
  }
  .search-box { 
    width: 100%;
    order: 3;
  }
  
  /* Model type buttons on mobile */
  .model-type-buttons {
    width: 100%;
    order: 2;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
  }
  .model-type-buttons::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    height: 40px;
    padding: 4px 16px;
    flex-shrink: 0;
  }
  .filter-pill-name {
    font-size: 12px;
  }
  .mobile-filter-btn {
    order: 1;
    margin-left: auto;
  }
}

/* ========== SMALL MOBILE (<=480px) ========== */
@media (max-width: 480px) {
  .topbar-title { font-size: 18px; }
  .credits-box { justify-content: space-between; }
}


/* ================================================================
   LEGAL PAGES — Styles for legal content within BonzaUI layout
   These override the old techwave_fn_* wrapper classes so existing
   React legal components render correctly inside bn-index-public.
   ================================================================ */

/* Reset techwave wrappers to be transparent */
.techwave_fn_content,
.techwave_fn_page,
.techwave_fn_doc_page,
.docpage {
  all: unset;
  display: block;
}

/* Page title */
.techwave_fn_pagetitle {
  margin-bottom: 32px;
}
.techwave_fn_pagetitle .title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}
.techwave_fn_pagetitle p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--purple-400);
  background: var(--purple-900);
  border: 1px solid var(--purple-700);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 4px 0;
  line-height: 1.4;
}
/* Clock icon injected via ::before */
.techwave_fn_pagetitle p::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: var(--purple-400);
  border-radius: 50%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.techwave_fn_pagetitle p strong {
  color: var(--purple-300);
  font-weight: 500;
}

/* Document content area */
.doccontent {
  color: var(--neutral-300);
  font-size: 14px;
  line-height: 1.7;
}
.doccontent .container.small {
  max-width: 820px;
  margin: 0;
  padding: 0;
}
.doccontent h4 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 32px 0 12px 0;
  line-height: 1.4;
}
.doccontent h5 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 24px 0 8px 0;
  line-height: 1.4;
}
.doccontent p {
  margin: 0 0 12px 0;
  color: var(--neutral-300);
}
.doccontent a {
  color: var(--purple-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doccontent a:hover {
  color: var(--purple-300);
}
.doccontent strong {
  color: #fff;
  font-weight: 600;
}
.doccontent ul,
.doccontent ol {
  padding-left: 24px;
  margin: 0 0 16px 0;
}
.doccontent li {
  margin-bottom: 8px;
  color: var(--neutral-300);
}
.doccontent li strong {
  color: #fff;
}
.doccontent table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.doccontent table th,
.doccontent table td {
  border: 1px solid var(--neutral-700);
  padding: 10px 14px;
  text-align: left;
}
.doccontent table th {
  background: var(--neutral-800);
  color: #fff;
  font-weight: 600;
}
.doccontent table td {
  color: var(--neutral-300);
}

/* Legal page wrapper — max width + padding */
.bn-legal-page {
  max-width: 860px;
  padding: 24px 16px 64px;
}

/* Legal hub page */
.bn-legal-hub {
  max-width: 860px;
  padding: 24px 16px 64px;
}
.bn-legal-hub h1 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
}
.bn-legal-hub .legal-hub-subtitle {
  font-size: 14px;
  color: var(--neutral-400);
  margin: 0 0 32px 0;
}
.bn-legal-hub .legal-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bn-legal-hub .legal-hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.bn-legal-hub .legal-hub-card:hover {
  border-color: var(--purple-400);
  background: #1a1a1a;
}
.bn-legal-hub .legal-hub-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--purple-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bn-legal-hub .legal-hub-card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--purple-400);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bn-legal-hub .legal-hub-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bn-legal-hub .legal-hub-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.bn-legal-hub .legal-hub-card-desc {
  font-size: 12px;
  color: var(--neutral-500);
}

@media (max-width: 600px) {
  .bn-legal-hub .legal-hub-grid {
    grid-template-columns: 1fr;
  }
  .bn-legal-page { padding: 16px 12px 48px; }
  .bn-legal-hub { padding: 16px 12px 48px; }
  .techwave_fn_pagetitle .title { font-size: 22px; }
  .doccontent h4 { font-size: 16px; }
}

/* ================================================================
   Chat lock screen (ChatLockGate / LockScreen)
   Loaded globally from bn_style.css because the gate appears on both
   /chat/* (has bn_chat.css) and /my-chats (has bn_my-chats.css). A
   shared stylesheet avoids duplicate rules + ensures the lock always
   looks the same regardless of which page-specific CSS is active.

   The lock is a local screen lock, NOT encryption. Covers only the
   .main-content area (which is position:relative above) so the
   sidebar stays accessible for the user to reach Settings.
   ================================================================ */
.chat-lock-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(
    ellipse at center,
    rgba(18, 18, 24, 0.95) 0%,
    rgba(0, 0, 0, 0.98) 70%
  );
  z-index: 50;
  animation: chat-lock-fadein 0.25s ease-out;
  box-sizing: border-box;
}

@keyframes chat-lock-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chat-lock-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 24px 24px;
  background: var(--neutral-900, #111);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.chat-lock-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--purple-900, #2b1540);
  color: var(--purple-400, #b388ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-lock-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  color: #fff;
}

.chat-lock-desc {
  margin: 0 0 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--neutral-400);
}

.chat-lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.chat-lock-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-align: center;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}

.chat-lock-input::placeholder {
  color: var(--neutral-500);
  letter-spacing: 0;
}

.chat-lock-input:focus {
  background: var(--neutral-700);
  border-color: var(--purple-400, #b388ff);
}

.chat-lock-error {
  color: #ff8a9a;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.chat-lock-btn {
  width: 100%;
  padding: 12px;
  background: var(--purple-500, #9a4dff);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.chat-lock-btn:hover:not(:disabled) {
  background: var(--purple-400, #b388ff);
}

.chat-lock-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-lock-forgot {
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--purple-400, #b388ff);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
}

.chat-lock-forgot:hover {
  text-decoration: underline;
}

.chat-lock-hint {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--neutral-500);
}
