/* ==========================================================================
   MELOCHAT - CUSTOM DARK FUTURISTIC GLASSMORPHISM DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Harmonious Color Palette */
  --bg-deep: #030308;
  --bg-navy: #090a18;
  --bg-card: rgba(16, 17, 34, 0.65);
  --bg-input: rgba(10, 11, 24, 0.85);
  
  --primary-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  --accent-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --neon-purple: #c084fc;
  --neon-blue: #60a5fa;
  --neon-pink: #f472b6;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-neon: rgba(168, 85, 247, 0.4);
  
  --status-online: #10b981;
  --status-offline: #64748b;
  
  --btn-exit: #ef4444;
  --btn-next: #3b82f6;
  --btn-save: #a855f7;
  
  --glow-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
  --glow-shadow-blue: 0 0 20px rgba(59, 130, 246, 0.25);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.2) transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ambient Background Glows */
.bg-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.bg-glow-purple {
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  top: 10%;
  left: 20%;
  animation: float-glow-1 25s infinite alternate ease-in-out;
}

.bg-glow-blue {
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  bottom: 10%;
  right: 20%;
  animation: float-glow-2 25s infinite alternate ease-in-out;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
}

/* ==========================================================================
   LAYOUT SHELL (Centered Mobile Frame on Desktop)
   ========================================================================== */

.app-container {
  width: 100%;
  height: 100%;
  max-width: 440px; /* Perfect smartphone mock width */
  max-height: 920px;
  background: rgba(8, 9, 20, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
              0 0 40px rgba(168, 85, 247, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

/* On pure mobile displays, scale to full screen */
@media (max-width: 480px) {
  .app-container {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
}

/* App Header */
.app-header {
  height: 68px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(8, 9, 20, 0.4);
  z-index: 10;
}

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

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.logo-icon span {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand h1 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  gap: 8px;
}

/* App Navigation Bar (Sticky Bottom) */
.app-navbar {
  height: 72px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-glass);
  background: rgba(8, 9, 20, 0.9);
  padding-bottom: 8px;
  z-index: 10;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 12px;
  transition: all 0.3s ease;
  flex: 1;
}

.nav-item i {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.nav-item span {
  font-size: 11px;
  font-weight: 500;
}

.nav-item:hover {
  color: var(--text-primary);
}

.nav-item:hover i {
  transform: translateY(-2px);
}

.nav-item.active {
  color: var(--neon-purple);
}

/* App Viewport viewport container */
.app-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Screen Transitions */
.app-screen {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 20px;
  animation: fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-screen.active {
  display: flex;
}

/* ==========================================================================
   GLASSMORPHISM & ATOM ELEMENTS
   ========================================================================== */

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.icon-btn i {
  width: 18px;
  height: 18px;
}

.icon-btn.warning-hover:hover {
  color: var(--btn-exit);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

/* Buttons */
.gradient-btn {
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gradient-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.gradient-btn:active {
  transform: translateY(0);
}

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

.glass-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.danger-btn {
  background: var(--btn-exit);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.fill-width {
  width: 100%;
}

.text-gradient {
  background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-danger {
  color: #f87171 !important;
}

.text-success {
  color: #34d399 !important;
}

.bg-danger {
  background: var(--btn-exit) !important;
}

/* ==========================================================================
   SCREEN 1: AUTHENTICATION & LOGIN/SIGNUP UI
   ========================================================================== */

#screen-auth {
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-height: 100%;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-modes {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-mode-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.auth-mode-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Avatar setup */
.avatar-setup-container {
  margin-bottom: 20px;
}

.avatar-setup-container label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.avatar-grid-wrapper {
  display: flex;
  gap: 16px;
  align-items: center;
}

.avatar-selected-preview {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--neon-purple);
  padding: 2px;
  box-shadow: var(--glow-shadow);
}

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

.avatar-selected-preview .edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--neon-purple);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-selected-preview .edit-badge i {
  width: 10px;
  height: 10px;
  color: #fff;
}

.avatar-presets {
  flex: 1;
}

.avatar-presets p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.presets-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.avatar-preset-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  object-fit: cover;
}

.avatar-preset-img.active {
  border-color: var(--neon-purple);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

#avatar-custom-url {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 11px;
}

/* Inputs */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper i {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.input-icon-wrapper input {
  padding-left: 36px;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.auth-divider {
  text-align: center;
  position: relative;
  margin: 18px 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border-glass);
  z-index: 1;
}

.auth-divider span {
  position: relative;
  z-index: 2;
  background: rgba(16, 17, 34, 0.95);
  padding: 0 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

.auth-alternatives {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.google-icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   SCREEN 2: START CHAT (MATCHING CONTROLS)
   ========================================================================== */

.start-chat-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 24px;
}

.section-title-block h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.section-title-block p {
  color: var(--text-secondary);
  font-size: 13px;
}

.pref-card h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* Interested In tabs */
.interest-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 4px;
}

.interest-option {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.interest-option i {
  width: 18px;
  height: 18px;
}

.interest-option span {
  font-size: 12px;
  font-weight: 600;
}

.interest-option.active {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Location Card Picker */
.location-clickable-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
}

.location-card-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.location-pin-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2px;
}

.location-text {
  display: flex;
  flex-direction: column;
}

.location-text label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.location-text span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.arrow-right-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* Chat Type Categories Grid */
.chat-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chat-type-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.chat-type-card:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.12);
}

.chat-type-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.chat-type-desc {
  font-size: 10px;
  color: var(--text-secondary);
}

.chat-type-card.active {
  border-color: var(--neon-purple);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.1);
}

/* Premium Card lock rules */
.chat-type-card.premium-card {
  border-color: rgba(236, 72, 153, 0.15);
  background: rgba(236, 72, 153, 0.02);
}

.chat-type-card.premium-card.active {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.1);
  box-shadow: inset 0 0 10px rgba(236, 72, 153, 0.15);
}

.premium-lock-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #ec4899;
  display: flex;
}

.premium-lock-tag i {
  width: 12px;
  height: 12px;
}

.premium-badge-label {
  font-size: 9px;
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 700;
}

.large-btn {
  font-size: 16px;
  padding: 14px;
}

.online-indicator-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--status-online);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--status-online);
  animation: pulse-glow 1.5s infinite alternate;
}

/* ==========================================================================
   SCREEN 3: MATCHING QUEUE SCANNER
   ========================================================================== */

#screen-matching {
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.radar-shell {
  position: relative;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.radar-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
}

.radar-line {
  position: absolute;
  width: 50%;
  height: 50%;
  border-right: 2px solid var(--neon-purple);
  border-top: 2px solid var(--neon-purple);
  border-top-right-radius: 100%;
  top: 0;
  right: 0;
  transform-origin: bottom left;
  background: linear-gradient(45deg, transparent 40%, rgba(168, 85, 247, 0.15) 100%);
  animation: radar-sweep 4s linear infinite;
}

.radar-orbit {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.orbit-1 { width: 70%; height: 70%; }
.orbit-2 { width: 105%; height: 105%; }
.orbit-3 { width: 140%; height: 140%; }

.radar-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--neon-purple);
  box-shadow: var(--glow-shadow);
  padding: 2px;
  background: #000;
  z-index: 2;
}

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

.scanning-node {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 1.5px;
  background: #000;
  border: 1.5px solid var(--neon-blue);
  box-shadow: var(--glow-shadow-blue);
  opacity: 0;
  transform: scale(0.5);
}

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

.node-1 { top: 15%; left: 15%; animation: node-ping 3s infinite; }
.node-2 { bottom: 25%; right: 10%; animation: node-ping 3s 1s infinite; }
.node-3 { top: 40%; right: 20%; animation: node-ping 3s 2s infinite; }

.matching-text-block {
  text-align: center;
}

.matching-text-block h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.matching-text-block p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}

.matching-preference-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pref-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pref-tag i {
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   SCREEN 4: STRANGER CHAT WINDOW
   ========================================================================== */

#screen-stranger-chat {
  padding: 0;
}

.chat-interface-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.chat-room-header {
  height: 68px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 9, 20, 0.4);
}

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

.stranger-profile-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--status-online);
  border: 2px solid var(--bg-navy);
  border-radius: 50%;
}

.name-status {
  display: flex;
  flex-direction: column;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.name-row span {
  font-weight: 700;
  font-size: 15px;
}

.verified-badge {
  color: var(--neon-blue);
  display: flex;
}

.verified-badge i {
  width: 14px;
  height: 14px;
  fill: rgba(96, 165, 250, 0.1);
}

.premium-badge {
  color: #fbbf24;
  display: flex;
}

.premium-badge i {
  width: 13px;
  height: 13px;
  fill: rgba(251, 191, 36, 0.2);
}

.status-sub {
  font-size: 11px;
  color: var(--status-online);
  font-weight: 500;
}

.header-right {
  display: flex;
  gap: 4px;
}

.category-banner-stripe {
  background: rgba(168, 85, 247, 0.1);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  padding: 6px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.chat-feed-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Chat bubble styling */
.msg-bubble-wrapper {
  display: flex;
  gap: 8px;
  max-width: 82%;
  align-items: flex-end;
}

.msg-bubble-wrapper.received {
  align-self: flex-start;
}

.msg-bubble-wrapper.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-glass);
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  position: relative;
  word-break: break-word;
}

.msg-bubble-wrapper.received .msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.msg-bubble-wrapper.sent .msg-bubble {
  background: var(--primary-gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Chat Metadata details inside bubble */
.msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.msg-bubble-wrapper.received .msg-meta {
  color: var(--text-muted);
}

.ticks-read {
  color: var(--neon-blue);
  font-weight: bold;
}

.ticks-sent {
  color: rgba(255, 255, 255, 0.5);
}

/* Bubble Attachment media styling */
.bubble-attachment-image {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 6px;
  display: block;
}

.voice-note-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.vn-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.vn-play-btn i {
  width: 14px;
  height: 14px;
}

.vn-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
}

.vn-progress-fill {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 2px;
}

.vn-duration {
  font-size: 10px;
  font-weight: 500;
}

/* Typing Indicator design */
.typing-indicator-row {
  padding: 4px 16px 10px;
}

.typing-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: 14px;
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--neon-purple);
  border-radius: 50%;
  animation: typing-bounce 1s infinite alternate;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

#stranger-typing-text {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-left: 4px;
}

/* Message Input area */
.chat-footer-wrapper {
  background: rgba(8, 9, 20, 0.85);
  border-top: 1px solid var(--border-glass);
  padding: 10px 14px;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 4px 10px;
  margin-bottom: 8px;
}

.input-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.input-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.input-action-btn i {
  width: 18px;
  height: 18px;
}

.input-text-area {
  flex: 1;
}

.input-text-area input {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 8px 4px;
  font-size: 13.5px;
}

.send-message-btn {
  background: var(--primary-gradient);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.send-message-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.send-message-btn i {
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
}

/* Chat actions row at very bottom */
.chat-action-floating-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
}

.floating-action-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.floating-action-btn .btn-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}

.floating-action-btn .btn-icon i {
  width: 14px;
  height: 14px;
}

.floating-action-btn span {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Hover accent colors for footer buttons */
.danger-btn-hover:hover {
  border-color: rgba(239, 68, 68, 0.3);
}
.danger-btn-hover:hover .btn-icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--btn-exit);
}
.danger-btn-hover:hover span {
  color: var(--text-primary);
}

.primary-btn-hover:hover {
  border-color: rgba(59, 130, 246, 0.3);
}
.primary-btn-hover:hover .btn-icon {
  background: rgba(59, 130, 246, 0.2);
  color: var(--btn-next);
}
.primary-btn-hover:hover span {
  color: var(--text-primary);
}

.success-btn-hover:hover {
  border-color: rgba(168, 85, 247, 0.3);
}
.success-btn-hover:hover .btn-icon {
  background: rgba(168, 85, 247, 0.2);
  color: var(--btn-save);
}
.success-btn-hover:hover span {
  color: var(--text-primary);
}

/* ==========================================================================
   SCREEN 5: MESSAGES LIST (Saved Threads)
   ========================================================================== */

.messages-list-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.messages-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

.messages-tabs-row {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 14px;
  gap: 12px;
}

.msg-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 4px 10px;
  cursor: pointer;
  position: relative;
}

.msg-tab.active {
  color: var(--neon-purple);
}

.msg-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--neon-purple);
  border-radius: 4px;
  box-shadow: 0 0 8px var(--neon-purple);
}

.search-messages-bar {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0 12px;
  margin-bottom: 16px;
  height: 38px;
}

.search-messages-bar i {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-messages-bar input {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 13px;
  padding: 4px 8px;
}

.threads-list-viewport {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Individual list item thread card */
.thread-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.thread-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
}

.thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-glass);
}

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

.thread-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.thread-name-flex {
  display: flex;
  align-items: center;
  gap: 4px;
}

.thread-name-flex h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.thread-category-badge {
  font-size: 8.5px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--neon-purple);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.thread-category-badge.premium-cat {
  background: rgba(236, 72, 153, 0.15);
  color: var(--neon-pink);
}

.thread-time {
  font-size: 10px;
  color: var(--text-muted);
}

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

.thread-last-msg {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85%;
}

.unread-badge {
  background: var(--neon-purple);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 6px var(--neon-purple);
}

/* ==========================================================================
   SCREEN 6: PROFILE & PRIVACY
   ========================================================================== */

.profile-settings-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
}

.profile-header-strip h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
}

.profile-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  text-align: center;
  gap: 12px;
}

.profile-avatar-container {
  position: relative;
  width: 84px;
  height: 84px;
}

.profile-avatar-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-purple);
  padding: 2px;
}

.profile-camera-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--neon-purple);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s ease;
}

.profile-camera-edit:hover {
  transform: scale(1.1);
  box-shadow: var(--glow-shadow);
}

.profile-camera-edit i {
  width: 12px;
  height: 12px;
}

.profile-name-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.profile-name-edit h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}

.icon-btn-inline {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.icon-btn-inline i {
  width: 14px;
  height: 14px;
}

.icon-btn-inline:hover {
  color: var(--text-primary);
}

.user-unique-id {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Privacy toggles list styling */
.settings-group-card {
  padding: 16px 20px;
}

.settings-group-card h4 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  font-weight: 700;
}

.privacy-switches-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.switch-text {
  display: flex;
  flex-direction: column;
}

.switch-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.switch-subtitle {
  font-size: 10.5px;
  color: var(--text-secondary);
}

/* HTML Switch slider template */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .2s;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .2s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: rgba(168, 85, 247, 0.3);
  border-color: var(--neon-purple);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
  background-color: var(--neon-purple);
  box-shadow: 0 0 6px var(--neon-purple);
}

/* Navigable settings rows */
.option-navigate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.option-navigate-row:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.option-navigate-row:first-child {
  padding-top: 4px;
}

.option-text {
  font-size: 13.5px;
  font-weight: 500;
}

.option-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.option-right i {
  width: 14px;
  height: 14px;
}

.option-badge {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}

.danger-text {
  color: #f87171 !important;
}

/* ==========================================================================
   SCREEN 7: ADMIN DASHBOARD
   ========================================================================== */

#screen-admin {
  padding: 16px;
  overflow-y: auto;
  max-width: 100%;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.admin-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
}

.sys-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sys-badge i {
  width: 12px;
  height: 12px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box {
  padding: 12px 14px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  margin: 2px 0;
}

.stat-sub {
  font-size: 9.5px;
  color: var(--text-muted);
}

.admin-cols-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-col h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.admin-subtext {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: -6px;
  margin-bottom: 10px;
}

.admin-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

/* Table item in Admin Reports list */
.report-list-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.report-reporter-info {
  display: flex;
  flex-direction: column;
}

.report-user-bold {
  font-weight: 700;
}

.report-reason {
  color: var(--text-secondary);
  font-size: 10px;
}

.report-action-btn-row {
  display: flex;
  gap: 4px;
}

.admin-btn-action {
  font-size: 9.5px;
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.admin-btn-action.ban-action {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.admin-btn-action.resolve-action {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* Spy user lists in dashboard */
.live-match-spy-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.live-spy-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.live-spy-item:hover {
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.03);
}

.spy-match-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.spy-match-category {
  font-size: 8.5px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--neon-blue);
  font-weight: 700;
}

.spy-match-active-status {
  font-size: 10px;
  color: var(--status-online);
}

/* Spied Chat bubble panel */
.spy-chat-panel {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  height: 150px;
}

.spy-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.spy-names {
  font-size: 10.5px;
  font-weight: bold;
}

.spy-names span {
  color: var(--neon-purple);
}

.spy-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.5px;
}

.spy-msg {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.spy-msg-sender {
  font-weight: bold;
  margin-right: 4px;
}

/* Moderation quick controls */
.admin-moderation-card h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.search-ban-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.search-ban-row input {
  font-size: 12px;
  padding: 8px 12px;
}

.search-ban-row button {
  font-size: 12px;
  padding: 8px 16px;
}

.moderated-users-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.banned-tags-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.banned-user-tag {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 10px;
}

/* ==========================================================================
   DRAWER PANELS & MODALS OVERLAY TEMPLATES
   ========================================================================== */

.drawer-overlay, .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: flex-end; /* Drawer slide up default */
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.drawer-overlay.active, .modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* Drawer panels sliding up */
.drawer-panel {
  width: 100%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  padding: 24px;
  animation: slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: rgba(12, 13, 28, 0.95);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.drawer-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}

.close-drawer-btn, .close-modal-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.close-drawer-btn i, .close-modal-btn i {
  width: 20px;
  height: 20px;
}

.close-drawer-btn:hover, .close-modal-btn:hover {
  color: var(--text-primary);
}

/* Action drawer lists items */
.drawer-menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
}

.drawer-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.drawer-item-icon i {
  width: 18px;
  height: 18px;
}

.danger-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.primary-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.success-icon {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.warning-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.drawer-item-details {
  display: flex;
  flex-direction: column;
}

.drawer-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-item-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Attachment Grid Menu */
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  justify-items: center;
}

.attachment-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.attachment-item:hover {
  color: var(--text-primary);
}

.attachment-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  transition: transform 0.2s ease;
}

.attachment-item:hover .attachment-icon-wrapper {
  transform: scale(1.1);
}

.attachment-icon-wrapper i {
  width: 22px;
  height: 22px;
}

.photo-bg { background: #3b82f6; }
.camera-bg { background: #ef4444; }
.gallery-bg { background: #ec4899; }
.file-bg { background: #10b981; }
.voice-bg { background: #8b5cf6; }
.location-bg { background: #f59e0b; }
.contact-bg { background: #06b6d4; }

.attachment-item span {
  font-size: 11px;
  font-weight: 500;
}

.hidden-input {
  display: none;
}

/* Modals center styling default override */
.modal-overlay {
  align-items: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: rgba(12, 13, 28, 0.98);
  border-radius: 24px;
  animation: zoom-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Voice Recorder UI */
.voice-recorder-panel-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 30px;
  background: rgba(12, 13, 28, 0.98);
}

.recorder-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.record-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

#recording-timer {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.waveform-container {
  width: 100%;
  height: 48px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}

#waveform-canvas {
  width: 100%;
  height: 100%;
}

.voice-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.slide-cancel-area {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.arrow-swipe {
  width: 14px;
  height: 14px;
  animation: swipe-left-motion 1.5s infinite;
}

.circle-btn {
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.circle-btn:hover {
  transform: scale(1.05);
}

.circle-btn i {
  width: 18px;
  height: 18px;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

.cancel-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.record-mic-active {
  background: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Razorpay Card Styles */
.razorpay-payment-card {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.razorpay-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.15);
}

.razorpay-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
}

.rzp-blue {
  color: #3399cc;
}

.merchant-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
}

.merchant-details h4 {
  font-size: 15px;
  font-weight: 700;
}

.merchant-name {
  font-size: 11px;
  color: var(--text-secondary);
}

.price-bubble {
  background: rgba(51, 153, 204, 0.1);
  border: 1px solid rgba(51, 153, 204, 0.2);
  color: #3399cc;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}

.payment-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.1);
}

.payment-tab-item {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-tab-item.active {
  color: #3399cc;
  background: rgba(51, 153, 204, 0.03);
  box-shadow: inset 0 -2px 0 #3399cc;
}

.payment-fields-viewport {
  padding: 20px;
  min-height: 180px;
}

.payment-method-fields {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.payment-method-fields.active {
  display: flex;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.upi-help-text {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

.banks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bank-select-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.bank-select-btn:hover {
  background: rgba(51, 153, 204, 0.08);
  border-color: rgba(51, 153, 204, 0.3);
}

.payment-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
}

.payment-submit-btn {
  background: #3399cc;
  border: none;
  color: #fff;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-submit-btn:hover {
  background: #2b84b0;
  box-shadow: 0 0 15px rgba(51, 153, 204, 0.4);
}

.rzp-secure-badge {
  font-size: 10.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.rzp-secure-badge i {
  width: 12px;
  height: 12px;
}

/* Razorpay loader screen */
.payment-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 13, 28, 0.98);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  z-index: 10;
  padding: 30px;
  text-align: center;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(51, 153, 204, 0.2);
  border-top-color: #3399cc;
  border-radius: 50%;
  animation: spinner-rotation 1s linear infinite;
}

.payment-loader-overlay h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.payment-loader-overlay p {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Emoji selector float popup */
.emoji-picker-popup {
  position: absolute;
  bottom: 124px;
  left: 20px;
  background: rgba(16, 17, 34, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 90;
  backdrop-filter: blur(12px);
  max-width: 260px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.emoji-grid span {
  font-size: 20px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s ease;
  user-select: none;
}

.emoji-grid span:hover {
  transform: scale(1.25);
}

/* ==========================================================================
   TOAST ALERTS SYSTEM
   ========================================================================== */

.toast-container {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 82%;
  max-width: 320px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  background: rgba(16, 17, 34, 0.95);
  border: 1px solid var(--border-glass);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  animation: slide-down-toast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast-icon-success { color: var(--status-online); }
.toast-icon-warning { color: #f59e0b; }
.toast-icon-danger { color: #ef4444; }
.toast-icon-info { color: #3b82f6; }

.toast-item i {
  width: 16px;
  height: 16px;
}

/* Helper Tooltip Class */
.tooltip {
  position: relative;
}

/* Helper states togglers */
.hidden {
  display: none !important;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

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

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

@keyframes float-glow-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes float-glow-2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-60px, -40px) scale(0.9); }
}

@keyframes pulse-glow {
  0% { opacity: 0.6; box-shadow: 0 0 4px var(--status-online); }
  100% { opacity: 1; box-shadow: 0 0 12px var(--status-online); }
}

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes node-ping {
  0% { transform: scale(0.2); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

@keyframes typing-bounce {
  0% { transform: translateY(0); opacity: 0.4; }
  100% { transform: translateY(-4px); opacity: 1; }
}

@keyframes swipe-left-motion {
  0% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(-4px); opacity: 0.2; }
  100% { transform: translateX(0); opacity: 0.8; }
}

@keyframes spinner-rotation {
  to { transform: rotate(360deg); }
}

@keyframes slide-down-toast {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Leaflet Dark Futuristic Map Filters */
#map-canvas .leaflet-tile {
  filter: invert(100%) hue-rotate(180deg) brightness(88%) contrast(90%);
}

.leaflet-container {
  background: #090a18 !important;
}

.leaflet-bar {
  border: 1px solid var(--border-glass) !important;
  background-color: var(--bg-card) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.leaflet-bar a {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-glass) !important;
  transition: background-color 0.2s ease;
}

.leaflet-bar a:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--neon-purple) !important;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: rgba(12, 13, 28, 0.95) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-glass) !important;
  backdrop-filter: blur(8px);
}

/* Custom form grid extensions */
.form-grid {
  margin-bottom: 10px;
}
