/* ═══════════════════════════════════════════════════════
   ArsenSite — Modern Gradient Design System
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────── */
:root {
  --bg:          #08090d;
  --bg2:         #0f1117;
  --card:        #13151e;
  --card2:       #1a1d29;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --text:        #f0f2ff;
  --text2:       #8b90a7;
  --text3:       #5a5f75;

  --g1: #7c3aed;   /* violet */
  --g2: #2563eb;   /* blue   */
  --g3: #06b6d4;   /* cyan   */
  --g4: #10b981;   /* emerald*/

  --grad:        linear-gradient(135deg, var(--g1), var(--g2), var(--g3));
  --grad2:       linear-gradient(135deg, var(--g2), var(--g3));
  --grad3:       linear-gradient(135deg, var(--g1) 0%, var(--g3) 100%);

  --danger:      #f43f5e;
  --success:     #10b981;
  --warning:     #f59e0b;

  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --shadow2:     0 2px 12px rgba(0,0,0,0.3);
  --glow:        0 0 30px rgba(99,102,241,0.15);
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Animated gradient background mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(6,182,212,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(37,99,235,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ── Typography ─────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { color: var(--g3); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

/* ── Gradient Text ──────────────────────────────────── */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.card-glow {
  box-shadow: var(--shadow), var(--glow);
}

/* ── Auth Pages (login, register, verify) ───────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow), var(--glow);
  position: relative;
  overflow: hidden;
  animation: slideUp .5s cubic-bezier(.16,1,.3,1) both;
}

.auth-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 42px; height: 42px;
  background: var(--grad);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(124,58,237,0.4);
}

.auth-logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.auth-subtitle {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ── Form Elements ──────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text2);
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-input::placeholder { color: var(--text3); }

.form-input:focus {
  border-color: var(--g2);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.form-note {
  font-size: 12px;
  color: var(--text3);
  margin-top: 5px;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .15s, box-shadow .15s;
  white-space: nowrap;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  width: 100%;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 18px rgba(124,58,237,0.4);
}
.btn-primary:hover {
  opacity: .92;
  box-shadow: 0 6px 24px rgba(124,58,237,0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text);
  margin-top: 10px;
}
.btn-ghost:hover {
  border-color: var(--g2);
  background: rgba(37,99,235,0.07);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-danger {
  background: rgba(244,63,94,0.12);
  border: 1.5px solid rgba(244,63,94,0.3);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(244,63,94,0.2); }

.btn-success {
  background: rgba(16,185,129,0.12);
  border: 1.5px solid rgba(16,185,129,0.3);
  color: var(--success);
}
.btn-success:hover { background: rgba(16,185,129,0.2); }

/* ── Alerts ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-error {
  background: rgba(244,63,94,0.1);
  border: 1px solid rgba(244,63,94,0.25);
  color: #fda4af;
}

.alert-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  color: #6ee7b7;
}

/* ── Auth Link ──────────────────────────────────────── */
.auth-link {
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  color: var(--text2);
}

.auth-link a {
  color: var(--g3);
  font-weight: 600;
}

/* ── Verify Code Input ──────────────────────────────── */
.code-input {
  width: 100%;
  padding: 18px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 16px;
  font-family: 'Syne', sans-serif;
}

.code-input:focus {
  border-color: var(--g1);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text2);
  margin-top: 14px;
}

.timer-badge span { color: var(--g3); font-weight: 600; }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
  background: rgba(13,15,23,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.nav-btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text);
}
.nav-btn-ghost:hover { background: var(--card2); }

.nav-btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}
.nav-btn-primary:hover { opacity: .9; transform: translateY(-1px); }

/* Search bar */
.search-wrap {
  flex: 1;
  max-width: 340px;
  margin: 0 20px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 16px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.search-input::placeholder { color: var(--text3); }
.search-input:focus { border-color: var(--g2); }

/* ── Main Layout ────────────────────────────────────── */
.main-container {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 24px 20px;
}

@media (max-width: 768px) {
  .main-container { grid-template-columns: 1fr; }
}

/* ── Section Card ───────────────────────────────────── */
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  display: block;
  width: 3px; height: 14px;
  background: var(--grad);
  border-radius: 2px;
}

/* ── User Row ───────────────────────────────────────── */
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background .15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.user-row:hover { background: var(--card2); color: var(--text); }

.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }

.avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.user-handle {
  font-size: 12px;
  color: var(--text3);
}

.verified-badge {
  width: 14px; height: 14px;
  background: var(--grad2);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px;
  color: #fff;
  flex-shrink: 0;
}

/* Follow button inline */
.follow-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  transition: all .2s;
  flex-shrink: 0;
}

.follow-btn-add {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}

.follow-btn-remove {
  background: var(--card2);
  border: 1.5px solid var(--border2);
  color: var(--text2);
}

/* ── Chat Bubble ────────────────────────────────────── */
.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
}

.chat-header {
  background: rgba(13,15,23,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-back {
  color: var(--text2);
  font-size: 22px;
  cursor: pointer;
  transition: color .2s;
  text-decoration: none;
}
.chat-back:hover { color: var(--text); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-track { background: transparent; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.bubble-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: bubbleIn .25s ease both;
}

.bubble-wrap.me { flex-direction: row-reverse; }

.bubble {
  max-width: 70%;
  padding: 11px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

.bubble.them {
  background: var(--card2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.bubble.me {
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 12px rgba(124,58,237,0.3);
}

.bubble-time {
  font-size: 11px;
  opacity: .6;
  margin-top: 3px;
  text-align: right;
}

.bubble .msg-img {
  max-width: min(280px, 70vw);
  max-height: 320px;
  width: auto;
  height: auto;
  border-radius: 10px;
  display: block;
  margin-top: 6px;
  object-fit: cover;
  cursor: pointer;
}

/* Chat Footer */
.chat-footer {
  background: rgba(13,15,23,0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 11px 18px;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.chat-input:focus { border-color: var(--g2); }
.chat-input::placeholder { color: var(--text3); }

.file-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--card2);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all .2s;
  color: var(--text2);
  flex-shrink: 0;
}
.file-btn:hover { border-color: var(--g2); color: var(--g3); }
.file-btn.has-file { border-color: var(--success); color: var(--success); }

.send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 3px 12px rgba(124,58,237,0.4);
  transition: all .2s;
  flex-shrink: 0;
}
.send-btn:hover { transform: scale(1.08); box-shadow: 0 5px 18px rgba(124,58,237,0.5); }

/* ── Profile Page ───────────────────────────────────── */
.profile-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 20px;
}

.profile-banner {
  height: 160px;
  background: var(--grad);
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  overflow: hidden;
}

.profile-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-info-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 0 24px 24px;
  margin-bottom: 20px;
}

.profile-avatar-wrap {
  margin-top: -36px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.profile-fullname {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-username { color: var(--text3); font-size: 14px; margin-top: 2px; }

.profile-stats {
  display: flex;
  gap: 28px;
  margin: 18px 0;
}

.stat-item { text-align: center; }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ── Admin Page ─────────────────────────────────────── */
.admin-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px;
}

.admin-header {
  margin-bottom: 28px;
}

.admin-title {
  font-size: 28px;
  margin-bottom: 6px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--grad);
}

.stat-card-num {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

/* ── Table ──────────────────────────────────────────── */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead { background: var(--card2); }

th {
  padding: 13px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Badge / Tag ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-purple { background: rgba(124,58,237,0.15); color: #a78bfa; border: 1px solid rgba(124,58,237,0.2); }
.badge-green  { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.2); }
.badge-red    { background: rgba(244,63,94,0.15);  color: #fda4af; border: 1px solid rgba(244,63,94,0.2); }
.badge-blue   { background: rgba(37,99,235,0.15);  color: #93c5fd; border: 1px solid rgba(37,99,235,0.2); }

/* ── Divider ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

/* ── Empty State ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text3);
}

.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-state-text { font-size: 14px; }

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── Animations ─────────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

/* ── Loading Overlay (override) ─────────────────────── */
#loading-overlay {
  background: rgba(8,9,13,0.88) !important;
  backdrop-filter: blur(8px);
}

.spinner {
  border: 4px solid rgba(255,255,255,0.08) !important;
  border-top: 4px solid var(--g1) !important;
  width: 44px !important;
  height: 44px !important;
}

.loader-text {
  font-family: 'DM Sans', sans-serif !important;
  color: var(--text2) !important;
  font-size: 14px !important;
}

/* ── Group Form ─────────────────────────────────────── */
.group-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.group-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.group-input:focus { border-color: var(--g2); }
.group-input::placeholder { color: var(--text3); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  .auth-card { padding: 32px 22px; }
  .navbar { padding: 0 14px; }
  .search-wrap { display: none; }
  .main-container { padding: 14px; gap: 14px; }
  .chat-body { padding: 14px; }
  .profile-stats { gap: 18px; }
}

/* ═══════════════════════════════════════
   #9: MOBILE RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
    .admin-wrap { padding: 10px; }
    .user-table { font-size: 13px; }
    .user-table th, .user-table td { padding: 8px 6px; }
    .btn { padding: 6px 10px; font-size: 12px; }
    .main-container { flex-direction: column; gap: 12px; padding: 10px; }
    .section-card { margin-bottom: 0; }
    .chat-header { padding: 10px 12px; }
    .msg-input { font-size: 15px; }
    .auth-card { margin: 10px; padding: 24px 16px; }
    .admin-header { flex-direction: column; gap: 8px; text-align: center; }
    .profile-content { padding: 0 12px 20px; }
    .btn-group { flex-wrap: wrap; gap: 8px; }
    /* Admin table overflow mobile da */
    .user-table td:nth-child(2) { display: none; } /* Rasmni yashiramiz mobile da */
    .badge-admin, .badge-verified { display: block; margin-bottom: 2px; }
    /* Chat mobile */
    .chat-box { height: calc(100vh - 120px); }
    .send-btn { padding: 10px 14px; }
}

@media (max-width: 480px) {
    .user-table th:nth-child(1),
    .user-table td:nth-child(1) { display: none; } /* ID ni ham yashiramiz */
    .auth-logo-text { font-size: 20px; }
    .auth-title { font-size: 22px; }
}

/* Online dot animatsiyasi */
@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.online-dot { animation: pulse-green 2s infinite; }

/* O'qildi belgisi */
.read-tick { color: #53bdeb; }
.unread-tick { color: #8696a0; }

/* Xabar o'chirish tugmasi */
.delete-btn { opacity: 0; transition: opacity 0.2s; }
.msg-bubble:hover .delete-btn { opacity: 1; }

/* ── Chat image lightbox ────────────────────────────── */
#img-lightbox {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.92);
  z-index:9999; align-items:center; justify-content:center; cursor:zoom-out;
}
#img-lightbox.active { display:flex; }
#img-lightbox img { max-width:96vw; max-height:92vh; border-radius:10px; box-shadow:0 8px 40px #000a; }

/* ── Group username badge ────────────────────────────── */
.group-uname { font-size:12px; color:var(--text3); }
