/* ============================================================
   PeachPop – Custom CSS (pixel-perfect clone)
   ============================================================ */

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Scrollbar ── */
.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

.custom-scrollbar { scrollbar-width: thin; scrollbar-color: #1e293b #0b0f19; }
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #0b0f19; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #1e2a3a; border-radius: 9999px; }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 244px;
  background-color: #030712;
  border-right: 1px solid #111827;
  overflow: hidden;
}

/* ── Sidebar nav items ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 3rem;
  padding: 0.625rem 0.75rem;
  border-radius: 9999px;
  color: #fff;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
  font-weight: 400;
}
.nav-item:hover { background-color: rgba(16, 24, 40, 0.5); }
.nav-item.active { font-weight: 600; }
.nav-item svg { flex-shrink: 0; }

/* ── Create button ── */
.create-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 3rem;
  padding: 0.625rem 0.75rem;
  border-radius: 9999px;
  background-color: #101828;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  outline: 2px solid #f53e3e;
  outline-offset: 0px;
  box-shadow: 0 4px 16px rgba(245, 62, 62, 0.3);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.create-btn:hover {
  background-color: #1e2939;
  box-shadow: 0 4px 20px rgba(245, 62, 62, 0.4);
}

/* ── Main layout offset ── */
.main-wrap {
  margin-left: 244px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar (sticky, per page) ── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background-color: rgba(3, 7, 18, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #101828;
  height: 56px;
}
.top-bar-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
}
.top-bar-icon {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.4rem;
  background-color: rgba(245, 62, 62, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f53e3e;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Unfiltered toggle ── */
.unfiltered-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  border-radius: 9999px;
  background-color: rgba(245, 62, 62, 0.15);
  border: 1px solid rgba(245, 62, 62, 0.3);
  color: #f53e3e;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}
.unfiltered-toggle:hover { background-color: rgba(245, 62, 62, 0.22); }
.toggle-knob {
  width: 28px;
  height: 16px;
  border-radius: 9999px;
  background-color: #f53e3e;
  position: relative;
  transition: background-color 0.2s;
}
.toggle-knob::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background-color: #fff;
}

/* ── Auth buttons ── */
.btn-login {
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 9999px;
  transition: background-color 0.15s;
}
.btn-login:hover { background-color: rgba(255,255,255,0.07); }

.btn-join {
  padding: 0.4rem 1rem;
  background-color: #f53e3e;
  border: none;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 9999px;
  transition: background-color 0.15s, transform 0.15s;
}
.btn-join:hover { background-color: #e03535; transform: translateY(-1px); }

/* ── Announcement bar ── */
.announcement-bar {
  background-color: #0a0505;
  border-bottom: 1px solid #1a0808;
  padding: 0.4rem 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
}
.announcement-bar a {
  color: #f53e3e;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.announcement-bar a:hover { color: #ff6060; }

/* ── Promo banner ── */
.promo-banner {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0000 0%, #2d0505 40%, #1a0808 100%);
  min-height: 160px;
  display: flex;
  align-items: center;
}
.promo-banner-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://picsum.photos/seed/cherrybanner/900/200');
  background-size: cover;
  background-position: center;
  filter: brightness(0.25) saturate(1.4);
}
.promo-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,0,0,0.95) 0%, rgba(10,0,0,0.7) 50%, transparent 100%);
}

/* ── Filter row ── */
.filter-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background-color: #0d1117;
  border: 1px solid #1e2a3a;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
}
.filter-dropdown:hover { border-color: #334155; }

/* ── Category tabs ── */
.cat-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 0.375rem;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
  white-space: nowrap;
  background: transparent;
  border: none;
}
.cat-tab:hover { color: #e2e8f0; }
.cat-tab.active {
  background-color: #f53e3e;
  color: #fff;
  font-weight: 600;
  border-radius: 0.375rem;
}

/* ── Character card ── */
.char-card {
  position: relative;
  height: 400px;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #101828;
  background-color: #0d1117;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
}
.char-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.2);
}
.char-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.char-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 0.75rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
}
.char-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.char-name .char-age {
  font-size: 0.8rem;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 0.25rem;
}
.char-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.char-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: #64748b;
}
.char-stats span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.char-creator {
  margin-left: auto;
  font-size: 0.7rem;
  color: #475569;
}

/* ── "Get Free Peaches" button ── */
.btn-cherries {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #f53e3e 0%, #e02020 100%);
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(245, 62, 62, 0.3);
}
.btn-cherries:hover { opacity: 0.92; transform: translateY(-1px); }

/* ── Affiliate link ── */
.affiliate-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 0.25rem;
  transition: opacity 0.15s;
}
.affiliate-link:hover { opacity: 0.8; }
.affiliate-link .dollar { color: #22c55e; }

/* ── Sidebar footer links ── */
.sidebar-foot-link {
  color: #475569;
  font-size: 0.7rem;
  text-decoration: none;
  transition: color 0.15s;
}
.sidebar-foot-link:hover { color: #94a3b8; }

/* ── Chat layout ── */
.chat-icon-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  background-color: #030712;
  border-right: 1px solid #111827;
  padding: 1rem 0;
}
.chat-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s;
  border: none;
  background: transparent;
}
.chat-icon-btn:hover { background-color: rgba(16, 24, 40, 0.5); }
.chat-icon-btn.active { color: #f53e3e; }
.chat-icon-btn.create-icon-btn {
  background-color: #101828;
  outline: 2px solid #f53e3e;
  outline-offset: 0;
}

.chat-conv-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 64px;
  width: 280px;
  background-color: #0a0d14;
  border-right: 1px solid #101828;
  display: flex;
  flex-direction: column;
}
.chat-main-wrap {
  margin-left: 344px; /* 64 + 280 */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Generate left panel ── */
.gen-panel {
  width: 244px;
  min-width: 244px;
  background-color: #0a0d14;
  border-right: 1px solid #101828;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ── Profile section ── */
.cherry-coin-card {
  background-color: #0d1117;
  border: 1px solid #101828;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

/* ── Pose/Outfit/Background chips ── */
.scene-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid #1e2a3a;
  background-color: #0d1117;
  color: #94a3b8;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.scene-chip:hover { border-color: #334155; color: #e2e8f0; }

/* ── Input / Textarea ── */
.dark-input {
  width: 100%;
  background-color: #0d1117;
  border: 1px solid #1e2a3a;
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.dark-input::placeholder { color: #475569; }
.dark-input:focus { border-color: #334155; }

/* ── Generate button ── */
.btn-generate {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #f53e3e 0%, #e02020 100%);
  padding: 0.75rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(245, 62, 62, 0.35);
}
.btn-generate:hover { opacity: 0.92; transform: translateY(-1px); }

/* ── Gallery tab ── */
.gallery-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.375rem;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: color 0.15s, background-color 0.15s;
}
.gallery-tab:hover { color: #e2e8f0; }
.gallery-tab.active {
  background-color: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── Profile sign-up card ── */
.signup-card {
  background-color: #0d1117;
  border: 1px solid #101828;
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.btn-signup-big {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #f53e3e 0%, #e02020 100%);
  padding: 0.85rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  box-shadow: 0 4px 16px rgba(245, 62, 62, 0.35);
}
.btn-signup-big:hover { opacity: 0.92; }

/* ── Mobile bottom nav (≤md) ── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  border-top: 1px solid #101828;
  background-color: #030712;
}
@media (max-width: 767px) {
  .sidebar { display: none; }
  .main-wrap { margin-left: 0; }
  .mobile-nav { display: flex; }
  .chat-icon-sidebar { display: none; }
  .chat-conv-panel { left: 0; width: 100%; }
  .chat-main-wrap { margin-left: 0; }
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.75rem 0.5rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  color: #fff;
  text-decoration: none;
  font-size: 0.6875rem;
  transition: color 0.15s;
  border: none;
  background: transparent;
  cursor: pointer;
}
.mobile-nav-item.active { color: #f53e3e; }

/* ── Search input ── */
.search-input-wrap {
  position: relative;
  padding: 0.75rem;
}
.search-input {
  width: 100%;
  background-color: #111827;
  border: 1px solid #1e2a3a;
  border-radius: 9999px;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: #475569; }
.search-input:focus { border-color: #334155; }
.search-icon {
  position: absolute;
  left: 1.35rem;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  pointer-events: none;
}

/* ── Skeleton ── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.skeleton {
  background-color: #111827;
  border-radius: 0.375rem;
  animation: pulse 1.8s ease-in-out infinite;
}
