:root {
  --bg: #0b0a0f; --panel: #14121a; --border: #2a2233;
  --accent: #ff4d9a; --accent2: #b44dff; --text: #f5eef5; --muted: #a89bb0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(255,77,154,.12), transparent);
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(11,10,15,.92); backdrop-filter: blur(10px); z-index: 20;
}
.logo { font-family: Orbitron, sans-serif; font-weight: 700; color: var(--text); text-decoration: none; font-size: .95rem; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.badge { font-size: .7rem; padding: 4px 8px; border-radius: 10px; background: rgba(255,77,154,.15); color: var(--accent); }
.btn {
  border: none; border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-size: .85rem;
}
.btn.small { padding: 7px 10px; font-size: .78rem; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.btn.block { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.layout { display: flex; height: calc(100vh - 52px); height: calc(100dvh - 52px); }
.drawer {
  width: 300px; border-right: 1px solid var(--border); background: var(--panel);
  display: flex; flex-direction: column; padding: 12px; gap: 10px;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
#search, #countryFilter, #input, #authEmail, #authPass, #authName {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--text); outline: none; font-size: .9rem;
}
#search:focus, #input:focus { border-color: var(--accent); }
.char-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.char-item {
  display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; text-align: left; background: transparent; color: var(--text);
}
.char-item:hover, .char-item.active { border-color: var(--accent); background: rgba(255,77,154,.08); }
.char-item .av {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-size: .85rem; font-weight: 700; flex-shrink: 0;
}
.char-item .meta { font-size: .72rem; color: var(--muted); }
.char-item .lock { font-size: .65rem; color: var(--accent); }

.chat-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.girl-bar {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.girl-avatar-sm {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-weight: 700;
}
.girl-name { font-weight: 600; }
.girl-meta { font-size: .75rem; color: var(--muted); }
.messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 85%; }
.msg.user { align-self: flex-end; }
.msg .bubble {
  padding: 10px 14px; border-radius: 14px; font-size: .92rem; line-height: 1.45;
  background: #1c1522; border: 1px solid var(--border);
}
.msg.user .bubble { background: #2a1830; border-color: #3d2a45; }
.msg .time { font-size: .65rem; color: var(--muted); margin-top: 4px; }
.composer { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.composer input { flex: 1; }
.gestures {
  display: flex; gap: 6px; padding: 0 12px 12px; overflow-x: auto;
}
.gestures button {
  background: #1a1520; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; color: var(--text);
}
.gestures button.cam { font-size: .75rem; font-weight: 600; }
.paywall {
  margin: 12px; padding: 20px; border-radius: 16px; text-align: center;
  background: rgba(255,77,154,.08); border: 1px solid rgba(255,77,154,.3);
}
.paywall h3 { margin-bottom: 8px; }
.paywall p { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.paywall .btn { margin: 4px; display: inline-block; }
.hidden { display: none !important; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); display: grid; place-items: center;
  z-index: 50; padding: 16px;
}
.modal-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; width: min(400px, 100%); display: flex; flex-direction: column; gap: 10px;
}
.modal-card h2, .modal-card h3 { font-family: Orbitron, sans-serif; font-size: 1.1rem; }
.link { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .85rem; }
.cam-box { position: relative; aspect-ratio: 4/3; background: #000; border-radius: 12px; overflow: hidden; }
.cam-box video, .cam-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.hint { font-size: .75rem; color: var(--muted); }

/* Mobile */
@media (max-width: 800px) {
  .drawer {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(320px, 88vw);
    transform: translateX(-105%); transition: transform .25s ease;
  }
  .drawer.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,.5); }
  #closeDrawer { display: inline-block; }
}
@media (min-width: 801px) {
  #btnMenu, #closeDrawer { display: none; }
}

/* photos */
.char-item .av, .girl-avatar-sm { overflow: hidden; }
.girl-bar { flex-wrap: wrap; }
.girl-gallery { display: flex; gap: 6px; overflow-x: auto; flex-basis: 100%; padding-top: 6px; }
.girl-gallery img { height: 64px; width: 48px; object-fit: cover; border-radius: 8px; cursor: pointer; flex: none; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 12px; }
