/* ============================================
   NEXUS CHAT — Design System
   Palette: Acid Neon (#CCFF00, #FF3CAC, #0D0D0D)
   Fonts: Clash Display + Chillax + Space Mono
   ============================================ */

:root {
  --neon-green: #CCFF00;
  --neon-pink: #FF3CAC;
  --neon-blue: #00D4FF;
  --neon-purple: #9B59FF;
  --bg-void: #0D0D0D;
  --bg-deep: #111111;
  --bg-surface: #161616;
  --bg-elevated: #1E1E1E;
  --bg-glass: rgba(255,255,255,0.04);
  --bg-glass-hover: rgba(255,255,255,0.07);
  --border-subtle: rgba(255,255,255,0.06);
  --border-glow: rgba(204,255,0,0.3);
  --text-primary: #F0F0F0;
  --text-secondary: #888888;
  --text-muted: #444444;
  --font-display: 'Clash Display', sans-serif;
  --font-body: 'Chillax', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 30px rgba(204,255,0,0.15);
  --shadow-pink: 0 0 30px rgba(255,60,172,0.2);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(204,255,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,255,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
  0% { transform: translate(0,0); }
  100% { transform: translate(60px, 60px); }
}

.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--neon-green), transparent 70%);
  top: -200px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--neon-pink), transparent 70%);
  bottom: -150px; right: -100px;
  animation-delay: -4s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--neon-blue), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -8s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== JOIN SCREEN ===== */
.join-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.6s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.join-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(40px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), var(--shadow-glow);
  animation: cardReveal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cardReveal {
  from { opacity: 0; transform: scale(0.9) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.join-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.logo-icon {
  font-size: 32px;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(204,255,0,0.5));
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(204,255,0,0.5)); }
  50% { filter: drop-shadow(0 0 24px rgba(204,255,0,0.9)); }
}
.logo-text {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.join-tagline {
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 36px;
}

.join-form { display: flex; flex-direction: column; gap: 20px; }

.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--neon-green);
  text-transform: uppercase;
}

.input-group input {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}
.input-group input:focus {
  border-color: var(--neon-green);
  background: rgba(204,255,0,0.04);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.1);
}
.input-group input::placeholder { color: var(--text-muted); }

.room-row { display: flex; gap: 8px; }
.room-row input { flex: 1; }

.btn-ghost {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 0 14px;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(204,255,0,0.06);
}

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--neon-green), #88DD00);
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 24px;
  color: #0D0D0D;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(204,255,0,0.4); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.join-footer {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 28px;
}
.badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 5px 12px;
}

/* ===== MAIN APP LAYOUT ===== */
.app {
  position: fixed; inset: 0; z-index: 10;
  display: flex;
  animation: appReveal 0.5s ease;
}
@keyframes appReveal { from { opacity: 0; } to { opacity: 1; } }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px; flex-shrink: 0;
  background: rgba(14, 14, 14, 0.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  padding: 0;
  position: relative; z-index: 1;
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.logo-sm {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  letter-spacing: 3px;
  color: var(--neon-green);
}
.logo-icon-sm { font-size: 18px; }

.connection-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: connPulse 2s ease-in-out infinite;
}
.connection-dot.disconnected { background: #ff4444; box-shadow: 0 0 8px #ff4444; }
@keyframes connPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.room-info {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.room-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 2px;
  color: var(--text-muted);
}
.room-id-display {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--neon-green);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-btn {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.copy-btn:hover { color: var(--neon-green); }

.users-section { flex: 1; overflow-y: auto; padding: 16px 0; }
.section-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0 20px 10px;
}

.users-list { display: flex; flex-direction: column; gap: 2px; }

.user-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.user-item:hover { background: var(--bg-glass); }
.user-item.active-peer { background: rgba(204,255,0,0.05); }
.user-item.active-peer::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
  position: relative;
}
.user-avatar .online-ring {
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  box-shadow: 0 0 8px rgba(204,255,0,0.4);
  animation: ringPulse 2s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

.user-details { flex: 1; min-width: 0; }
.user-name {
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-sub { font-size: 11px; color: var(--text-muted); }

.sidebar-footer {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.2);
}
.my-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
  color: #0D0D0D;
}
.avatar-ring {
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  box-shadow: 0 0 10px rgba(204,255,0,0.5);
}
.my-info { flex: 1; min-width: 0; }
.my-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-status { font-size: 11px; color: var(--neon-green); }

.leave-btn {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.leave-btn:hover { color: #ff4444; background: rgba(255,68,68,0.1); }

/* ===== CHAT AREA ===== */
.chat-area {
  flex: 1;
  display: flex; flex-direction: column;
  background: rgba(13, 13, 13, 0.7);
  backdrop-filter: blur(10px);
  position: relative; overflow: hidden;
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(14,14,14,0.8);
  backdrop-filter: blur(20px);
  flex-shrink: 0;
}
.chat-header-left { display: flex; align-items: center; gap: 14px; }

.peer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  flex-shrink: 0;
}
.peer-name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
}
.peer-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-dot.online { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); }

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

.action-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.action-btn:hover:not(:disabled) {
  background: var(--bg-glass-hover);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 12px rgba(204,255,0,0.15);
}
.action-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.action-btn.active {
  background: rgba(204,255,0,0.1);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

/* ===== MESSAGES ===== */
.messages-container {
  flex: 1; overflow-y: auto;
  padding: 20px 24px;
  scroll-behavior: smooth;
}
.messages-container::-webkit-scrollbar { width: 4px; }
.messages-container::-webkit-scrollbar-track { background: transparent; }
.messages-container::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 2px; }

.messages-inner { display: flex; flex-direction: column; gap: 4px; min-height: 100%; justify-content: flex-end; }

.system-msg {
  text-align: center;
  padding: 8px 16px;
  margin: 12px auto;
}
.system-msg span {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 6px 14px;
  display: inline-block;
}

.message-group { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; }

.message-row {
  display: flex; align-items: flex-end; gap: 10px;
  animation: msgSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message-row.own { flex-direction: row-reverse; }

.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-display);
  flex-shrink: 0;
  margin-bottom: 2px;
}

.message-bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.message-row:not(.own) .message-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}

.message-row.own .message-bubble {
  background: linear-gradient(135deg, rgba(204,255,0,0.15), rgba(204,255,0,0.08));
  border: 1px solid rgba(204,255,0,0.2);
  border-bottom-right-radius: 4px;
  color: var(--text-primary);
}

.message-row.own .message-bubble::after {
  content: '';
  position: absolute; bottom: 0; right: -1px;
  width: 0; height: 0;
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  padding: 0 4px;
}
.message-row.own .msg-time { text-align: right; }

.msg-sender {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
  padding: 0 4px;
  font-family: var(--font-mono);
}

/* Emoji-only messages */
.message-bubble.emoji-only {
  background: transparent !important;
  border: none !important;
  font-size: 36px;
  padding: 4px 8px;
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 24px 4px;
  animation: fadeIn 0.3s ease;
}
.typing-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  color: white;
}
.typing-dots {
  display: flex; gap: 4px; align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 12px;
}
.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); background: var(--text-muted); }
  30% { transform: translateY(-6px); background: var(--neon-green); }
}
.typing-text { font-size: 12px; color: var(--text-muted); }

/* ===== MESSAGE INPUT ===== */
.message-input-area {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(14,14,14,0.8);
  backdrop-filter: blur(20px);
  flex-shrink: 0;
  position: relative;
}

.input-toolbar {
  display: flex; align-items: flex-end; gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 14px;
  transition: var(--transition);
}
.input-toolbar:focus-within {
  border-color: rgba(204,255,0,0.3);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.06);
}

.toolbar-btn {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.toolbar-btn:hover { color: var(--neon-green); background: rgba(204,255,0,0.08); }

.message-input-wrap { flex: 1; }
#message-input {
  width: 100%;
  background: none; border: none; outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  padding: 4px 0;
}
#message-input::placeholder { color: var(--text-muted); }
#message-input::-webkit-scrollbar { width: 3px; }
#message-input::-webkit-scrollbar-thumb { background: var(--border-subtle); }

.send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-green), #88DD00);
  border: none;
  color: #0D0D0D;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.send-btn:hover:not(:disabled) { transform: scale(1.1); box-shadow: 0 0 16px rgba(204,255,0,0.5); }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
.send-btn:active:not(:disabled) { transform: scale(0.95); }

/* ===== EMOJI PICKER ===== */
.emoji-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 20px;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 50;
  animation: pickerReveal 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pickerReveal {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.emoji-btn {
  background: none; border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-align: center;
  line-height: 1;
}
.emoji-btn:hover { background: var(--bg-glass-hover); transform: scale(1.2); }

/* ===== VIDEO CALL OVERLAY ===== */
.call-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
}

.call-bg-blur {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
}

/* Incoming call */
.incoming-call {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: incomingReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes incomingReveal {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.incoming-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700;
  color: white;
  position: relative;
  animation: avatarRing 1.5s ease-in-out infinite;
}
@keyframes avatarRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,60,172,0.4), 0 0 0 0 rgba(255,60,172,0.2); }
  50% { box-shadow: 0 0 0 20px rgba(255,60,172,0.1), 0 0 0 40px rgba(255,60,172,0.05); }
}

.incoming-name {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  color: var(--text-primary);
}
.incoming-label {
  font-size: 14px; color: var(--text-secondary);
  animation: labelPulse 1.5s ease-in-out infinite;
}
@keyframes labelPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.incoming-actions { display: flex; gap: 40px; margin-top: 16px; }

.call-action-btn {
  width: 68px; height: 68px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.call-action-btn.decline {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  box-shadow: 0 8px 24px rgba(255,68,68,0.4);
}
.call-action-btn.accept {
  background: linear-gradient(135deg, var(--neon-green), #88DD00);
  color: #0D0D0D;
  box-shadow: 0 8px 24px rgba(204,255,0,0.4);
}
.call-action-btn:hover { transform: scale(1.1); }
.call-action-btn:active { transform: scale(0.95); }

/* Active call */
.active-call {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
}

.videos-container {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

.remote-video-wrap {
  width: 100%; height: 100%;
  position: relative;
}
#remote-video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.local-video-wrap {
  position: absolute;
  bottom: 20px; right: 20px;
  width: 200px; height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(204,255,0,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 20px rgba(204,255,0,0.15);
  cursor: move;
  transition: border-color 0.2s;
}
.local-video-wrap:hover { border-color: var(--neon-green); }
#local-video { width: 100%; height: 100%; object-fit: cover; }

.video-label {
  position: absolute;
  bottom: 8px; left: 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.no-video-placeholder {
  position: absolute; inset: 0;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
.placeholder-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  color: white;
}
.placeholder-text { font-size: 13px; color: var(--text-secondary); }

/* Call info bar */
.call-info-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
}
.call-peer-name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
}
.call-timer {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--neon-green);
}
.call-quality { display: flex; align-items: flex-end; gap: 3px; }
.quality-bar {
  width: 4px;
  background: var(--neon-green);
  border-radius: 2px;
  opacity: 0.4;
}
.quality-bar:nth-child(1) { height: 6px; opacity: 1; }
.quality-bar:nth-child(2) { height: 10px; opacity: 0.8; }
.quality-bar:nth-child(3) { height: 14px; opacity: 0.6; }
.quality-bar:nth-child(4) { height: 18px; opacity: 0.4; }

/* Call controls */
.call-controls {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 20px 24px 28px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
}

.ctrl-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.ctrl-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }
.ctrl-btn.muted {
  background: rgba(255,68,68,0.2);
  border-color: rgba(255,68,68,0.4);
  color: #ff6666;
}
.ctrl-btn.cam-off {
  background: rgba(255,68,68,0.2);
  border-color: rgba(255,68,68,0.4);
  color: #ff6666;
}
.ctrl-btn.end-call-btn {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border-color: transparent;
  width: 64px; height: 64px;
  box-shadow: 0 8px 24px rgba(255,68,68,0.4);
}
.ctrl-btn.end-call-btn:hover { transform: scale(1.1); box-shadow: 0 12px 32px rgba(255,68,68,0.6); }
.ctrl-btn.screen-sharing {
  background: rgba(204,255,0,0.15);
  border-color: rgba(204,255,0,0.3);
  color: var(--neon-green);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(20px);
  pointer-events: all;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; align-items: center; gap: 10px;
  min-width: 240px; max-width: 340px;
}
.toast.success { border-color: rgba(204,255,0,0.3); }
.toast.error { border-color: rgba(255,68,68,0.3); }
.toast.info { border-color: rgba(0,212,255,0.3); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(0.9); }
}

/* ===== AVATAR COLORS ===== */
.avatar-color-0 { background: linear-gradient(135deg, #CCFF00, #88DD00); color: #0D0D0D; }
.avatar-color-1 { background: linear-gradient(135deg, #FF3CAC, #9B59FF); color: white; }
.avatar-color-2 { background: linear-gradient(135deg, #00D4FF, #0099CC); color: #0D0D0D; }
.avatar-color-3 { background: linear-gradient(135deg, #FF6B2B, #FFB088); color: #0D0D0D; }
.avatar-color-4 { background: linear-gradient(135deg, #9B59FF, #6C3CE1); color: white; }
.avatar-color-5 { background: linear-gradient(135deg, #00FFB3, #00CC8E); color: #0D0D0D; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { width: 220px; }
  .local-video-wrap { width: 120px; height: 90px; }
  .call-controls { gap: 10px; }
  .ctrl-btn { width: 48px; height: 48px; }
  .ctrl-btn.end-call-btn { width: 56px; height: 56px; }
}
@media (max-width: 600px) {
  .sidebar { display: none; }
  .join-card { padding: 32px 24px; }
  .message-bubble { max-width: 85%; }
}