/* ==========================================================================
   SecureChat Web Application - Modern Glassmorphism & Cyberpunk Theme
   Author: Rajveer Singh (Rajveer071)
   Responsive Design: Mobile ("Normal Phone View") & Desktop ("Desktop View")
   ========================================================================== */

:root {
  --bg-dark: #0b0c13;
  --bg-surface: #141622;
  --bg-card: rgba(23, 26, 42, 0.75);
  --bg-card-hover: rgba(33, 37, 59, 0.85);
  --bg-glass: rgba(20, 22, 34, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(108, 92, 231, 0.6);
  
  --primary: #6c5ce7;
  --primary-light: #8374f3;
  --primary-dark: #5844d8;
  --primary-glow: rgba(108, 92, 231, 0.35);
  
  --accent: #00cec9;
  --accent-light: #55efc4;
  --accent-glow: rgba(0, 206, 201, 0.3);
  
  --text-main: #f8f9fa;
  --text-muted: #9aa0b4;
  --text-sub: #6c728a;
  
  --danger: #ff5252;
  --danger-bg: rgba(255, 82, 82, 0.15);
  --success: #00b894;
  --warning: #fdcb6e;
  
  --bubble-out: linear-gradient(135deg, #6c5ce7 0%, #4834d4 100%);
  --bubble-in: rgba(28, 32, 51, 0.85);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 24px var(--primary-glow);
  
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
  user-select: none;
}

/* Background atmospheric gradients */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.18) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 206, 201, 0.14) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Common Utility Classes */
.hidden {
  display: none !important;
}

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}

.avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  background: #25283c;
  border: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

div.avatar, span.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.avatar:hover {
  border-color: var(--primary);
}

.avatar-xs {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  font-size: 11px;
}

.avatar-sm {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  font-size: 13px;
}

.avatar-md {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  font-size: 16px;
}

.avatar-lg {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  font-size: 26px;
}

.avatar-xl {
  width: 104px !important;
  height: 104px !important;
  min-width: 104px !important;
  min-height: 104px !important;
  max-width: 104px !important;
  max-height: 104px !important;
  font-size: 38px;
}

.avatar-xxl {
  width: 128px !important;
  height: 128px !important;
  min-width: 128px !important;
  min-height: 128px !important;
  max-width: 128px !important;
  max-height: 128px !important;
  font-size: 46px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #00a8a3 100%);
  color: #0d0e15;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #ff3838;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.badge {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-primary {
  background: var(--primary);
  color: #fff;
}

.badge-accent {
  background: var(--accent);
  color: #0b0c13;
}

.badge-success {
  background: var(--success);
  color: #fff;
}

.badge-danger {
  background: var(--danger);
  color: #fff;
}

/* Status indicator dot */
.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-surface);
  position: absolute;
  bottom: 0;
  right: 0;
}
.offline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #636e72;
  border: 2px solid var(--bg-surface);
  position: absolute;
  bottom: 0;
  right: 0;
}

/* ==========================================================================
   LANDING / AUTH VIEW (With APK Download Card)
   ========================================================================== */
#auth-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.auth-wrapper {
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  margin: auto;
  z-index: 2;
}

/* APK Promo / Branding Column */
.auth-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.app-branding {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.app-branding-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px var(--primary-glow), 0 4px 14px rgba(0, 206, 201, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0f101a;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-branding-logo:hover {
  transform: scale(1.06);
}

.app-branding-logo img.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-branding-logo svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.app-title-h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-tagline {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Highlighted APK Download Card */
.apk-download-card {
  background: linear-gradient(145deg, rgba(30, 34, 56, 0.9) 0%, rgba(18, 20, 32, 0.95) 100%);
  border: 1px solid rgba(0, 206, 201, 0.28);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  margin-top: auto;
}

.apk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.apk-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 206, 201, 0.15);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 206, 201, 0.3);
}

.apk-meta {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 500;
}

.apk-details-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.apk-details-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}

.apk-feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.feature-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-apk-download {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #00cec9 0%, #0984e3 100%);
  color: #0b0c13;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 206, 201, 0.35);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-apk-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 206, 201, 0.55);
}

/* Auth Form Card */
.auth-form-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255, 255, 255, 0.07);
}

.username-status {
  font-size: 12px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
}

.status-ok {
  color: var(--success);
}
.status-err {
  color: var(--danger);
}

.form-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.form-alert.alert-error {
  display: block;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 82, 82, 0.3);
}
.form-alert.alert-success {
  display: block;
  background: rgba(0, 184, 148, 0.15);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.3);
}

/* ==========================================================================
   MAIN APPLICATION SHELL (Desktop & Mobile Responsive)
   ========================================================================== */
#main-app {
  position: fixed;
  inset: 0;
  display: flex;
  background: var(--bg-dark);
  z-index: 10;
  overflow: hidden;
}

/* Sidebar (Left Pane in Desktop / Full Screen in Mobile) */
.sidebar {
  width: 380px;
  min-width: 340px;
  height: 100%;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
  transition: var(--transition);
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(20, 22, 34, 0.95);
  backdrop-filter: blur(12px);
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.user-profile-summary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.profile-avatar-box {
  position: relative;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.profile-username {
  font-size: 12px;
  color: var(--accent);
}

.header-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Search bar */
.search-container {
  padding: 12px 18px;
  position: relative;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  fill: var(--text-sub);
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--primary);
}

/* Sidebar Category Navigation Tabs */
.sidebar-tabs {
  display: flex;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-tab {
  flex: 1;
  padding: 12px 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sidebar-tab.active {
  color: #fff;
}

.sidebar-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 8px var(--primary-glow);
}

.tab-badge {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Sidebar List Areas */
.sidebar-content-area {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.conversation-list,
.group-list,
.call-list,
.users-search-list {
  display: flex;
  flex-direction: column;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}

.item-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.item-row.active {
  background: rgba(108, 92, 231, 0.15);
  border-left: 3px solid var(--primary);
}

.item-row-avatar {
  position: relative;
}

.item-row-details {
  flex: 1;
  min-width: 0;
}

.item-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.item-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-row-time {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
}

.item-row-username {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: -2px;
  margin-bottom: 2px;
}

.item-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-row-snippet {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.item-row-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Floating Action Button for New Chat/Group */
.sidebar-fab {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px var(--primary-glow);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  z-index: 25;
}

.sidebar-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.6);
}

/* ==========================================================================
   MAIN CHAT PANE (Right Pane in Desktop / Screen 2 in Mobile)
   ========================================================================== */
.main-chat-pane {
  flex: 1;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

/* Empty State / Welcome Screen */
.empty-chat-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-chat-graphic {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 16px 40px var(--primary-glow), 0 4px 16px rgba(0, 206, 201, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0f101a;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.empty-chat-graphic:hover {
  transform: scale(1.06) rotate(1deg);
}

.empty-chat-graphic img.empty-chat-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-chat-graphic svg {
  width: 56px;
  height: 56px;
  fill: var(--primary);
}

.empty-chat-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.empty-chat-sub {
  font-size: 14px;
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Chat Header */
.chat-header {
  padding: 12px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 15;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.btn-chat-back {
  display: none; /* Shown on mobile */
  background: transparent;
  border: none;
  color: #fff;
  padding: 4px;
  cursor: pointer;
}

.chat-header-avatar {
  cursor: pointer;
  position: relative;
}

.chat-header-meta {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-width: 0;
}

.chat-header-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-username {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.2;
}

.chat-header-status {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-header-status.online {
  color: var(--success);
}

.chat-header-status.typing {
  color: var(--accent);
  font-style: italic;
}

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

/* Messages Scroll Feed */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: radial-gradient(circle at 50% 50%, rgba(20, 22, 36, 0.4) 0%, transparent 80%);
}

.message-date-divider {
  align-self: center;
  background: rgba(255, 255, 255, 0.07);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 12px 0;
}

/* Chat Message Bubbles */
.message-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 75%;
}

.message-bubble-row.outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-bubble-row.incoming {
  align-self: flex-start;
}

.bubble-content {
  background: var(--bubble-in);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  color: var(--text-main);
  position: relative;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
}

.message-bubble-row.outgoing .bubble-content {
  background: var(--bubble-out);
  border: none;
  border-radius: 18px 18px 4px 18px;
  color: #fff;
}

.msg-sender-avatar-wrap {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-bottom: 2px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.msg-sender-avatar-wrap:hover {
  transform: scale(1.1);
}

.msg-sender-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.sender-name-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  cursor: pointer;
  display: inline-block;
  transition: opacity 0.15s ease;
}

.sender-name-tag:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.reply-quote-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 6px;
  font-size: 12px;
  cursor: pointer;
}

.reply-quote-sender {
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 2px;
}

.reply-quote-text {
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-text {
  font-size: 14px;
  line-height: 1.45;
  user-select: text;
}

/* Media in chat */
.message-media-img {
  max-width: 280px;
  max-height: 280px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: block;
  margin-top: 4px;
  transition: var(--transition);
}

.message-media-img:hover {
  opacity: 0.95;
}

.message-media-video {
  max-width: 300px;
  border-radius: var(--radius-sm);
  display: block;
  margin-top: 4px;
  background: #000;
}

.message-doc-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  text-decoration: none;
  color: #fff;
}

.message-doc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.message-doc-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.message-doc-size {
  font-size: 11px;
  color: var(--text-muted);
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

.bubble-status-tick {
  width: 14px;
  height: 14px;
}

.tick-sent {
  fill: rgba(255, 255, 255, 0.6);
}
.tick-delivered {
  fill: rgba(255, 255, 255, 0.8);
}
.tick-read {
  fill: #55efc4;
}

/* --- REDESIGNED MESSAGE QUICK ACTIONS TOOLBAR --- */
.bubble-actions-toolbar {
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(19, 26, 41, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(3px) scale(0.95);
  z-index: 10;
  align-self: center;
}

.message-bubble-row:hover .bubble-actions-toolbar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.bar-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.bar-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.bar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: scale(1.12);
}

.bar-btn.bar-btn-more:hover {
  color: var(--accent);
}

/* Touch device support: keep subtle action trigger accessible */
@media (max-width: 820px) {
  .bubble-actions-toolbar {
    opacity: 0.85;
    pointer-events: auto;
    transform: none;
    background: rgba(19, 26, 41, 0.7);
  }
}

/* --- REDESIGNED MESSAGE CONTEXT MENU --- */
.message-context-menu {
  position: fixed;
  z-index: 9999;
  width: 240px;
  background: rgba(19, 26, 41, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.12);
  padding: 6px;
  transform-origin: top left;
  user-select: none;
  animation: contextMenuPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes contextMenuPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.context-reactions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 6px 6px;
}

.context-rxn-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 8px;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
  line-height: 1;
}

.context-rxn-btn:hover {
  transform: scale(1.35) translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
}

.context-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.context-item-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}

.context-menu-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
}

.context-menu-item.item-danger {
  color: #ff6b6b;
}

.context-menu-item.item-danger .context-item-icon {
  fill: #ff6b6b;
}

.context-menu-item.item-danger:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #ff8787;
}

/* --- REDESIGNED DELETE MESSAGE MODAL --- */
.delete-msg-card {
  max-width: 440px;
  width: 90%;
  text-align: center;
  padding: 28px 24px 22px 24px;
}

.delete-msg-hero-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.22);
}

.delete-msg-hero-icon {
  width: 32px;
  height: 32px;
  fill: #ef4444;
}

.delete-msg-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.delete-msg-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.delete-msg-preview-box {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 20px;
  text-align: left;
  max-height: 80px;
  overflow: hidden;
}

.delete-msg-preview-quote {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  white-space: pre-wrap;
  word-break: break-word;
}

.delete-options-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.delete-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.delete-option-card:hover {
  transform: translateY(-2px);
}

.delete-option-card.card-everyone:hover {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.09);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.16);
}

.delete-option-card.card-me:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.09);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.16);
}

.delete-option-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.delete-option-icon-box.red-glow {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.delete-option-icon-box.slate-glow {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.delete-option-icon-box svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.delete-option-text {
  flex: 1;
}

.delete-option-main {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.delete-option-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.delete-option-arrow {
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.3);
  transition: transform 0.2s, fill 0.2s;
  flex-shrink: 0;
}

.delete-option-card:hover .delete-option-arrow {
  transform: translateX(3px);
  fill: #fff;
}

.delete-msg-footer {
  margin-top: 4px;
}

/* --- REDESIGNED EDIT MESSAGE MODAL --- */
.edit-msg-card {
  max-width: 480px;
  width: 90%;
}

.edit-textarea {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 105px;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 12px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 20;
}

/* Reply-to preview banner */
.reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(108, 92, 231, 0.15);
  border-left: 4px solid var(--primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.reply-banner-info {
  font-size: 12px;
  min-width: 0;
}

.reply-banner-title {
  font-weight: 700;
  color: var(--primary-light);
}

.reply-banner-snippet {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

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

.chat-textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  height: 44px;
  max-height: 120px;
  outline: none;
  transition: var(--transition);
}

.chat-textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-send:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

/* Mobile Bottom Navigation Bar */
.mobile-nav-bar {
  display: none; /* Desktop hidden */
  background: rgba(14, 16, 26, 0.98);
  border-top: 1px solid var(--border-color);
  padding: 8px 12px;
  justify-content: space-around;
  align-items: center;
  z-index: 30;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-nav-item.active {
  color: var(--primary-light);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ==========================================================================
   MODALS & OVERLAYS (WebRTC Call, Camera Studio, Group Info, Settings)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   WEBRTC CALL MODAL
   ========================================================================== */
#call-modal {
  z-index: 300;
}

.call-card {
  max-width: 960px;
  width: 94vw;
  height: 680px;
  max-height: 94vh;
  background: #0d0f17;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.call-video-grid {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.local-video-pip {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 140px;
  height: 105px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  z-index: 10;
  background: #111;
}

.conference-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 82px 20px 104px 20px; /* Safe padding for floating top header overlay and bottom controls */
  background: radial-gradient(circle at center, #121526 0%, #070912 100%);
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  align-content: center;
  width: 100%;
  height: 100%;
}

.conference-tile {
  position: relative;
  background: #101321;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.conference-tile:hover {
  border-color: rgba(99, 102, 241, 0.6);
}

.conference-tile.local-tile {
  border: 2px solid rgba(99, 102, 241, 0.85);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.25);
}

.conference-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d101d;
}

.conference-tile video.mirrored {
  transform: scaleX(-1);
}

.conf-tile-avatar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #1a1e36 0%, #0e1122 100%);
}

.conf-tile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.conf-avatar-pulse {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.6);
  animation: pulseAvatar 2s infinite ease-in-out;
  pointer-events: none;
}

.conf-avatar-initials {
  display: none; /* Fallback if img fails */
}

.conference-nametag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(10, 12, 22, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.conf-nametag-name {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conf-nametag-badge {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 6px;
}

.conf-nametag-badge.badge-off {
  background: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.conf-nametag-badge.badge-on {
  background: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.call-voice-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
}

.call-pulsing-avatar {
  position: relative;
}

.pulse-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: pulseAvatar 2s infinite;
}

@keyframes pulseAvatar {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
}

.call-user-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.call-status-label {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.call-timer {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.call-controls-bar {
  padding: 20px;
  background: rgba(14, 16, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 20;
}

.btn-call-action {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  color: #fff;
}

.btn-call-mute {
  background: rgba(255, 255, 255, 0.15);
}

.btn-call-mute.muted {
  background: #d63031;
}

.btn-call-camera {
  background: rgba(255, 255, 255, 0.15);
}

.btn-call-camera.off {
  background: #d63031;
}

.btn-call-end {
  background: #d63031;
  box-shadow: 0 4px 18px rgba(214, 48, 49, 0.5);
}

.btn-call-accept {
  background: #00b894;
  box-shadow: 0 4px 18px rgba(0, 184, 148, 0.5);
}

.btn-call-add-user {
  background: rgba(255, 255, 255, 0.15);
}

.btn-call-add-user:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* Universal Floating Call Header Overlay (Visible in Video, Conference, and Voice) */
.call-header-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 15, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 40px;
  padding: 8px 18px;
  z-index: 25;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.call-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.call-floating-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.call-floating-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  transition: var(--transition);
}

.call-floating-status-pill.connecting {
  background: rgba(243, 156, 18, 0.2);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.35);
}

.call-floating-status-pill.ringing {
  background: rgba(9, 132, 227, 0.2);
  color: #74b9ff;
  border: 1px solid rgba(9, 132, 227, 0.35);
}

.call-floating-status-pill.connected {
  background: rgba(0, 184, 148, 0.2);
  color: #55efc4;
  border: 1px solid rgba(0, 184, 148, 0.35);
}

.call-floating-status-pill.reconnecting {
  background: rgba(214, 48, 49, 0.2);
  color: #ff7675;
  border: 1px solid rgba(214, 48, 49, 0.35);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulseDot 1.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

.call-floating-timer {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 12px;
}

/* Add to Call Modal */
.add-to-call-card {
  max-width: 440px;
  width: 90%;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.add-to-call-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.add-participant-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.add-participant-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.add-participant-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.add-participant-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.add-participant-username {
  font-size: 11px;
  color: var(--accent);
}

/* Incoming Call Overlay */
.incoming-call-box {
  background: rgba(20, 22, 34, 0.95);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  animation: modalPop 0.3s ease;
}

/* ==========================================================================
   CAMERA & GALLERY STUDIO MODAL (Snapchat Style Filters & Crop)
   ========================================================================== */
#camera-modal {
  z-index: 320;
}

.camera-studio-card {
  max-width: 820px;
  height: 640px;
  max-height: 94vh;
  background: #0b0c13;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.camera-preview-stage {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#camera-video-preview,
#camera-canvas-preview,
#review-media-img,
#review-media-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: filter 0.15s ease;
}

.camera-lens-filter-bar {
  padding: 12px 16px;
  background: rgba(14, 16, 26, 0.95);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
}

.lens-filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  border: 1px solid transparent;
}

.lens-filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Camera Filters CSS definitions */
.filter-normal { filter: none !important; }
.filter-cyberpunk { filter: contrast(135%) saturate(160%) hue-rotate(290deg) !important; }
.filter-noir { filter: grayscale(100%) contrast(160%) brightness(90%) !important; }
.filter-sunset { filter: sepia(45%) saturate(170%) brightness(105%) hue-rotate(-15deg) !important; }
.filter-emerald { filter: contrast(130%) hue-rotate(85deg) saturate(140%) !important; }
.filter-dreamy { filter: brightness(115%) contrast(85%) saturate(130%) blur(0.5px) !important; }
.filter-comic { filter: contrast(200%) saturate(180%) brightness(105%) !important; }
.filter-vintage { filter: sepia(70%) contrast(110%) brightness(95%) !important; }
.filter-vaporwave { filter: hue-rotate(180deg) saturate(160%) contrast(120%) !important; }
.filter-golden { filter: sepia(35%) saturate(150%) brightness(110%) contrast(105%) !important; }
.filter-invert { filter: invert(100%) !important; }
.filter-vivid { filter: saturate(200%) contrast(120%) brightness(105%) !important; }

.camera-shutter-bar {
  padding: 16px 24px;
  background: rgba(14, 16, 26, 0.98);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border-color);
}

.shutter-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  transition: var(--transition);
}

.shutter-btn:active {
  transform: scale(0.9);
}

.shutter-btn.recording {
  background: #d63031;
  border-color: #fff;
  animation: pulseRecording 1s infinite;
}

@keyframes pulseRecording {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Gallery Grid inside Camera Studio */
.gallery-tab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  max-height: 480px;
}

.gallery-thumb-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: #1c2033;
  border: 1px solid var(--border-color);
}

.gallery-thumb-item img,
.gallery-thumb-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  color: #fff;
}

/* Review Edit Bar */
.review-edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   DROPDOWN MENUS & TOASTS
   ========================================================================== */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 180px;
  z-index: 50;
  display: none;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.danger {
  color: var(--danger);
}
.dropdown-item.danger:hover {
  background: var(--danger-bg);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToast 0.3s ease;
  pointer-events: auto;
}

.toast.toast-success {
  border-color: var(--success);
}
.toast.toast-error {
  border-color: var(--danger);
}

@keyframes slideToast {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUT (Mobile "Normal Phone View" vs Desktop "Desktop View")
   ========================================================================== */
@media (max-width: 820px) {
  /* On mobile view, hide the desktop dual-pane and switch to single active view */
  .auth-wrapper {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  .auth-hero-card {
    padding: 24px;
  }
  
  .auth-form-card {
    padding: 24px;
  }
  
  .auth-mobile-brand {
    display: flex;
  }
  
  .sidebar {
    width: 100%;
    min-width: 100%;
  }

  .main-chat-pane {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 25;
    transform: translateX(100%);
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* When chat is open on mobile */
  #main-app.chat-active .main-chat-pane {
    transform: translateX(0);
  }

  .btn-chat-back {
    display: inline-flex;
  }

  .mobile-nav-bar {
    display: flex;
  }

  .empty-chat-state {
    display: none;
  }

  .modal-card {
    max-height: 96vh;
    border-radius: var(--radius-md);
  }

  .camera-studio-card {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ==========================================================================
   ADVANCED INTERACTIVE FEATURES (Voice Notes, Lightbox, Emojis, QR Code)
   ========================================================================== */

/* Voice Note Recording Bar */
.voice-record-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(214, 48, 49, 0.12);
  border: 1px solid rgba(214, 48, 49, 0.35);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  flex: 1;
  animation: pulseVoiceBorder 1.5s infinite;
}

@keyframes pulseVoiceBorder {
  0% { border-color: rgba(214, 48, 49, 0.3); }
  50% { border-color: rgba(214, 48, 49, 0.8); }
  100% { border-color: rgba(214, 48, 49, 0.3); }
}

.record-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: blinkDot 1s infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.voice-timer {
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
  min-width: 45px;
}

.voice-wave-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.voice-wave-bar {
  width: 3px;
  background: var(--danger);
  border-radius: 2px;
  animation: waveMotion 0.8s ease-in-out infinite alternate;
}

.voice-wave-bar:nth-child(2) { animation-delay: 0.15s; }
.voice-wave-bar:nth-child(3) { animation-delay: 0.3s; }
.voice-wave-bar:nth-child(4) { animation-delay: 0.45s; }
.voice-wave-bar:nth-child(5) { animation-delay: 0.2s; }
.voice-wave-bar:nth-child(6) { animation-delay: 0.35s; }
.voice-wave-bar:nth-child(7) { animation-delay: 0.5s; }
.voice-wave-bar:nth-child(8) { animation-delay: 0.1s; }

@keyframes waveMotion {
  from { height: 4px; }
  to { height: 18px; }
}

/* Custom Voice Bubble Player */
.voice-bubble-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  min-width: 210px;
}

.btn-play-voice {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d0e15;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-play-voice:hover {
  transform: scale(1.08);
}

.voice-progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.voice-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.voice-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.voice-duration-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
}

/* Password Eye Toggle */
.password-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password-btn:hover {
  color: #fff;
}

/* QR Code Card inside Landing View */
.apk-qr-container {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.apk-qr-img {
  width: 74px;
  height: 74px;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}

.apk-qr-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.apk-qr-text strong {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}

/* Emoji Picker Popup */
.emoji-picker-popup {
  position: absolute;
  bottom: 60px;
  left: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  width: 290px;
  z-index: 60;
  display: none;
}

.emoji-picker-popup.active {
  display: block;
  animation: modalPop 0.18s ease;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.emoji-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  padding: 4px;
  transition: transform 0.1s ease;
}

.emoji-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

/* Lightbox Modal (Zoom Fullscreen Images) */
#lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
}

.lightbox-controls {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Forward Message Modal */
.forward-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.forward-user-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   DEVELOPER & GITHUB SHOWCASE STYLING (Rajveer Singh - Rajveer071)
   ========================================================================== */

/* 1. Auth Hero Showcase Card */
.developer-showcase-card {
  position: relative;
  margin-top: 18px;
  background: linear-gradient(145deg, rgba(20, 22, 38, 0.9) 0%, rgba(13, 14, 25, 0.95) 100%);
  border: 1px solid rgba(108, 92, 231, 0.35);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 20px rgba(108, 92, 231, 0.15);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.developer-showcase-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 206, 201, 0.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 28px rgba(0, 206, 201, 0.25);
}

.dev-card-glow-bg {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 206, 201, 0.25) 0%, transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.dev-header-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dev-verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  background: rgba(0, 206, 201, 0.12);
  border: 1px solid rgba(0, 206, 201, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.dev-verified-chip svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.dev-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #55efc4;
}

.dev-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00b894;
  box-shadow: 0 0 8px #00b894;
  animation: pulse-live 1.8s infinite ease-in-out;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.dev-main-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.dev-avatar-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(108, 92, 231, 0.5);
  flex-shrink: 0;
}

.dev-avatar-letters {
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  letter-spacing: 0.5px;
}

.dev-text-group {
  display: flex;
  flex-direction: column;
}

.dev-author-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.dev-highlight-name {
  background: linear-gradient(135deg, #a29bfe 0%, #00cec9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.dev-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dev-social-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-github-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.dev-github-cta-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 206, 201, 0.2);
}

.dev-octocat-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dev-ext-arrow {
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: 0.7;
  margin-left: auto;
}

.dev-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* 2. Empty Chat State Creator Banner */
.empty-state-creator-box {
  margin-top: 22px;
  padding: 10px 18px;
  background: rgba(20, 22, 36, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.empty-state-creator-box:hover {
  border-color: rgba(108, 92, 231, 0.5);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.25);
}

.creator-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.creator-star-icon {
  font-size: 14px;
  color: #fdcb6e;
}

.creator-credit-text strong {
  color: var(--text-main);
}

.creator-dot-divider {
  color: rgba(255, 255, 255, 0.2);
}

.creator-github-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.creator-github-link:hover {
  color: #fff;
  text-decoration: underline;
}

.creator-git-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* 3. Settings Modal Showcase */
.settings-developer-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
  transition: var(--transition);
}

.settings-developer-card:hover {
  border-color: rgba(108, 92, 231, 0.4);
}

.settings-dev-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.settings-dev-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.settings-dev-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.settings-dev-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.settings-github-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.settings-github-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.settings-git-svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* 4. Sidebar Creator Footer */
.sidebar-creator-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 12, 19, 0.6);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .sidebar-creator-footer {
    display: none; /* Avoid obstructing mobile bottom navigation bar */
  }
}

.sidebar-creator-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  transition: var(--transition);
}

.sidebar-creator-link:hover {
  color: #fff;
}

.sidebar-creator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  flex-shrink: 0;
}

.sidebar-creator-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(108, 92, 231, 0.2);
  color: var(--primary-light);
  font-weight: 700;
}

/* 5. Contact Info & Call Selection Styles */
.contact-status-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.contact-status-pill.online {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.3);
}

.contact-status-pill.offline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-xs {
  padding: 4px 10px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

.item-row.selected {
  background: rgba(108, 92, 231, 0.18) !important;
  border-color: rgba(108, 92, 231, 0.4) !important;
}

/* Toast Notification Alerts */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-alert {
  background: rgba(20, 22, 36, 0.95);
  border: 1px solid rgba(0, 206, 201, 0.4);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 206, 201, 0.2);
  backdrop-filter: blur(12px);
  animation: toast-in 0.25s ease forwards;
  pointer-events: auto;
}

.toast-alert.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   PROFILE PHOTO STUDIO & SETTINGS AVATAR MANAGEMENT
   ========================================================================== */

.settings-profile-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.settings-avatar-wrapper {
  position: relative;
  cursor: pointer;
  margin-bottom: 12px;
  display: inline-block;
  border-radius: 50%;
}

.settings-avatar-preview {
  width: 104px;
  height: 104px;
  min-width: 104px;
  min-height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 22px rgba(108, 92, 231, 0.45);
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  background: #25283c;
}

.settings-avatar-wrapper:hover .settings-avatar-preview {
  transform: scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0, 206, 201, 0.45);
}

.settings-avatar-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  border: 2px solid #131524;
  transition: transform 0.2s ease, background 0.2s ease;
  pointer-events: none;
}

.settings-avatar-wrapper:hover .settings-avatar-badge {
  transform: scale(1.15);
  background: var(--accent);
  color: #131524;
}

.settings-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.settings-profile-username {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 600;
}

.settings-avatar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* Avatar Lightbox Modal */
.avatar-lightbox-card {
  max-width: 440px;
  width: 90%;
  padding: 24px;
  text-align: center;
  background: rgba(18, 20, 34, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.avatar-lightbox-img {
  width: 240px;
  height: 240px;
  max-width: 80vw;
  max-height: 80vw;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: 0 8px 36px rgba(108, 92, 231, 0.4);
  display: inline-block;
  margin: 16px 0;
}

/* Mobile Group Chat & Web Calling Responsive Arrangement */
@media (max-width: 768px) {
  /* Conference Grid on Mobile */
  .conference-grid {
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 10px;
    padding: 72px 10px 92px 10px;
    align-content: center;
  }

  .conference-tile {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .conf-tile-avatar {
    width: 58px;
    height: 58px;
  }

  .conf-avatar-pulse {
    width: 70px;
    height: 70px;
  }

  .conference-nametag {
    font-size: 10.5px;
    padding: 3px 8px;
    bottom: 6px;
    left: 6px;
  }

  .conf-nametag-name {
    max-width: 80px;
  }

  /* Group Chat Header & Messages on Mobile */
  .chat-header {
    padding: 10px 14px;
    min-height: 60px;
  }

  .chat-header-avatar {
    width: 38px;
    height: 38px;
  }

  .chat-header-name {
    font-size: 15px;
  }

  .chat-header-username {
    font-size: 11.5px;
    color: var(--accent);
  }

  .message-bubble-row {
    max-width: 88%;
    gap: 6px;
  }

  .message-bubble-row.has-sender-avatar {
    margin-left: 2px;
  }

  .msg-sender-mini-avatar {
    width: 26px;
    height: 26px;
  }

  .bubble-content {
    padding: 8px 12px;
    border-radius: 16px 16px 16px 4px;
  }

  .message-bubble-row.outgoing .bubble-content {
    border-radius: 16px 16px 4px 16px;
  }
}





