:root {
  --bg: #0a0a0c;
  --bg2: #121216;
  --card: #1a1a1f;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --pink: #ff4d8d;
  --pink-hot: #ff2d6f;
  --pink-soft: rgba(255, 77, 141, 0.15);
  --line: rgba(255,255,255,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; transition: 0.15s ease;
}
.btn-primary {
  background: var(--pink); color: #fff;
  box-shadow: 0 0 0 1px rgba(255,77,141,0.35), 0 8px 24px rgba(255,77,141,0.2);
}
.btn-primary:hover { background: var(--pink-hot); }
.btn-secondary {
  background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--ink);
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.04); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

#age-gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.gate-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 2.5rem 2rem; text-align: center; max-width: 380px; width: 100%;
}
.gate-card h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.75rem; }
.gate-card h1 span { color: var(--pink); }
.gate-card .muted { color: var(--muted); margin: 0.5rem 0 1.5rem; }
.gate-btns { display: flex; flex-direction: column; gap: 0.6rem; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(10,10,12,0.9);
  backdrop-filter: blur(12px); z-index: 40;
}
.logo { font-weight: 800; font-size: 1.2rem; }
.logo span { color: var(--pink); }
.nav-links { display: flex; gap: 0.35rem; }
.nav-btn {
  color: var(--muted); padding: 0.4rem 0.75rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500;
}
.nav-btn:hover, .nav-btn.active { color: var(--ink); background: rgba(255,255,255,0.06); }

.view { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #ff4d8d, #ff8fb3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--muted); max-width: 520px; margin: 0 auto 1.75rem; font-size: 1.1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 1rem; }
.trust { font-size: 0.85rem; color: var(--muted); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.section-head h2 { font-size: 1.3rem; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.filter {
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.8rem;
}
.filter:hover, .filter.active { color: var(--ink); border-color: var(--pink); background: var(--pink-soft); }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; cursor: pointer; transition: 0.15s;
}
.card:hover { border-color: rgba(255,77,141,0.45); transform: translateY(-2px); }
.card .img {
  aspect-ratio: 3/4; background: linear-gradient(145deg, #2a1a24, #1a1a22);
  background-size: cover; background-position: center;
  position: relative; display: flex; align-items: flex-end;
}
.card .img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent 55%);
}
.card .badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--pink); color: #fff; font-size: 0.65rem; font-weight: 700;
  padding: 0.15rem 0.4rem; border-radius: 4px;
}
.card .meta { position: absolute; bottom: 10px; left: 10px; right: 10px; z-index: 2; }
.card .name { font-weight: 700; font-size: 0.95rem; }
.card .tag { font-size: 0.75rem; color: rgba(255,255,255,0.7); }
.card .body { padding: 0.65rem; }
.card .action {
  display: block; text-align: center; background: var(--pink-soft); color: var(--pink);
  font-size: 0.8rem; font-weight: 600; padding: 0.4rem; border-radius: 8px;
}
.card:hover .action { background: var(--pink); color: #fff; }

.create-wrap { max-width: 480px; margin: 0 auto; }
.create-wrap h2 { margin-bottom: 1.25rem; font-size: 1.4rem; }
#create-form label {
  display: block; margin-bottom: 1rem; font-size: 0.9rem; font-weight: 500;
}
#create-form input, #create-form select, #create-form textarea {
  display: block; width: 100%; margin-top: 0.35rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.85rem; outline: none;
}
#create-form input:focus, #create-form select:focus, #create-form textarea:focus {
  border-color: var(--pink);
}
.optional { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.check { display: flex !important; align-items: center; gap: 0.6rem; font-weight: 400 !important; }
.check input { width: auto !important; margin: 0 !important; }

.chat-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  min-height: 520px; background: var(--bg2);
}
.chat-sidebar {
  border-right: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.chat-sidebar h3 { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
#chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.35rem; }
.chat-item {
  padding: 0.6rem 0.75rem; border-radius: 10px; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.chat-item:hover, .chat-item.active { background: var(--pink-soft); color: var(--pink); }
.chat-main { display: flex; flex-direction: column; }
.chat-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 0.65rem;
}
#chat-header-info { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.btn-call, .btn-mic {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
  background: var(--card); border: 1px solid var(--line);
}
.btn-call:hover, .btn-mic:hover { border-color: var(--pink); color: var(--pink); }
.btn-mic.listening { background: var(--pink-soft); border-color: var(--pink); color: var(--pink); animation: pulse 1s ease-in-out infinite; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #2a1a24, #1a1a22); color: var(--pink);
  font-weight: 700; font-size: 0.85rem;
}
.chat-header .avatar { width: 36px; height: 36px; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.msg {
  max-width: 80%; padding: 0.7rem 1rem; border-radius: 14px; font-size: 0.95rem; line-height: 1.45;
}
.msg.user { align-self: flex-end; background: var(--pink); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.typing-indicator { display: flex; align-items: center; gap: 4px; padding: 0.85rem 1.1rem; }
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--pink-soft); }
  50% { box-shadow: 0 0 0 6px var(--pink-soft); }
}
.chat-input {
  display: flex; gap: 0.5rem; padding: 0.85rem 1rem; border-top: 1px solid var(--line);
}
.chat-input input {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.7rem 1rem; outline: none;
}
.chat-input input:focus { border-color: var(--pink); }

.call-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1.5rem;
}
.call-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 2.5rem 2rem; display: flex; flex-direction: column; align-items: center; gap: 0.85rem;
  max-width: 320px; width: 100%; text-align: center;
}
.call-avatar { width: 96px; height: 96px; }
.call-avatar .avatar { width: 96px; height: 96px; font-size: 2rem; }
.call-name { font-size: 1.2rem; font-weight: 700; }
.call-status { color: var(--muted); font-size: 0.9rem; min-height: 1.2em; }
.call-mic-btn {
  width: 76px; height: 76px; border-radius: 50%; margin: 0.5rem 0;
  background: var(--pink); color: #fff; font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(255,77,141,0.35);
}
.call-mic-btn:hover { background: var(--pink-hot); }
.call-mic-btn.listening { animation: pulse 1s ease-in-out infinite; }
.call-mic-btn.speaking { background: var(--pink-hot); animation: pulse 0.6s ease-in-out infinite; }
.call-end-btn { color: var(--muted); }

.settings-wrap { max-width: 520px; }
.settings-wrap h2 { margin-bottom: 1.5rem; }
.setting-group {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.25rem; margin-bottom: 1rem;
}
.setting-group h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.setting-group .muted { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; }
.toggle {
  display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.75rem; font-size: 0.95rem;
}
.toggle input { width: 18px; height: 18px; accent-color: var(--pink); }
.setting-group .btn { margin-top: 0.5rem; margin-right: 0.5rem; }

@media (max-width: 700px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { border-right: none; border-bottom: 1px solid var(--line); max-height: 160px; }
  .nav-links { gap: 0; }
  .nav-btn { padding: 0.35rem 0.5rem; font-size: 0.8rem; }
}
