*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #000000;
  --bg2:      #0a0a0a;
  --sidebar:  #080808;
  --surface:  rgba(255,255,255,0.04);
  --surf2:    rgba(255,255,255,0.08);
  --surf3:    rgba(255,255,255,0.12);
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(255,255,255,0.14);
  --accent:   #ffffff;
  --accent-dim: rgba(255,255,255,0.6);
  --green:    #a3e635;
  --danger:   #ff4444;
  --text:     #f5f5f5;
  --dim:      rgba(255,255,255,0.38);
  --mid:      rgba(255,255,255,0.65);
  --fd:       'Syne', sans-serif;
  --fb:       'DM Sans', sans-serif;
}

html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--fb); }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.auth-body { display: flex; align-items: center; justify-content: center;
             min-height: 100vh; overflow: hidden; position: relative; background: #000; }

.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridMove 30s linear infinite; z-index: 0;
}
@keyframes gridMove { to { transform: translate(48px, 48px); } }

.orb { position: fixed; border-radius: 50%; filter: blur(120px); opacity: 0.07;
       animation: floatOrb 10s ease-in-out infinite; z-index: 0; pointer-events: none; }
.orb1 { width:500px; height:500px; background:radial-gradient(circle,#fff,transparent); top:-150px; left:-150px; }
.orb2 { width:350px; height:350px; background:radial-gradient(circle,#fff,transparent); bottom:-100px; right:-100px; animation-delay:-4s; }
.orb3 { width:250px; height:250px; background:radial-gradient(circle,#fff,transparent); top:50%; left:60%; animation-delay:-7s; opacity:0.04; }
@keyframes floatOrb { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-30px)} }

.auth-wrap { position:relative; z-index:10; width:100%; max-width:440px; padding:20px; }

.auth-card {
  background: rgba(8,8,8,0.95);
  border: 1px solid var(--border2);
  border-radius: 20px; padding: 48px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: cardIn 0.4s cubic-bezier(.16,1,.3,1);
}
@keyframes cardIn { from{opacity:0;transform:translateY(16px) scale(.98)} to{opacity:1;transform:none} }

.step-card        { display: none; }
.step-card.active { display: flex; }
.step-card.center { justify-content: center; }

.logo { display:flex; align-items:center; gap:10px; }
.logo-icon {
  width:44px; height:44px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
}
.logo-icon img { display:block; width:100%; height:100%; object-fit:contain; }
.logo span { font-family:var(--fd); font-size:26px; font-weight:800; letter-spacing:-1.5px; color:#fff; }

h1 { font-family:var(--fd); font-size:34px; font-weight:800; line-height:1.15; letter-spacing:-1.5px; }
h2 { font-family:var(--fd); font-size:24px; font-weight:700; letter-spacing:-0.5px; }
h3 { font-family:var(--fd); font-size:20px; font-weight:700; }
.grad { color:#ffffff; }
.sub   { color:var(--dim); font-size:14px; line-height:1.6; }
.terms { color:var(--dim); font-size:12px; }
.alert { background:rgba(255,68,68,.1); border:1px solid rgba(255,68,68,.25);
         color:var(--danger); padding:10px 14px; border-radius:10px; font-size:13px; width:100%; }

.step-pip { display:flex; gap:6px; }
.pip { width:28px; height:3px; border-radius:4px; background:rgba(255,255,255,0.1); }
.pip.active { background:#fff; }
.pip.done   { background:rgba(255,255,255,0.5); }

.google-btn {
  display:flex; align-items:center; gap:12px; justify-content:center;
  width:100%; padding:14px 24px; border-radius:12px;
  background: var(--surface); border:1px solid var(--border2);
  color:var(--text); font-family:var(--fb); font-size:15px; font-weight:500;
  cursor:pointer; transition:all .2s;
}
.google-btn:hover { background:var(--surf2); border-color:rgba(255,255,255,0.25);
                    transform:translateY(-1px); box-shadow:0 8px 24px rgba(0,0,0,0.4); }

.field {
  width:100%; background:var(--surface); border:1px solid var(--border);
  color:var(--text); font-family:var(--fb); font-size:15px;
  padding:12px 14px; border-radius:10px; outline:none; transition:border .15s;
}
.field:focus { border-color:rgba(255,255,255,0.35); background:rgba(255,255,255,0.05); }
.field::placeholder { color:var(--dim); }
textarea.field { resize:none; }
.input-row { position:relative; width:100%; display:flex; align-items:center; }
.prefix { position:absolute; left:14px; color:var(--mid); font-size:17px; font-weight:600; }
.input-row .field { padding-left:30px; }
.hint { font-size:13px; min-height:18px; width:100%; text-align:left; }
.hint.ok  { color:var(--green); }
.hint.err { color:var(--danger); }

.primary-btn {
  width:100%; padding:13px; border-radius:10px;
  background:#fff;
  border:none; color:#000; font-family:var(--fb); font-size:15px; font-weight:700;
  cursor:pointer; transition:all .2s; letter-spacing:-0.3px;
}
.primary-btn:hover { background:#e8e8e8; transform:translateY(-1px); box-shadow:0 8px 24px rgba(255,255,255,0.12); }
.primary-btn:active { transform:translateY(0); }

.divider { width:100%; display:flex; align-items:center; gap:10px; }
.divider::before,.divider::after { content:''; flex:1; height:1px; background:var(--border); }
.divider span { color:var(--dim); font-size:12px; }

.err-msg { color:var(--danger); font-size:13px; }
.err-msg.hidden { display:none; }
.hidden { display:none !important; }

.spinner {
  width:44px; height:44px; border-radius:50%;
  border:2px solid rgba(255,255,255,0.1); border-top-color:#fff;
  animation:spin .7s linear infinite;
}
.spinner.hidden { display:none; }
@keyframes spin { to { transform:rotate(360deg); } }

.form-field { width:100%; margin-bottom:14px; text-align:left; }
.form-field label { display:block; font-size:12px; color:var(--dim); margin-bottom:6px; font-weight:500; text-transform:uppercase; letter-spacing:.5px; }

.app-body { display:flex; height:100vh; overflow:hidden; }

.sidebar {
  width:280px; height:100vh; background:var(--sidebar);
  border-right:1px solid var(--border);
  display:flex; flex-direction:column; flex-shrink:0; position:relative;
  z-index:20;
}

.sidebar-top { padding:14px 12px; display:flex; align-items:center;
               justify-content:space-between; border-bottom:1px solid var(--border); }
.logo-mini {
  display:flex; align-items:center; gap:8px;
  font-family:var(--fd); font-size:17px; font-weight:800; letter-spacing:-1px; color:#fff;
}
.logo-mini img { display:block; object-fit:contain; opacity:0.9; }

.connect-btn {
  display:flex; align-items:center; gap:6px;
  background:#fff;
  border:none; color:#000; font-family:var(--fb); font-size:12px; font-weight:700;
  padding:7px 13px; border-radius:8px; cursor:pointer; transition:all .2s;
  letter-spacing:-0.2px;
}
.connect-btn:hover { background:#e0e0e0; box-shadow:0 4px 12px rgba(255,255,255,0.1); }
.connect-btn.searching {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  animation: searchPulse 1.4s ease-in-out infinite;
}
@keyframes searchPulse { 0%,100%{opacity:1} 50%{opacity:.55} }

.search-row {
  margin:10px 10px 0; position:relative; display:flex; align-items:center;
}
.search-row svg { position:absolute; left:10px; color:var(--dim); }
.search-field {
  width:100%; background:var(--surface); border:1px solid var(--border);
  color:var(--text); font-family:var(--fb); font-size:13px;
  padding:8px 10px 8px 30px; border-radius:8px; outline:none; transition:border .15s;
}
.search-field:focus { border-color:rgba(255,255,255,0.2); }
.search-field::placeholder { color:var(--dim); }

.contacts-label { padding:13px 13px 5px; font-size:10px; font-weight:700;
                  letter-spacing:1px; color:var(--dim); text-transform:uppercase; }

.contacts-list { flex:1; overflow-y:auto; padding:4px 6px; }

.contact-item {
  display:flex; align-items:center; gap:10px;
  padding:9px 8px; border-radius:9px; cursor:pointer;
  transition:background .15s; text-decoration:none; color:var(--text);
  animation:slideIn .25s cubic-bezier(.16,1,.3,1);
}
@keyframes slideIn { from{opacity:0;transform:translateX(-8px)} to{opacity:1;transform:none} }
.contact-item:hover  { background:var(--surface); }
.contact-item.active { background:var(--surf2); }

.contact-av-wrap { position:relative; flex-shrink:0; }
.online-dot { position:absolute; bottom:1px; right:1px; width:8px; height:8px;
              border-radius:50%; background:var(--green); border:2px solid var(--sidebar); }
.contact-info { flex:1; min-width:0; }
.contact-name    { font-size:13px; font-weight:500; white-space:nowrap;
                   overflow:hidden; text-overflow:ellipsis; }
.contact-preview { font-size:11px; color:var(--dim); white-space:nowrap;
                   overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.contact-row-top { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; }
.contact-row-top .contact-name { flex:1; min-width:0; }
.contact-item.has-unread .contact-name { font-weight:700; color:var(--text); }
.contact-item.has-unread .contact-preview { color:var(--text); font-weight:500; }
.contact-unread-badge {
  flex-shrink:0; min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:#25d366; color:#000; font-size:10px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.new-messages-banner {
  display:flex; align-items:center; gap:8px; margin:6px 10px 0; padding:8px 10px;
  background:rgba(37,211,102,0.12); border:1px solid rgba(37,211,102,0.25); border-radius:8px;
}
.new-messages-dot { width:8px; height:8px; border-radius:50%; background:#25d366; flex-shrink:0; }
.new-messages-text { flex:1; font-size:12px; font-weight:600; color:#25d366; }
.unread-pill {
  min-width:20px; height:20px; padding:0 6px; border-radius:10px;
  background:#25d366; color:#000; font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.profile-avatar-wrap { position:relative; }
.profile-unread-dot {
  position:absolute; top:-2px; right:-2px; width:10px; height:10px;
  border-radius:50%; background:#25d366; border:2px solid var(--sidebar);
}

.empty-list { display:flex; flex-direction:column; align-items:center; justify-content:center;
              height:100%; gap:10px; color:var(--dim); font-size:13px; text-align:center;
              padding:20px; }

.profile-bar {
  padding:10px 12px; border-top:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  cursor:pointer; transition:background .15s;
}
.profile-bar:hover { background:var(--surface); }
.profile-bar-left { display:flex; align-items:center; gap:9px; }
.pbar-name { font-size:13px; font-weight:600; }
.pbar-user { font-size:11px; color:var(--dim); }
.pbar-icons { display:flex; gap:3px; }

.icon-btn { width:28px; height:28px; border-radius:6px; border:none;
            background:transparent; color:var(--dim); cursor:pointer;
            display:flex; align-items:center; justify-content:center; transition:all .15s; }
.icon-btn:hover { background:var(--surf2); color:var(--text); }

.profile-menu {
  position:absolute; bottom:62px; left:8px; right:8px;
  background:rgba(10,10,10,0.99); border:1px solid var(--border2);
  border-radius:10px; overflow:hidden;
  box-shadow:0 20px 50px rgba(0,0,0,0.8);
  animation:popUp .18s cubic-bezier(.16,1,.3,1); z-index:50;
}
@keyframes popUp { from{opacity:0;transform:translateY(5px) scale(.97)} to{opacity:1;transform:none} }
.menu-item {
  display:flex; align-items:center; gap:10px; width:100%;
  padding:11px 14px; font-size:14px; cursor:pointer;
  background:none; border:none; color:var(--mid); transition:background .12s; text-align:left;
}
.menu-item:hover { background:var(--surface); color:var(--text); }

.chat-area { flex:1; display:flex; flex-direction:column; overflow:hidden; position:relative; background:#000; }
.chat-area--active .chat-view { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.chat-area--active #chatComposer { flex-shrink:0; }
.chat-area--active .chat-view.hidden { display:none !important; }

.chat-placeholder {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:16px; text-align:center; padding:40px; position:relative;
}
.chat-placeholder h2 { font-family:var(--fd); font-size:28px; font-weight:800; letter-spacing:-1px; }
.chat-placeholder p  { color:var(--dim); font-size:14px; line-height:1.7; }
.placeholder-glow { position:absolute; width:500px; height:500px; border-radius:50%;
                    background:radial-gradient(circle,rgba(255,255,255,0.025),transparent 60%);
                    pointer-events:none; }
.pulse-ring { width:64px; height:64px; border-radius:50%;
              border:1px solid rgba(255,255,255,0.12);
              animation:pulseRing 2.4s ease-out infinite; }
@keyframes pulseRing { 0%{transform:scale(.85);opacity:1} 100%{transform:scale(2.2);opacity:0} }

.chat-view { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.chat-view.hidden { display:none; }

.chat-header {
  padding:13px 20px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(0,0,0,0.9); flex-shrink:0;
}
.chat-header-left { display:flex; align-items:center; gap:11px; }
.chat-pname   { font-size:15px; font-weight:600; }
.chat-pstatus { font-size:12px; color:var(--dim); display:flex; align-items:center; gap:5px; margin-top:2px; }
.dot-green { width:6px; height:6px; border-radius:50%; background:var(--green); }
.dot-grey  { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,0.2); }

.match-actions { display:flex; gap:8px; }
.keep-btn, .skip-btn {
  display:flex; align-items:center; gap:6px; padding:7px 14px; border-radius:8px;
  border:none; font-family:var(--fb); font-size:13px; font-weight:600; cursor:pointer; transition:all .2s;
}
.keep-btn { background:#fff; color:#000; }
.keep-btn:hover { background:#e0e0e0; transform:translateY(-1px); box-shadow:0 4px 14px rgba(255,255,255,0.12); }
.skip-btn { background:transparent; border:1px solid var(--border2); color:var(--dim); }
.skip-btn:hover { border-color:rgba(255,68,68,0.4); color:var(--danger); }

.messages-area { flex:1; overflow-y:auto; padding:18px 22px; display:flex; flex-direction:column; gap:4px; }

.sys-msg { text-align:center; color:var(--dim); font-size:12px; padding:6px 0; }

.msg-row { display:flex; align-items:flex-end; gap:8px;
           animation:bubbleIn .22s cubic-bezier(.16,1,.3,1);
           width:100%; }
.msg-row .avatar { flex-shrink:0; }
@keyframes bubbleIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
.msg-row.me { flex-direction:row-reverse; }

.msg-row > .msg-body {
  display:flex;
  flex-direction:column;
  flex:0 1 auto;
  width:auto;
  max-width:min(65%, 520px);
  min-width:0;
}
.msg-row.me > .msg-body { align-items:flex-end; }
.msg-row.them > .msg-body { align-items:flex-start; }

.msg-bubble {
  display:inline-flex;
  flex-direction:column;
  align-items:flex-start;
  flex:0 0 auto;
  width:auto;
  min-width:0;
  max-width:min(420px, 100%);
  padding:9px 13px;
  border-radius:14px;
  font-size:14px;
  line-height:1.45;
}
.msg-text {
  display:block;
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.msg-row.them .msg-bubble { background:rgba(255,255,255,0.07); border-bottom-left-radius:3px; color:var(--text); }
.msg-row.me   .msg-bubble { background:#fff; border-bottom-right-radius:3px; color:#000; font-weight:500; }
.msg-time { font-size:10px; color:var(--dim); margin-top:3px; }
.msg-row.me   .msg-time { text-align:right; }
.msg-row.them .msg-time { text-align:left; }

.typing-dots { display:flex; gap:4px; padding:11px 13px;
               background:rgba(255,255,255,0.07); border-radius:14px; border-bottom-left-radius:3px; }
.typing-dots span { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,0.3);
                    animation:bounce 1.2s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay:.2s; }
.typing-dots span:nth-child(3) { animation-delay:.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

.input-bar {
  padding:11px 16px; border-top:1px solid var(--border);
  display:flex; align-items:center; gap:10px;
  background:rgba(0,0,0,0.95); flex-shrink:0;
}
.msg-field {
  flex:1; background:var(--surface); border:1px solid var(--border);
  color:var(--text); font-family:var(--fb); font-size:14px;
  padding:10px 14px; border-radius:9px; outline:none; transition:border .15s;
}
.msg-field:focus { border-color:rgba(255,255,255,0.25); background:rgba(255,255,255,0.05); }
.msg-field::placeholder { color:var(--dim); }
.send-btn {
  width:40px; height:40px; border-radius:9px; border:none;
  background:#fff; color:#000;
  display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all .2s; flex-shrink:0;
}
.send-btn:hover { background:#ddd; transform:scale(1.06); }
.send-btn:active { transform:scale(.95); }

.attach-btn {
  width:40px; height:40px; border-radius:9px; border:1px solid var(--border);
  background:var(--surface); color:var(--dim);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  flex-shrink:0; transition:all .15s;
}
.attach-btn:hover:not(:disabled) { color:var(--text); border-color:rgba(255,255,255,0.25); }
.attach-btn:disabled { opacity:.4; cursor:not-allowed; }

.composer-field-wrap { flex:1; display:flex; flex-direction:column; gap:4px; min-width:0; }
.upload-progress { font-size:11px; color:var(--dim); padding:0 4px; }
.upload-progress:not(.hidden) { animation:pulseText 1.2s ease-in-out infinite; }
@keyframes pulseText { 0%,100%{opacity:.6} 50%{opacity:1} }

.composer-disabled { opacity:.55; pointer-events:none; }

.msg-bubble-media { padding:4px !important; overflow:hidden; }
.msg-image {
  display:block; max-width:min(280px, 100%); max-height:320px;
  border-radius:10px; object-fit:cover;
}
.msg-caption {
  margin-top:6px; font-size:13px; line-height:1.4;
  white-space:pre-wrap; word-break:break-word;
}

.msg-bubble-file { padding:8px 10px !important; }
.msg-file-card {
  display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit;
}
.msg-file-card:hover { opacity:.9; }
.msg-file-icon { font-size:22px; flex-shrink:0; }
.msg-file-meta { display:flex; flex-direction:column; gap:2px; min-width:0; }
.msg-file-name { font-size:13px; font-weight:600; word-break:break-all; }
.msg-file-size { font-size:11px; color:var(--dim); }
.msg-row.me .msg-file-size { color:rgba(0,0,0,0.55); }

.msg-reply-quote {
  display:block;
  width:auto;
  max-width:280px;
  box-sizing:border-box;
  text-align:left;
  margin:0 0 6px;
  padding:6px 8px 6px 10px;
  border:none;
  border-left:3px solid rgba(255,255,255,0.35);
  border-radius:6px;
  background:rgba(0,0,0,0.12);
  cursor:pointer;
  font-family:inherit;
  color:inherit;
  transition:background .15s;
}
.msg-reply-quote:hover { background:rgba(0,0,0,0.2); }
.msg-reply-quote.unavailable { opacity:.75; cursor:default; }
.msg-row.me .msg-reply-quote {
  border-left-color:rgba(0,0,0,0.25); background:rgba(0,0,0,0.06);
}
.msg-row.me .msg-reply-quote:hover { background:rgba(0,0,0,0.1); }
.msg-reply-sender {
  display:block; font-size:11px; font-weight:700; margin-bottom:2px;
  color:rgba(255,255,255,0.85);
}
.msg-row.me .msg-reply-sender { color:rgba(0,0,0,0.65); }
.msg-reply-text {
  display:block; font-size:12px; line-height:1.35; opacity:.9;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%;
}
.msg-row.msg-highlight { animation:msgHighlight 1.2s ease-out; }
@keyframes msgHighlight {
  0% { background:rgba(255,255,255,0.12); }
  100% { background:transparent; }
}

.msg-body { position:relative; }
.msg-row { cursor:context-menu; }

.reply-preview-bar {
  display:flex; align-items:center; gap:10px;
  padding:8px 16px; border-top:1px solid var(--border);
  background:rgba(255,255,255,0.04);
}
.reply-preview-bar.hidden { display:none; }
.reply-preview-accent {
  width:3px; align-self:stretch; border-radius:2px;
  background:rgba(255,255,255,0.5); flex-shrink:0;
}
.reply-preview-body { flex:1; min-width:0; }
.reply-preview-label { font-size:11px; font-weight:700; color:var(--dim); margin-bottom:2px; }
.reply-preview-text {
  font-size:13px; color:var(--text); opacity:.9;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.reply-preview-cancel {
  width:32px; height:32px; border-radius:8px; border:none;
  background:transparent; color:var(--dim); cursor:pointer; font-size:16px;
  flex-shrink:0; transition:color .15s, background .15s;
}
.reply-preview-cancel:hover { color:var(--text); background:rgba(255,255,255,0.08); }

.avatar {
  border-radius:50%; background:rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--fd); font-weight:700; color:#fff; flex-shrink:0;
  overflow:hidden; text-transform:uppercase;
}
.avatar.sm { width:36px; height:36px; font-size:13px; }
.avatar.xs { width:27px; height:27px; font-size:11px; }
.avatar.lg { width:64px; height:64px; font-size:24px; }
.avatar img { width:100%; height:100%; object-fit:cover; }

.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.85);
  z-index:200; display:flex; align-items:center; justify-content:center;
  animation:fadeIn .18s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal-card {
  background:#0c0c0c; border:1px solid var(--border2); border-radius:16px;
  padding:36px; max-width:400px; width:90%; text-align:center;
  box-shadow:0 40px 80px rgba(0,0,0,0.9);
  animation:cardIn .3s cubic-bezier(.16,1,.3,1);
}
.settings-card { text-align:left; max-width:460px; }

.modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.close-btn { width:28px; height:28px; border-radius:6px; border:none;
             background:var(--surface); color:var(--dim); cursor:pointer;
             display:flex; align-items:center; justify-content:center; font-size:12px;
             transition:all .15s; }
.close-btn:hover { background:var(--surf2); color:var(--text); }

.settings-section { margin-bottom:20px; }
.settings-label { font-size:10px; font-weight:700; letter-spacing:1px;
                  text-transform:uppercase; color:var(--dim); margin-bottom:8px; }
.settings-row { display:flex; align-items:center; justify-content:space-between;
                padding:9px 0; border-bottom:1px solid var(--border); font-size:14px; }
.settings-row .val { color:var(--dim); font-size:13px; }

.edit-avatar { display:flex; justify-content:center; margin-bottom:18px; }

.avatar-upload-wrap { display:flex; flex-direction:column; align-items:center; gap:10px; }
.avatar-upload-actions { display:flex; gap:8px; align-items:center; }
.avatar-upload-btn {
  display:inline-flex; align-items:center; gap:6px; padding:7px 14px;
  background:var(--surface); border:1px solid var(--border2);
  color:var(--mid); border-radius:7px; font-size:12px; font-weight:600;
  cursor:pointer; transition:all .2s; font-family:var(--fb);
}
.avatar-upload-btn:hover { background:var(--surf2); border-color:rgba(255,255,255,0.25); color:#fff; }
.avatar-remove-btn {
  display:inline-flex; align-items:center; gap:6px; padding:7px 14px;
  background:rgba(255,68,68,.08); border:1px solid rgba(255,68,68,.2);
  color:#ff4444; border-radius:7px; font-size:12px; font-weight:600;
  cursor:pointer; transition:all .2s; font-family:var(--fb);
}
.avatar-remove-btn:hover { background:rgba(255,68,68,.16); }
.avatar-upload-hint { font-size:11px; color:var(--dim); font-family:var(--fb); }
.avatar-upload-status {
  font-size:12px; font-family:var(--fb); padding:5px 12px; border-radius:6px;
}
.avatar-upload-status.success { color:var(--green); background:rgba(163,230,53,.08); }
.avatar-upload-status.error   { color:#ff4444; background:rgba(255,68,68,.08); }
.avatar-upload-status.loading { color:var(--dim); }

.danger-btn {
  background:rgba(255,68,68,.08); border:1px solid rgba(255,68,68,.2);
  color:var(--danger); font-family:var(--fb); font-size:14px;
  padding:9px 18px; border-radius:8px; cursor:pointer; transition:all .15s;
}
.danger-btn:hover { background:rgba(255,68,68,.16); }

.modal-card .modal-sub { color:var(--dim); font-size:14px; margin:8px 0 22px; }
.radar { position:relative; width:72px; height:72px; margin:0 auto 22px;
         display:flex; align-items:center; justify-content:center; }
.radar-ring { position:absolute; border-radius:50%; border:1px solid rgba(255,255,255,0.3);
              animation:radarPulse 2s ease-out infinite; }
.r1 { width:72px; height:72px; opacity:.1; }
.r2 { width:52px; height:52px; opacity:.2; animation-delay:.55s; }
.r3 { width:32px; height:32px; opacity:.4; animation-delay:1.1s; }
@keyframes radarPulse { 0%{transform:scale(.85);opacity:.5} 100%{transform:scale(1.2);opacity:0} }
.radar-core { width:28px; height:28px; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.2);
              border-radius:50%; display:flex; align-items:center; justify-content:center;
              color:rgba(255,255,255,0.6); z-index:1; }

.cancel-btn {
  background:transparent; border:1px solid var(--border2);
  color:var(--mid); font-family:var(--fb); font-size:14px;
  padding:9px 24px; border-radius:9px; cursor:pointer; transition:all .15s;
}
.cancel-btn:hover { border-color:rgba(255,68,68,0.4); color:var(--danger); }

.toast {
  position:fixed; bottom:28px; left:50%; transform:translateX(-50%);
  background:#111; border:1px solid var(--border2);
  color:var(--text); padding:10px 20px; border-radius:9px; font-size:14px;
  z-index:500; pointer-events:none;
  animation:toastIn .25s cubic-bezier(.16,1,.3,1);
  box-shadow:0 12px 40px rgba(0,0,0,0.6);
}
@keyframes toastIn {
  from{opacity:0;transform:translateX(-50%) translateY(14px)}
  to  {opacity:1;transform:translateX(-50%) translateY(0)}
}