/* ==========================================================================
   InLobby Theme — Modern Identity Override Layer
   Loads AFTER discord.css to override Discord-style aesthetics
   ========================================================================== */

/* 1. InLobby CSS Variables */
:root {
  --bg-primary:         #0a0d14;
  --bg-secondary:       #131824;
  --bg-secondary-alt:   #0f1420;
  --bg-tertiary:        #0d1017;
  --bg-chat-input:      #1a2035;
  --bg-card:            rgba(19, 24, 36, 0.65);
  --brand-color:        #00D2FF;
  --brand-hover:        #00b8e0;
  --brand-gradient:     linear-gradient(135deg, #00D2FF 0%, #38EF7D 100%);
  --brand-glow:         0 0 24px rgba(0, 210, 255, 0.45);
  --accent-cyan:        #38EF7D;
  --online-color:       #38EF7D;
  --text-header:        #f0f6ff;
  --text-normal:        #c8d6e8;
  --text-muted:         #6b7fa3;
  --text-interactive:   #9ab0cc;
  --border-subtle:      rgba(0, 210, 255, 0.08);
  --border-glow:        rgba(0, 210, 255, 0.35);
  --bg-modifier-hover:    rgba(0, 210, 255, 0.06);
  --bg-modifier-active:   rgba(0, 210, 255, 0.12);
  --bg-modifier-selected: rgba(0, 210, 255, 0.14);
  --role-admin: #FFD700;
  --role-mod:   #00D2FF;
  --role-member: #38EF7D;
  --font-discord: 'Plus Jakarta Sans', 'Readex Pro', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic:  'Readex Pro', 'Cairo', sans-serif;
  --glass-bg:      rgba(10, 13, 20, 0.72);
  --glass-border:  rgba(0, 210, 255, 0.12);
  --glass-blur:    24px;
}

body { font-family: var(--font-discord); background-color: var(--bg-primary); }

::-webkit-scrollbar-thumb { background: rgba(0,210,255,0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,210,255,0.35); }

/* Server Rail */
.server-rail {
  width: 68px;
  background: rgba(10, 13, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(0, 210, 255, 0.06);
  gap: 8px;
}
.guild-icon {
  width: 46px; height: 46px; border-radius: 18px;
  background: rgba(19, 24, 36, 0.9);
  border: 1px solid rgba(0, 210, 255, 0.10);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.guild-icon:hover {
  border-radius: 14px;
  background: var(--brand-gradient);
  border-color: rgba(0,210,255,0.5);
  box-shadow: var(--brand-glow);
  transform: scale(1.08) translateY(-1px);
}
.guild-icon.active {
  border-radius: 14px;
  background: var(--brand-gradient);
  border-color: rgba(0,210,255,0.6);
  box-shadow: var(--brand-glow);
}
.guild-pill-indicator {
  right: -10px; top: 10px; width: 3px; height: 22px;
  background: linear-gradient(180deg, #00D2FF, #38EF7D);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(0,210,255,0.8);
}
.add-guild-btn { background: rgba(0,210,255,0.08); color: #00D2FF; border-color: rgba(0,210,255,0.2); }
.add-guild-btn:hover { background: var(--brand-gradient); color: #0a0d14; border-color: #00D2FF; }
.explore-guild-btn { background: rgba(56,239,125,0.08); color: #38EF7D; border-color: rgba(56,239,125,0.2); }
.explore-guild-btn:hover { background: #38EF7D; color: #0a0d14; }
.server-separator { background: linear-gradient(90deg,transparent,rgba(0,210,255,0.2),transparent); width: 36px; }

/* Channels Sidebar */
.sidebar-channels {
  background: rgba(13, 16, 23, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(0,210,255,0.05);
}
.room-header {
  background: rgba(10,13,20,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,210,255,0.07);
}
.room-title {
  background: var(--brand-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.room-code-tag { color: #00D2FF; }
.channel-item { border-radius: 8px; padding: 8px 12px; transition: all 0.18s ease; }
.channel-item:hover { background: rgba(0,210,255,0.07); color: var(--text-header); transform: translateX(-2px); }
.channel-item.active { background: rgba(0,210,255,0.12); color: #00D2FF; border-right: 2px solid #00D2FF; }
.category-header { font-size: 10.5px; letter-spacing: 0.8px; color: rgba(0,210,255,0.55); }

/* Lobby Dashboard */
.lobby-dashboard {
  margin: 12px 8px 8px; padding: 12px;
  background: rgba(0,210,255,0.04);
  border: 1px solid rgba(0,210,255,0.10);
  border-radius: 12px; backdrop-filter: blur(12px);
}
.lobby-dashboard-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px;
  color: #00D2FF; margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.lobby-dashboard-title::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: #38EF7D; border-radius: 50%; box-shadow: 0 0 6px #38EF7D;
  animation: lobby-pulse 2s infinite ease-in-out;
}
@keyframes lobby-pulse {
  0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(0.85)}
}
.active-room-card {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  background: rgba(0,210,255,0.07); border: 1px solid rgba(0,210,255,0.12);
  border-radius: 8px; margin-bottom: 5px; cursor: pointer; transition: all 0.18s ease;
}
.active-room-card:hover { background: rgba(0,210,255,0.13); border-color: rgba(0,210,255,0.28); transform: translateX(-2px); }
.active-room-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand-gradient); display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.active-room-info { flex: 1; min-width: 0; }
.active-room-name { font-size: 12px; font-weight: 600; color: var(--text-header); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active-room-count { font-size: 10px; color: #38EF7D; }
.quick-join-btn {
  font-size: 10px; font-weight: 700;
  background: rgba(0,210,255,0.15); color: #00D2FF;
  border: 1px solid rgba(0,210,255,0.25); border-radius: 6px;
  padding: 3px 8px; cursor: pointer; transition: all 0.15s ease; white-space: nowrap; flex-shrink: 0;
}
.quick-join-btn:hover { background: #00D2FF; color: #0a0d14; }
.lobby-no-rooms { text-align: center; font-size: 11px; color: var(--text-muted); padding: 8px 0 4px; opacity: 0.7; }

/* Chat Area */
.chat-area { background: rgba(10,13,20,0.90); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.chat-header {
  background: rgba(10,13,20,0.90); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,210,255,0.07); box-shadow: 0 1px 20px rgba(0,0,0,0.25);
}
.channel-name-title { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.channel-hash { color: rgba(0,210,255,0.5); }

/* Message Bubble Cards */
.message-entry {
  background: rgba(19,24,36,0.55);
  border: 1px solid rgba(0,210,255,0.055);
  border-radius: 12px; padding: 10px 14px 8px 14px; margin-bottom: 5px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all 0.18s ease; gap: 12px;
}
.message-entry:hover { background: rgba(19,24,36,0.80); border-color: rgba(0,210,255,0.13); box-shadow: 0 2px 16px rgba(0,0,0,0.2); transform: translateX(-1px); }
.message-entry.own-message { background: rgba(0,210,255,0.055); border-color: rgba(0,210,255,0.12); }
.message-avatar { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.35); border: 1.5px solid rgba(0,210,255,0.15); }
.message-author { font-size: 14px; font-weight: 700; }
.message-time { font-size: 10.5px; color: rgba(107,127,163,0.7); }
.message-text { font-size: 14px; line-height: 1.5; color: var(--text-normal); }
.author-role-badge { font-size: 9.5px; padding: 1px 7px; border-radius: 6px; font-weight: 700; letter-spacing: 0.3px; }
.author-role-badge.admin { background: rgba(255,215,0,0.12); color: #FFD700; border: 1px solid rgba(255,215,0,0.2); }
.author-role-badge.mod { background: rgba(0,210,255,0.12); color: #00D2FF; border: 1px solid rgba(0,210,255,0.2); }
.reaction-bubble { background: rgba(0,210,255,0.07); border-color: rgba(0,210,255,0.15); border-radius: 8px; }
.reaction-bubble:hover { background: rgba(0,210,255,0.15); border-color: #00D2FF; }
.reaction-bubble.reacted { background: rgba(0,210,255,0.18); border-color: #00D2FF; }

/* Chat Input */
.input-wrapper {
  background: rgba(26,32,53,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0,210,255,0.10); border-radius: 14px; box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.input-wrapper:focus-within { border-color: rgba(0,210,255,0.4); box-shadow: 0 0 0 3px rgba(0,210,255,0.08),0 4px 24px rgba(0,0,0,0.3); }
.send-message-btn { background: var(--brand-gradient); border-radius: 10px; box-shadow: 0 2px 14px rgba(0,210,255,0.4); }
.send-message-btn:hover { filter: brightness(1.15); transform: scale(1.07); box-shadow: 0 0 20px rgba(0,210,255,0.65); }
.attach-btn { background: rgba(0,210,255,0.1); color: #00D2FF; }
.attach-btn:hover { background: rgba(0,210,255,0.22); color: #fff; }

/* Voice Mini-Player */
.voice-status-panel {
  background: rgba(0,210,255,0.06); border: 1px solid rgba(0,210,255,0.15);
  border-radius: 12px; margin: 0 8px 8px 8px; padding: 10px 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 20px rgba(0,210,255,0.08);
}
.voice-connection-state { color: #00D2FF; font-size: 12px; font-weight: 700; }
.voice-room-name { color: rgba(107,127,163,0.8); font-size: 10px; }
.voice-wave { display: flex; align-items: center; gap: 2px; height: 20px; }
.voice-wave-bar { width: 3px; border-radius: 3px; background: linear-gradient(180deg,#00D2FF,#38EF7D); animation: wave-bounce 1.2s infinite ease-in-out; }
.voice-wave-bar:nth-child(1){height:8px;animation-delay:0s}
.voice-wave-bar:nth-child(2){height:14px;animation-delay:0.15s}
.voice-wave-bar:nth-child(3){height:20px;animation-delay:0.30s}
.voice-wave-bar:nth-child(4){height:14px;animation-delay:0.45s}
.voice-wave-bar:nth-child(5){height:8px;animation-delay:0.60s}
@keyframes wave-bounce { 0%,100%{transform:scaleY(0.5);opacity:0.6} 50%{transform:scaleY(1);opacity:1} }
.disconnect-voice-btn { color: #ff6b6b; background: rgba(255,107,107,0.08); border-radius: 8px; border: 1px solid rgba(255,107,107,0.15); }
.disconnect-voice-btn:hover { background: rgba(255,107,107,0.18); border-color: rgba(255,107,107,0.3); }
.screen-share-btn.active { color: #38EF7D; background: rgba(56,239,125,0.12); }

/* User Profile Footer */
.user-profile-bar { background: rgba(10,13,20,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid rgba(0,210,255,0.06); }
.user-avatar { border-radius: 12px; border: 1.5px solid rgba(0,210,255,0.2); box-shadow: 0 0 12px rgba(0,210,255,0.15); }
.user-status-dot.online { background: #38EF7D; box-shadow: 0 0 6px #38EF7D; }
.profile-username { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Members Sidebar */
.members-sidebar { background: rgba(13,16,23,0.90); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-right: 1px solid rgba(0,210,255,0.05); }
.members-sidebar-footer { background: rgba(10,13,20,0.90); border-top: 1px solid rgba(0,210,255,0.06); }
.member-item:hover { background: rgba(0,210,255,0.07); border-radius: 8px; }
.member-avatar { border-radius: 10px; border: 1.5px solid rgba(0,210,255,0.12); }
.member-status-dot.online { background: #38EF7D; box-shadow: 0 0 5px #38EF7D; }
.members-section-header { color: rgba(0,210,255,0.5); letter-spacing: 0.8px; font-size: 10.5px; }
.role-admin-header { color: rgba(255,215,0,0.7); }
.role-mod-header { color: rgba(0,210,255,0.7); }
.role-member-header { color: rgba(56,239,125,0.65); }
.sidebar-pwa-install-btn { background: linear-gradient(135deg,rgba(0,210,255,0.18) 0%,rgba(56,239,125,0.18) 100%); border: 1px solid rgba(0,210,255,0.35); border-radius: 10px; }
.sidebar-pwa-install-btn:hover { background: linear-gradient(135deg,rgba(0,210,255,0.35) 0%,rgba(56,239,125,0.35) 100%); border-color: rgba(0,210,255,0.7); box-shadow: 0 0 16px rgba(0,210,255,0.25); }

/* Modals - Glassmorphism */
.modal-overlay { background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-card,.wide-modal {
  background: rgba(11,14,24,0.82); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.75),0 0 0 1px rgba(0,210,255,0.05),inset 0 1px 0 rgba(255,255,255,0.04);
}
.modal-header { border-bottom: 1px solid rgba(0,210,255,0.08); background: transparent; }
.modal-title { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-size: 16px; font-weight: 800; }
.modal-close-x { color: var(--text-muted); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s; }
.modal-close-x:hover { background: rgba(255,107,107,0.15); color: #ff6b6b; border-color: rgba(255,107,107,0.2); }
/* Settings navigation is styled in dedicated vertical sidebar section */
.modal-input { background: rgba(10,13,20,0.7); border: 1px solid rgba(0,210,255,0.12); border-radius: 10px; color: var(--text-header); transition: all 0.18s ease; }
.modal-input:focus { border-color: rgba(0,210,255,0.45); box-shadow: 0 0 0 3px rgba(0,210,255,0.08); outline: none; }
.modal-textarea { background: rgba(10,13,20,0.7); border: 1px solid rgba(0,210,255,0.12); border-radius: 10px; color: var(--text-header); }
.modal-textarea:focus { border-color: rgba(0,210,255,0.45); box-shadow: 0 0 0 3px rgba(0,210,255,0.08); outline: none; }
.discord-primary-btn,.nexus-glow-btn { background: var(--brand-gradient); color: #0a0d14; font-weight: 700; border: none; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,210,255,0.4); transition: all 0.2s ease; }
.discord-primary-btn:hover,.nexus-glow-btn:hover { filter: brightness(1.12); box-shadow: 0 6px 28px rgba(0,210,255,0.6); transform: translateY(-1px); }
.discord-btn-secondary { background: rgba(0,210,255,0.08); border: 1px solid rgba(0,210,255,0.2); color: #00D2FF; border-radius: 8px; transition: all 0.18s; }
.discord-btn-secondary:hover { background: rgba(0,210,255,0.16); border-color: rgba(0,210,255,0.4); }
.discord-danger-btn { background: rgba(255,107,107,0.12); border: 1px solid rgba(255,107,107,0.25); color: #ff6b6b; border-radius: 10px; transition: all 0.18s; }
.discord-danger-btn:hover { background: rgba(255,107,107,0.22); border-color: rgba(255,107,107,0.45); }

/* Auth Login Modal */
.nexus-login-card {
  background: rgba(10,13,20,0.88); backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(0,210,255,0.15); border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8),0 0 0 1px rgba(0,210,255,0.05),inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative; overflow: hidden;
}
.nexus-login-card::before {
  content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 120px;
  background: radial-gradient(ellipse,rgba(0,210,255,0.18) 0%,transparent 70%);
  pointer-events: none; z-index: 0;
}
.nexus-login-header { position: relative; z-index: 1; }
.nexus-login-title { font-size: 28px; font-weight: 800; background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.5px; margin-bottom: 6px; }
.nexus-login-subtitle { color: var(--text-muted); font-size: 13px; }
.login-brand-img { width: 52px; height: 52px; filter: drop-shadow(0 0 12px rgba(0,210,255,0.6)); }
.discord-login-label { color: var(--text-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.discord-login-input { background: rgba(10,13,20,0.8); border: 1px solid rgba(0,210,255,0.15); border-radius: 12px; color: var(--text-header); font-size: 15px; font-family: var(--font-discord); transition: all 0.2s ease; }
.discord-login-input:focus { border-color: rgba(0,210,255,0.5); box-shadow: 0 0 0 3px rgba(0,210,255,0.10),0 0 20px rgba(0,210,255,0.12); outline: none; background: rgba(10,13,20,0.95); }
.discord-login-submit-btn { width: 100%; padding: 13px; font-size: 15px; font-weight: 700; background: var(--brand-gradient); color: #0a0d14; border: none; border-radius: 12px; cursor: pointer; letter-spacing: 0.3px; box-shadow: 0 4px 24px rgba(0,210,255,0.45); transition: all 0.22s ease; position: relative; z-index: 1; }
.discord-login-submit-btn:hover { filter: brightness(1.1); box-shadow: 0 6px 32px rgba(0,210,255,0.65); transform: translateY(-2px); }
.discord-login-submit-btn:active { transform: translateY(0); }
.auth-error-banner { background: rgba(255,107,107,0.12); border: 1px solid rgba(255,107,107,0.3); border-radius: 10px; color: #ff6b6b; padding: 10px 14px; font-size: 13px; }

/* Profile Popover */
.user-profile-popover { background: rgba(11,14,24,0.9); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(0,210,255,0.14); border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,0.85),0 0 0 1px rgba(0,210,255,0.05); }
.popover-username { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.popover-dm-btn { background: var(--brand-gradient); color: #0a0d14; font-weight: 700; border: none; border-radius: 10px; padding: 9px 16px; width: 100%; cursor: pointer; box-shadow: 0 4px 16px rgba(0,210,255,0.35); transition: all 0.18s ease; }
.popover-dm-btn:hover { filter: brightness(1.1); box-shadow: 0 6px 24px rgba(0,210,255,0.55); transform: translateY(-1px); }
.popover-tab-btn.active { color: #00D2FF; border-bottom-color: #00D2FF; }

/* Welcome header */
.welcome-hashtag-bubble { background: var(--brand-gradient); color: #0a0d14; box-shadow: 0 0 32px rgba(0,210,255,0.3); font-size: 28px; }
.welcome-title { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Branding pills */
.branding-badge-pill { background: linear-gradient(135deg,rgba(0,210,255,0.15),rgba(56,239,125,0.15)); border: 1px solid rgba(0,210,255,0.25); color: #00D2FF; border-radius: 20px; font-size: 11px; font-weight: 700; padding: 3px 12px; display: inline-block; margin-bottom: 8px; letter-spacing: 0.3px; }

/* HDD & Condition cards */
.hdd-server-card { background: rgba(0,210,255,0.04); border: 1px solid rgba(0,210,255,0.12); border-radius: 12px; }
.hdd-live-dot { background: #38EF7D; box-shadow: 0 0 6px #38EF7D; }
.live-condition-card { background: rgba(0,210,255,0.05); border: 1px solid rgba(0,210,255,0.15); border-radius: 10px; }
.card-content h4 { color: #00D2FF; }

/* Typing */
.typing-dots span { background: #00D2FF; }

/* Live stream badge */
.live-stream-badge { background: linear-gradient(90deg,#00D2FF,#38EF7D); color: #0a0d14; font-weight: 800; }

/* Floating pickers */
.floating-picker { background: rgba(13,16,25,0.95); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(0,210,255,0.12); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.7); }

/* Mobile install */
.mobile-install-banner { background: rgba(10,13,20,0.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(0,210,255,0.12); }
.mobile-install-action-btn { background: var(--brand-gradient); color: #0a0d14; font-weight: 700; border: none; border-radius: 10px; padding: 7px 16px; cursor: pointer; font-size: 13px; box-shadow: 0 2px 12px rgba(0,210,255,0.4); }

/* Animations */
@keyframes modal-pop { 0%{opacity:0;transform:scale(0.92) translateY(10px)} 100%{opacity:1;transform:scale(1) translateY(0)} }
.nexus-login-card,.modal-card { animation: modal-pop 0.25s cubic-bezier(0.18,0.89,0.32,1.28); }

/* Brand logo glow */
.nexus-logo-btn .guild-brand-logo { filter: drop-shadow(0 0 8px rgba(0,210,255,0.7)); }

/* Mobile toggles */
.mobile-toggle-btn { color: var(--text-muted); background: rgba(0,210,255,0.06); border-radius: 10px; border: 1px solid rgba(0,210,255,0.08); padding: 6px; transition: all 0.18s ease; }
.mobile-toggle-btn:hover { background: rgba(0,210,255,0.12); color: #00D2FF; border-color: rgba(0,210,255,0.2); }

/* Sliders */
.nexus-range-slider { accent-color: #00D2FF; }

/* Preset pills */
.preset-pill { background: rgba(0,210,255,0.07); border: 1px solid rgba(0,210,255,0.15); color: #00D2FF; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.preset-pill:hover { background: rgba(0,210,255,0.18); border-color: rgba(0,210,255,0.4); }

/* Deco choices */
.deco-choice.active { border-color: rgba(0,210,255,0.5); background: rgba(0,210,255,0.08); }

/* Preset wall cards */
.preset-wall-card:hover { border-color: rgba(0,210,255,0.4); box-shadow: 0 0 16px rgba(0,210,255,0.2); }

/* END InLobby Theme */

/* ==========================================================================
   InLobby Theme v2 — Refinements: Bubbles, Avatar Borders, Collapsible Sidebar
   ========================================================================== */

/* ─── Chat Bubble Cards (Refined) ─── */
.message-entry {
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(0, 210, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  margin-bottom: 8px !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12) !important;
  transform: none !important;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.message-entry:hover {
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(0, 210, 255, 0.16) !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18) !important;
  transform: none !important;
}

/* Own messages — subtle cyan tint */
.message-entry.own-message,
.message-entry[data-self="true"] {
  background: rgba(0, 210, 255, 0.06) !important;
  border-color: rgba(0, 210, 255, 0.14) !important;
}

/* ─── Avatar Borders — Subtle by default ─── */
.message-avatar {
  border-radius: 10px !important;
  border: 1.5px solid rgba(0, 210, 255, 0.3) !important;
  box-shadow: none !important;
}

.member-avatar {
  border-radius: 10px !important;
  border: 1.5px solid rgba(0, 210, 255, 0.3) !important;
  box-shadow: none !important;
}

.user-avatar {
  border-radius: 12px !important;
  border: 1.5px solid rgba(0, 210, 255, 0.3) !important;
  box-shadow: none !important;
}

.popover-avatar {
  border: 2px solid rgba(0, 210, 255, 0.3) !important;
  box-shadow: none !important;
}

/* Speaking/Active in voice — intense pulse glow only when speaking */
.message-avatar.speaking,
.member-avatar.speaking,
.user-avatar.speaking,
.voice-active-avatar {
  border-color: #38EF7D !important;
  box-shadow: 0 0 0 2px rgba(56, 239, 125, 0.4), 0 0 12px rgba(56, 239, 125, 0.6) !important;
  animation: avatar-speaking-pulse 1.2s ease-in-out infinite !important;
}

@keyframes avatar-speaking-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(56, 239, 125, 0.35), 0 0 10px rgba(56, 239, 125, 0.5); }
  50%       { box-shadow: 0 0 0 3px rgba(56, 239, 125, 0.6),  0 0 20px rgba(56, 239, 125, 0.8); }
}

/* Remove heavy decoration rings by default — only apply on explicit deco classes */
.avatar-deco-ring {
  display: none;
}
.deco-flame .avatar-deco-ring,
.deco-neon .avatar-deco-ring,
.deco-sakura .avatar-deco-ring,
.deco-retro .avatar-deco-ring,
.deco-galaxy .avatar-deco-ring,
.deco-crown .avatar-deco-ring {
  display: block;
}

/* ─── Members Sidebar Collapse ─── */

/* Desktop collapse button — visible only on desktop */
.members-collapse-btn {
  display: none; /* hidden on mobile, shown via media query */
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(0, 210, 255, 0.07);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  margin-left: 6px;
}

.members-collapse-btn:hover {
  background: rgba(0, 210, 255, 0.14);
  color: #00D2FF;
  border-color: rgba(0, 210, 255, 0.35);
}

.members-collapse-btn.active {
  background: rgba(0, 210, 255, 0.16);
  color: #00D2FF;
  border-color: rgba(0, 210, 255, 0.4);
}

/* Show on desktop (above 800px) */
@media (min-width: 800px) {
  .members-collapse-btn {
    display: flex !important;
  }
  /* Hide mobile toggle on desktop */
  .mobile-members-toggle {
    display: none;
  }
}

/* Collapsed state animation */
.members-sidebar {
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              min-width 0.28s ease;
  overflow: hidden;
}

.members-sidebar.sidebar-collapsed {
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: none !important;
}

/* Chat area expands smoothly when sidebar collapses */
.chat-area {
  transition: flex 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── chat-header-right alignment fix ─── */
.chat-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Typing indicator dots — correct color ─── */
.typing-dots span {
  background: #00D2FF !important;
}

/* ─── Channel item hover — no x-shift on RTL ─── */
.channel-item:hover {
  transform: none !important;
}

/* ─── Message feed gap consistency ─── */
.messages-feed {
  gap: 0 !important;
}

/* END InLobby Theme v2 Refinements */
/* ==========================================================================
   InLobby Multi-Language (i18n) & LTR/RTL Styles
   ========================================================================== */

/* ─── 1. Quick Language Switcher in Chat Header ─── */
.lang-dropdown-wrapper {
  position: relative;
  display: inline-block;
  z-index: 120;
}

.lang-selector-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 8px;
  color: var(--text-header);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lang-selector-btn:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.35);
  color: #00D2FF;
}

.lang-flag-icon {
  font-size: 14px;
}

.lang-name-text {
  font-size: 11.5px;
}

.lang-caret {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 165px;
  background: rgba(13, 16, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 210, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 150;
  animation: modal-pop 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

html[dir="rtl"] .lang-dropdown-menu {
  left: 0;
  right: auto;
}

html[dir="ltr"] .lang-dropdown-menu {
  right: 0;
  left: auto;
}

.lang-dropdown-menu.hidden {
  display: none !important;
}

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-normal);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-menu-item:hover {
  background: rgba(0, 210, 255, 0.10);
  color: #00D2FF;
  transform: none;
}

.lang-menu-item.active {
  background: rgba(0, 210, 255, 0.16);
  color: #00D2FF;
  font-weight: 700;
}

.lang-menu-item .flag {
  font-size: 15px;
}

.lang-menu-item .dir-tag {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

html[dir="rtl"] .lang-menu-item .dir-tag {
  margin-left: 0;
  margin-right: auto;
}

/* ─── 2. Auth Modal Language Switcher Pills ─── */
.auth-lang-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 16px 0;
  position: relative;
  z-index: 2;
}

.auth-lang-pill {
  background: rgba(0, 210, 255, 0.07);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 20px;
  color: var(--text-interactive);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.auth-lang-pill:hover {
  background: rgba(0, 210, 255, 0.16);
  color: #00D2FF;
  border-color: rgba(0, 210, 255, 0.35);
  transform: translateY(-1px);
}

.auth-lang-pill.active {
  background: rgba(0, 210, 255, 0.22);
  border-color: #00D2FF;
  color: #00D2FF;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

/* ─── 3. Settings Tab Language Selection Grid ─── */
.lang-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.lang-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(19, 24, 36, 0.65);
  border: 1px solid rgba(0, 210, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.lang-card:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.lang-card.active {
  background: rgba(0, 210, 255, 0.14);
  border-color: #00D2FF;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
}

.lang-card-flag {
  font-size: 26px;
  flex-shrink: 0;
}

.lang-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lang-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-header);
}

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

.lang-card-check {
  font-size: 14px;
  font-weight: 800;
  color: #38EF7D;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.lang-card.active .lang-card-check {
  opacity: 1;
}

/* ─── 4. LTR Alignment Rules (When dir="ltr") ─── */
html[dir="ltr"] body {
  text-align: left;
}

html[dir="ltr"] .server-rail {
  border-left: none;
  border-right: 1px solid rgba(0, 210, 255, 0.06);
}

html[dir="ltr"] .sidebar-channels {
  border-left: none;
  border-right: 1px solid rgba(0, 210, 255, 0.05);
}

html[dir="ltr"] .members-sidebar {
  border-right: none;
  border-left: 1px solid rgba(0, 210, 255, 0.05);
}

html[dir="ltr"] .guild-pill-indicator {
  right: auto;
  left: -10px;
  border-radius: 3px 0 0 3px;
}

html[dir="ltr"] .channel-item.active {
  border-right: none;
  border-left: 2px solid #00D2FF;
}

html[dir="ltr"] .chat-input {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .send-message-btn svg {
  transform: none !important; /* Normal right-pointing arrow in LTR */
}

html[dir="ltr"] .user-status-dot {
  left: auto;
  right: -2px;
}

html[dir="ltr"] .member-status-dot {
  left: auto;
  right: -2px;
}

html[dir="ltr"] .user-profile-popover {
  direction: ltr !important;
}

html[dir="ltr"] .attach-btn {
  margin-left: 0;
  margin-right: 6px;
}

html[dir="ltr"] .channel-users-count {
  margin-right: 0;
  margin-left: auto;
}

/* END InLobby Multi-Language Styles */
/* ─── CRITICAL FIX: Language Dropdown Stacking Context Over Messages ─── */
.chat-header {
  position: relative !important;
  z-index: 2000 !important;
}

.chat-header-right {
  position: relative !important;
  z-index: 2001 !important;
}

.lang-dropdown-wrapper {
  position: relative !important;
  z-index: 2002 !important;
}

.lang-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  z-index: 999999 !important;
  background: #0d121d !important;
  background-color: rgba(13, 18, 29, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(0, 210, 255, 0.35) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 210, 255, 0.2) !important;
}

.messages-container {
  position: relative !important;
  z-index: 1 !important;
}

.message-entry {
  position: relative !important;
  z-index: 2 !important;
}

/* ─── INLOBBY CLEANUP: AVATARS, RINGS & MESSAGE CARDS ─── */
.avatar-deco-ring {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.avatar-deco-wrap,
.member-avatar-wrap,
.message-avatar,
.member-avatar,
.user-avatar {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 10px !important;
}

.message-avatar,
.member-avatar,
.user-avatar {
  border: 1.5px solid rgba(0, 210, 255, 0.25) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.message-avatar-img,
.member-avatar-img,
.user-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

/* Chat Header Title Alignment & Single Clean Title */
.chat-header-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.chat-header-title .channel-name-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
}

.chat-header-title .header-divider,
.chat-header-title .channel-description {
  display: none !important;
}

/* Card / Bubble Design for Messages */
.message-entry {
  display: flex !important;
  gap: 12px !important;
  background: rgba(19, 24, 36, 0.6) !important;
  border: 1px solid rgba(0, 210, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  margin-bottom: 8px !important;
  align-items: flex-start !important;
}

.message-entry.own-message {
  background: rgba(0, 210, 255, 0.06) !important;
  border-color: rgba(0, 210, 255, 0.16) !important;
}

/* ─── SETTINGS MODAL: 2-COLUMN VERTICAL SIDEBAR LAYOUT ─── */
.settings-tabbed-card {
  width: 860px !important;
  max-width: 95vw !important;
  height: 600px !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
}

.settings-tabbed-card .modal-header {
  flex-shrink: 0 !important;
  padding: 16px 22px !important;
  border-bottom: 1px solid rgba(0, 210, 255, 0.08) !important;
  background: rgba(10, 13, 20, 0.95) !important;
}

.settings-modal-body {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  height: 550px !important;
  max-height: 85vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Dedicated Vertical Navigation Sidebar */
.settings-nav-bar {
  width: 215px !important;
  min-width: 200px !important;
  max-width: 220px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 14px 12px !important;
  background: rgba(13, 17, 26, 0.85) !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  border-inline-end: 1px solid rgba(0, 210, 255, 0.08) !important;
}

/* Full-width Vertical Navigation Buttons */
.settings-nav-item {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  text-align: start !important;
  white-space: nowrap !important;
}

.settings-nav-item:hover {
  background: rgba(0, 210, 255, 0.06) !important;
  color: #00D2FF !important;
  border-color: rgba(0, 210, 255, 0.10) !important;
}

.settings-nav-item.active {
  background: rgba(0, 210, 255, 0.12) !important;
  color: #00D2FF !important;
  border: 1px solid rgba(0, 210, 255, 0.22) !important;
  border-inline-start: 3px solid #00D2FF !important;
  box-shadow: 0 2px 12px rgba(0, 210, 255, 0.08) !important;
}

.settings-nav-item .tab-icon {
  font-size: 16px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Settings Content Area */
.settings-content-area,
.settings-tabbed-card .modal-body.settings-body-scroll {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 24px 28px !important;
  height: 100% !important;
  max-height: none !important;
  min-width: 0 !important;
  background: rgba(10, 13, 20, 0.45) !important;
}

/* Responsive Fallback for Mobile */
@media (max-width: 768px) {
  .settings-tabbed-card {
    width: 95vw !important;
    max-width: 95vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
  }
  .settings-modal-body {
    flex-direction: column !important;
    height: auto !important;
    max-height: calc(90vh - 60px) !important;
  }
  .settings-nav-bar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-inline-end: none !important;
    border-bottom: 1px solid rgba(0, 210, 255, 0.08) !important;
    padding: 8px 10px !important;
    gap: 6px !important;
  }
  .settings-nav-item {
    width: auto !important;
    padding: 8px 12px !important;
    border-inline-start: none !important;
    border-bottom: 2px solid transparent !important;
  }
  .settings-nav-item.active {
    border-inline-start: none !important;
    border-bottom: 2px solid #00D2FF !important;
  }
  .settings-content-area,
  .settings-tabbed-card .modal-body.settings-body-scroll {
    padding: 16px !important;
  }
}

/* ─── CHANNEL MANAGEMENT: HOVER DELETE BUTTON ─── */
.channel-item {
  position: relative !important;
}

.channel-delete-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-inline-start: auto;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 6px;
  color: #ff6b6b;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  padding: 0;
}

.channel-item:hover .channel-delete-btn {
  display: inline-flex !important;
}

.channel-delete-btn:hover {
  background: rgba(255, 107, 107, 0.35) !important;
  color: #ffffff !important;
  border-color: #ff6b6b !important;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.5) !important;
  transform: scale(1.1);
}