﻿* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; }
body { 
  background: #0f0f1e; 
  color: #fff; 
  font-family: 'Poppins', sans-serif; 
  height: 100vh; 
  overflow: hidden; 
  position: relative; 
}
.bg-container { 
  position: fixed; inset: 0; z-index: -1; 
  background-image: url('fonto.jpg'); 
  background-size: cover; background-position: center center; 
  background-repeat: no-repeat; transition: filter 0.4s ease; 
}
.bg-overlay { position: fixed; inset: 0; z-index: -1; background: rgba(15, 15, 30, 0.75); }

.toast-container {
  position: fixed; top: 80px; right: 20px; z-index: 3000;
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none; max-width: 350px;
}
.toast {
  background: rgba(22, 33, 62, 0.95); backdrop-filter: blur(10px);
  border: 1px solid rgba(233, 69, 96, 0.5); border-radius: 16px;
  padding: 16px 20px; color: #fff; font-size: 0.95em; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(233, 69, 96, 0.2);
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  pointer-events: auto; animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), toastFadeOut 0.4s ease 9.6s forwards;
}
.toast:hover { transform: translateX(-4px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(233, 69, 96, 0.4); }
.toast-icon { font-size: 1.6em; flex-shrink: 0; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 0.75em; color: #9ca3af; margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.toast-message { font-size: 1em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes toastSlideIn { from { opacity: 0; transform: translateX(100%) scale(0.9); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastFadeOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }

.unread-badge {
  background: linear-gradient(135deg, #e94560, #c73652); color: #fff;
  font-size: 0.7em; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  margin-left: 8px; min-width: 20px; text-align: center;
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.6); animation: badgePulse 2s infinite;
}
@keyframes badgePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1000; }
.login-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.login-box { 
  background: rgba(22, 33, 62, 0.6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: 45px 40px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(233, 69, 96, 0.15);
  text-align: center; max-width: 420px; width: 90%; transition: transform 0.3s ease;
}
.login-box.shake { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 35px; }
.login-box h1 { color: #fff; font-size: 2.4em; font-weight: 700; margin: 0; letter-spacing: -0.5px; }
.gradient-text {
  background: linear-gradient(135deg, #e94560, #ff6b6b, #fbbf24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 15px rgba(233, 69, 96, 0.6)); animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow { from { filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5)); } to { filter: drop-shadow(0 0 25px rgba(233, 69, 96, 0.9)); } }

.input-group { position: relative; margin-bottom: 18px; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #9ca3af; transition: color 0.3s ease; pointer-events: none; }
.login-box input { 
  width: 100%; padding: 16px 16px 16px 48px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.1); 
  background: rgba(0, 0, 0, 0.25); color: #fff; font-size: 1em; font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease; outline: none;
}
.login-box input::placeholder { color: #6b7280; }
.login-box input:focus { border-color: #e94560; background: rgba(0, 0, 0, 0.4); box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.15), 0 0 20px rgba(233, 69, 96, 0.2); }
.input-group:focus-within .input-icon { color: #e94560; }

.pass-hint { 
  display: none; color: #fbbf24; font-size: 0.8em; margin: -8px 0 18px 0; text-align: left; 
  background: rgba(251, 191, 36, 0.1); padding: 12px 16px; border-radius: 10px; border-left: 3px solid #fbbf24; line-height: 1.4; animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.btn-primary, .btn-secondary { width: 100%; padding: 16px; border-radius: 14px; font-size: 1em; font-weight: 600; cursor: pointer; margin-top: 14px; font-family: 'Poppins', sans-serif; transition: all 0.3s ease; border: none; }
.btn-primary { background: linear-gradient(135deg, #e94560, #c73652); color: #fff; box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(233, 69, 96, 0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #10b981; color: #10b981; }

.error-toast { 
  background: rgba(239, 68, 68, 0.15); color: #fca5a5; padding: 14px 18px; border-radius: 12px; 
  margin-top: 18px; display: none; font-size: 0.9em; font-weight: 500; border: 1px solid rgba(239, 68, 68, 0.3);
  align-items: center; justify-content: center; gap: 10px; animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.app { display: none; height: 100vh; width: 100%; overflow: hidden; }
.chat-main { 
  flex: 1; display: flex; flex-direction: column; background: transparent; 
  transition: background 0.4s; min-width: 0; 
}
.chat-main.private-mode { background: rgba(255, 51, 204, 0.4); }

.private-header { display: none; background: linear-gradient(90deg, #3366ff, #660066); padding: 14px 20px; align-items: center; justify-content: space-between; border-bottom: 3px solid #ffff00; flex-wrap: wrap; gap: 10px; }
.private-header.show { display: flex; }
.private-header-text { color: #ffffff; font-weight: 600; font-size: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.exit-private-btn { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: 600; flex-shrink: 0; transition: all 0.2s; }
.exit-private-btn:hover { background: rgba(255,255,255,0.3); }

.header { 
  background: rgba(22, 33, 62, 0.4); 
  padding: 12px 20px; border-bottom: 1px solid rgba(233, 69, 96, 0.3); 
  display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; min-height: 64px;
}
.header h2 { color: #e94560; font-size: 1.2em; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.action-btn { 
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); 
  color: #fff; width: 38px; height: 38px; border-radius: 12px; font-size: 1.1em; 
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease;
}
.action-btn:hover { background: rgba(233, 69, 96, 0.2); border-color: rgba(233, 69, 96, 0.5); transform: translateY(-2px); }
.banned-btn-header, .clear-btn-header { display: none; }
.banned-btn-header.show, .clear-btn-header.show { display: flex; }
#radioBtn.playing { animation: radioPulse 1.5s infinite; background: rgba(124, 58, 237, 0.3); border-color: #a855f7; }
@keyframes radioPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.8)); } }

.online-badge { 
  background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); 
  color: #10b981; padding: 8px 16px; border-radius: 20px; font-size: 0.85em; font-weight: 600; 
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.online-dot { width: 8px; height: 8px; background: #ef4444; border-radius: 50%; box-shadow: 0 0 8px #ef4444; animation: blinkDot 1.5s infinite; }
@keyframes blinkDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.radio-now-playing-bar { 
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; 
  padding: 6px 16px; background: rgba(0, 0, 0, 0.3); border-radius: 20px; 
  border: 1px solid rgba(0, 255, 204, 0.2); overflow: hidden; position: relative; flex-shrink: 1; max-width: 600px; 
}
.radio-icon { animation: radioPulse 1.5s infinite; font-size: 1.1em; flex-shrink: 0; }
.radio-text { color: #00ffcc; font-weight: 600; font-size: 0.9em; text-shadow: 0 0 8px rgba(0, 255, 204, 0.4); white-space: nowrap; width: 100%; overflow: hidden; }
.radio-text-scroll { display: inline-block; white-space: nowrap; animation: scrollTitle 18s linear infinite; padding-left: 100%; }
@keyframes scrollTitle { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.messages { 
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px; 
  display: flex; flex-direction: column; gap: 16px; 
  transform: translate3d(0, 0, 0); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; contain: strict; min-height: 0;
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(15px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg { 
  max-width: 65%; width: fit-content; padding: 14px 18px; 
  border-radius: 22px 22px 22px 6px; 
  background: rgba(59, 130, 246, 0.1);
  display: flex; align-items: flex-end; gap: 12px; 
  border: 1px solid rgba(255, 26, 255, 0.4); 
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: messageSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.msg.own { 
  align-self: flex-end; flex-direction: row-reverse; 
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.4));
  border-radius: 22px 22px 6px 22px; 
  border: 1px solid rgba(255,255,255,0.25); 
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.msg.private { background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(124, 58, 237, 1)); }
.msg.private.own { background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(124, 58, 237, 1)); }

.msg-avatar { 
  width: 38px; height: 38px; border-radius: 50%; 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  display: flex; align-items: center; justify-content: center; 
  font-weight: 700; font-size: 0.95em; flex-shrink: 0; overflow: hidden; 
  border: 2px solid rgba(255,255,255,0.15); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-avatar.admin-avatar { border: 2px solid #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.5); }

.msg-content { flex: 1; min-width: 0; }
.msg .user { font-size: 0.8em; color: #10b981; margin-bottom: 4px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.msg.own .user { color: #bfdbfe; text-align: right; justify-content: flex-end; }
.msg .text { line-height: 1.5; word-wrap: break-word; word-break: break-word; font-size: 1.05em; max-width: 100%; overflow-wrap: break-word; }
.msg .text img { max-width: 100%; border-radius: 12px; display: block; margin: 6px 0; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.3); transition: transform 0.2s; }
.msg .text img:hover { transform: scale(1.02); }
.msg .time { font-size: 0.7em; color: #9ca3af; margin-top: 6px; text-align: right; opacity: 0.8; }
.msg.own .time { color: #dbeafe; }

.input-area { background: rgba(22, 33, 62, 0.5); padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); position: relative; flex-shrink: 0; width: 100%; }
.input-wrapper { 
  display: flex; align-items: center; gap: 8px; 
  background: rgba(0, 0, 0, 0.3); border-radius: 24px; 
  padding: 6px 6px 6px 16px; border: 1px solid rgba(255,255,255,0.1); 
  flex-wrap: wrap; width: 100%; transition: border-color 0.3s, box-shadow 0.3s;
}
.input-wrapper:focus-within { border-color: rgba(233, 69, 96, 0.5); box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1); }

.emoji-btn, .mic-btn, .image-btn { 
  background: none; border: none; color: #9ca3af; cursor: pointer; 
  padding: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; 
  border-radius: 50%; transition: all 0.2s; 
}
.emoji-btn { font-size: 1.4em; }
.emoji-btn:hover, .mic-btn:hover, .image-btn:hover { color: #fff; background: rgba(255,255,255,0.1); transform: scale(1.1); }
.mic-btn.recording { color: #ef4444; animation: micPulse 1s infinite ease-in-out; background: rgba(239, 68, 68, 0.15); }
@keyframes micPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } }

.recording-timer { display: flex; align-items: center; gap: 6px; background: rgba(239, 68, 68, 0.15); color: #ef4444; padding: 6px 12px; border-radius: 20px; font-size: 0.85em; font-weight: 600; border: 1px solid rgba(239, 68, 68, 0.3); margin-right: 4px; }
.rec-dot { width: 8px; height: 8px; background-color: #ef4444; border-radius: 50%; animation: blinkDot 1s infinite; }

.input-field { flex: 1; background: none; border: none; color: #fff; font-size: 1em; padding: 10px 0; outline: none; min-width: 120px; font-family: 'Poppins', sans-serif; }
.input-field::placeholder { color: #6b7280; }

.send-btn { 
  background: linear-gradient(135deg, #3b82f6, #2563eb); border: none; color: #fff; 
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; 
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; 
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); transition: all 0.2s;
}
.send-btn:hover { transform: scale(1.1) rotate(-5deg); box-shadow: 0 0 25px rgba(59, 130, 246, 0.7); }
.send-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; margin-left: 2px; }

.emoji-panel { 
  position: absolute; bottom: 80px; left: 20px; 
  background: rgba(22, 33, 62, 0.95); backdrop-filter: blur(20px);
  border-radius: 20px; padding: 0; display: none; width: 420px; max-width: calc(100vw - 40px); height: 400px; max-height: 60vh; 
  box-shadow: 0 20px 60px rgba(0,0,0,0.7); z-index: 100; overflow: hidden; 
  border: 1px solid rgba(255,255,255,0.1); flex-direction: column; 
}
.emoji-panel.show { display: flex; }
.emoji-tabs { display: flex; background: rgba(15, 15, 30, 0.8); border-bottom: 1px solid rgba(255,255,255,0.05); overflow-x: auto; flex-shrink: 0; }
.emoji-tab { flex: 1; min-width: 45px; padding: 14px 8px; background: none; border: none; color: #6b7280; font-size: 1.3em; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; }
.emoji-tab:hover { background: rgba(255,255,255,0.05); color: #fff; }
.emoji-tab.active { color: #e94560; border-bottom-color: #e94560; background: rgba(233, 69, 96, 0.1); }
.emoji-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; min-height: 0; }
.emoji-category { display: none; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.emoji-category.active { display: grid; }
.emoji { font-size: 1.6em; cursor: pointer; padding: 8px; text-align: center; border-radius: 12px; background: rgba(15, 15, 30, 0.5); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.emoji:hover { background: rgba(233, 69, 96, 0.2); transform: scale(1.2); }

.bg-controls-panel { 
  position: absolute; bottom: 80px; right: 20px; 
  background: rgba(22, 33, 62, 0.95); backdrop-filter: blur(20px);
  border-radius: 20px; padding: 24px; width: 300px; max-width: calc(100vw - 40px); 
  box-shadow: 0 20px 60px rgba(0,0,0,0.7); z-index: 99; display: none; 
  border: 1px solid rgba(233, 69, 96, 0.3); 
}
.bg-controls-panel.show { display: block; }
.bg-controls-panel h3 { color: #e94560; margin-bottom: 20px; font-size: 1.1em; font-weight: 600; }
.control-group { margin-bottom: 18px; }
.control-group label { display: block; color: #d1d5db; margin-bottom: 8px; font-size: 0.9em; font-weight: 500; }
.control-group input[type="range"] { width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); outline: none; -webkit-appearance: none; }
.control-group input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #e94560; cursor: pointer; box-shadow: 0 0 10px rgba(233, 69, 96, 0.5); }
.control-value { color: #10b981; font-size: 0.85em; margin-top: 6px; font-weight: 600; }

.banned-panel { 
  position: absolute; bottom: 80px; right: 20px; 
  background: rgba(22, 33, 62, 0.98); backdrop-filter: blur(20px);
  border-radius: 20px; padding: 24px; width: 340px; max-width: calc(100vw - 40px); max-height: 450px; 
  box-shadow: 0 20px 60px rgba(0,0,0,0.7); z-index: 101; display: none; 
  border: 1px solid rgba(220, 38, 38, 0.4); flex-direction: column; 
}
.banned-panel.show { display: flex; }
.banned-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.banned-panel h3 { color: #ef4444; font-size: 1.1em; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
.close-banned-btn { background: none; border: none; color: #9ca3af; font-size: 1.4em; cursor: pointer; transition: color 0.2s; }
.close-banned-btn:hover { color: #fff; }
.banned-users-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; max-height: 340px; }
.banned-user-item { display: flex; align-items: center; justify-content: space-between; background: rgba(15, 15, 30, 0.6); padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(220, 38, 38, 0.2); }
.banned-user-info { flex: 1; min-width: 0; }
.banned-user-name { font-weight: 600; color: #fff; font-size: 0.95em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banned-user-time { font-size: 0.75em; color: #9ca3af; margin-top: 4px; }
.unban-btn { background: linear-gradient(135deg, #10b981, #059669); border: none; color: #fff; padding: 6px 14px; border-radius: 12px; cursor: pointer; font-size: 0.85em; font-weight: 600; margin-left: 10px; flex-shrink: 0; transition: transform 0.2s; }
.unban-btn:hover { transform: scale(1.05); }
.no-banned { text-align: center; color: #9ca3af; padding: 30px 20px; font-style: italic; }

.sidebar { 
  width: 260px; 
  background: rgba(22, 33, 62, 0.5); 
  border-left: 1px solid rgba(255,255,255,0.08); 
  display: flex; flex-direction: column; flex-shrink: 0; 
}
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-header h3 { font-weight: 700; font-size: 1.1em; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.sidebar-close-btn { display: none; background: rgba(255,255,255,0.1); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2em; cursor: pointer; transition: background 0.2s; }
.sidebar-close-btn:hover { background: rgba(255,255,255,0.2); }
.user-count { color: #10b981; font-size: 0.85em; font-weight: 600; padding: 12px 20px 8px 20px; }
.user-list { flex: 1; overflow-y: auto; padding: 10px; min-height: 0; display: flex; flex-direction: column; gap: 6px; }

.user-item { 
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; 
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.25s ease; cursor: default;
}
.user-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); transform: translateX(4px); }

.avatar { 
  width: 42px; height: 42px; border-radius: 50%; 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1em; 
  cursor: pointer; position: relative; overflow: hidden; flex-shrink: 0; 
  border: 2px solid rgba(255,255,255,0.1); transition: all 0.3s ease;
}
.avatar:hover { transform: scale(1.1); box-shadow: 0 0 15px rgba(233, 69, 96, 0.4); border-color: rgba(233, 69, 96, 0.5); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.admin-avatar { border: 2px solid #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.4); }
.avatar.loading { pointer-events: none; cursor: not-allowed; }
.avatar-spinner { width: 100%; height: 100%; border: 3px solid rgba(255,255,255,0.3); border-top-color: #e94560; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-upload-hint { position: absolute; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; font-size: 1.2em; }
.avatar:hover .avatar-upload-hint { opacity: 1; }

.user-info { flex: 1; min-width: 0; }

.user-name { font-weight: 600; font-size: 0.95em; overflow: visible; text-overflow: clip; white-space: nowrap; display: flex; align-items: center; gap: 6px; color: #f3f4f6; }
.user-status { font-size: 0.75em; color: #10b981; font-weight: 500; margin-top: 2px; }

.admin-badge { 
  display: inline-flex; align-items: center; gap: 3px; 
  background: linear-gradient(135deg, #00ff00, #00ff00); 
  color: #000; border-radius: 12px; padding: 2px 8px; 
  font-size: 0.7em; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.private-lock-btn, .ban-user-btn { background: none; border: none; font-size: 1.1em; cursor: pointer; padding: 6px; border-radius: 8px; transition: all 0.2s; flex-shrink: 0; color: #9ca3af; }
.private-lock-btn:hover { background: rgba(124, 58, 237, 0.2); color: #a855f7; transform: scale(1.1); }
.ban-user-btn { display: none; }
.ban-user-btn.show { display: block; }
.ban-user-btn:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; transform: scale(1.1); }

.actions-area { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 10px; }
.logout-btn, .admin-btn { width: 100%; padding: 14px; border: none; border-radius: 12px; color: #fff; font-weight: 600; cursor: pointer; text-align: center; transition: all 0.2s; font-size: 0.95em; }
.logout-btn { background: rgba(55, 65, 81, 0.8); border: 1px solid rgba(255,255,255,0.1); }
.logout-btn:hover { background: rgba(75, 85, 99, 0.9); transform: translateY(-1px); }
.admin-btn { background: linear-gradient(135deg, #e94560, #c73652); display: none; box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3); }
.admin-btn.show { display: block; }
.admin-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5); }

.player-panel { 
  position: fixed; top: 0; left: 0; right: 260px; height: 100vh; 
  background: rgba(0, 0, 0, 0.0);
  z-index: 950; transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  display: flex; flex-direction: column; border-bottom: 2px solid #e94560; 
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.player-panel.show { transform: translateY(0); }
.player-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: linear-gradient(90deg, #7c3aed, #4f46e5); flex-shrink: 0; gap: 10px; flex-wrap: wrap; }
.player-panel-title { color: #fff; font-weight: 600; font-size: 1em; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-header-buttons { display: flex; gap: 10px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.player-close-btn, .player-disconnect-btn { border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 0.85em; font-weight: 600; cursor: pointer; transition: all 0.3s; white-space: nowrap; background: rgba(0,0,0,0.2); }
.player-close-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }
.player-disconnect-btn { background: linear-gradient(135deg, #dc2626, #991b1b); border: none; }
.player-disconnect-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(220, 38, 38, 0.5); }
.player-panel iframe { flex: 1; width: 100%; border: none; background: transparent; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 500; backdrop-filter: blur(4px); }
.sidebar-overlay.show { display: block; }

.ban-notification-overlay, .ban-type-overlay, .clear-confirmation-overlay, .audio-preview-overlay { 
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; z-index: 3000; 
}
.ban-notification-overlay.show, .ban-type-overlay.show, .clear-confirmation-overlay.show, .audio-preview-overlay.show { display: flex; }

.ban-notification-popup, .ban-type-popup, .clear-confirmation-popup, .audio-preview-popup { 
  background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(20px);
  padding: 40px; border-radius: 24px; text-align: center; max-width: 450px; width: 90%; 
  border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}
.ban-notification-popup .ban-icon { font-size: 3.5em; margin-bottom: 15px; }
.ban-notification-popup h2, .ban-type-popup h2, .clear-confirmation-popup h2, .audio-preview-popup h3 { color: #fff; font-size: 1.5em; margin-bottom: 15px; font-weight: 700; }
.ban-notification-popup p, .ban-type-popup p, .clear-confirmation-popup p { color: #cbd5e1; font-size: 1em; margin-bottom: 25px; line-height: 1.5; }
.ban-type-buttons, .clear-confirmation-buttons, .audio-preview-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ban-type-btn, .clear-confirmation-btn, .preview-btn { flex: 1; min-width: 120px; padding: 14px 20px; border: none; border-radius: 14px; font-size: 1em; font-weight: 600; cursor: pointer; color: #fff; transition: all 0.2s; }
.ban-type-btn.username, .clear-confirmation-btn.confirm { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.ban-type-btn.username:hover, .clear-confirmation-btn.confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4); }
.ban-type-btn.cancel, .clear-confirmation-btn.cancel, .preview-btn.cancel { background: rgba(107, 114, 128, 0.8); }
.ban-type-btn.cancel:hover, .clear-confirmation-btn.cancel:hover, .preview-btn.cancel:hover { background: rgba(107, 114, 128, 1); transform: translateY(-2px); }
.preview-btn.send { background: linear-gradient(135deg, #10b981, #059669); }
.preview-btn.send:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4); }
.audio-preview-popup audio { width: 100%; margin-bottom: 20px; border-radius: 30px; outline: none; }

.image-preview-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; z-index: 10000; cursor: pointer; }
.image-preview-overlay.show { display: flex; }
.image-preview-container { position: relative; max-width: 90vw; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.image-preview-container img { max-width: 100%; max-height: 90vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8); object-fit: contain; cursor: default; }
.image-preview-close { position: absolute; top: 15px; right: 15px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 1.5em; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.image-preview-close:hover { background: rgba(239, 68, 68, 0.8); border-color: #ef4444; transform: rotate(90deg); }

.delete-image-btn { 
  background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; border: 1px solid rgba(255,255,255,0.3); 
  padding: 6px 12px; border-radius: 8px; cursor: pointer; margin-top: 8px; font-size: 0.8em; font-weight: 600; 
  display: inline-flex; align-items: center; gap: 6px; transition: all 0.3s; opacity: 0.9;
}
.delete-image-btn:hover { transform: scale(1.05); opacity: 1; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5); }
.delete-image-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.msg-audio-wrapper { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, 0.3); padding: 10px 14px; border-radius: 14px; margin-top: 6px; border: 1px solid rgba(255,255,255,0.1); }
.msg-audio-wrapper audio { height: 36px; max-width: 220px; border-radius: 20px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(15, 15, 30, 0.3); }
::-webkit-scrollbar-thumb { background: rgba(233, 69, 96, 0.5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(233, 69, 96, 0.8); }

@media (min-width: 1400px) {
  .msg { max-width: 55%; }
  .sidebar { width: 280px; }
  .player-panel { right: 280px; }
}
@media (max-width: 1399px) and (min-width: 1025px) {
  .msg { max-width: 60%; }
  .sidebar { width: 250px; }
  .player-panel { right: 250px; }
}
@media (max-width: 1024px) and (min-width: 769px) {
  .header { padding: 10px 16px; gap: 10px; }
  .header h2 { font-size: 1.1em; }
  .sidebar { width: 230px; }
  .player-panel { right: 230px; }
  .msg { max-width: 70%; }
  .input-area { padding: 12px 16px; }
  .emoji-panel, .bg-controls-panel, .banned-panel { width: 320px; max-width: calc(100vw - 40px); }
}
@media (max-width: 899px) and (min-width: 769px) {
  .header { padding: 10px 14px; }
  .radio-now-playing-bar { display: none; }
  .sidebar { width: 210px; }
  .player-panel { right: 210px; }
  .msg { max-width: 75%; }
  .emoji-panel, .bg-controls-panel, .banned-panel { width: calc(100vw - 32px); max-width: 360px; left: 16px; right: 16px; }
}
@media (max-width: 768px) {
  .sidebar { position: fixed; top: 0; right: -300px; height: 100vh; z-index: 600; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); width: 280px; box-shadow: -10px 0 40px rgba(0,0,0,0.5); }
  .sidebar.open { right: 0; }
  .sidebar-toggle-btn { display: flex; }
  .sidebar-close-btn { display: flex; }
  .chat-main { width: 100%; }
  .header { padding: 10px 12px; gap: 8px; min-height: 56px; }
  .header h2 { font-size: 1em; }
  .header-actions { gap: 6px; }
  .action-btn { width: 34px; height: 34px; font-size: 1em; border-radius: 10px; }
  .messages { padding: 12px; gap: 12px; }
  .msg { max-width: 85%; padding: 10px 14px; }
  .msg .text { font-size: 1em; }
  .msg-avatar { width: 34px; height: 34px; font-size: 0.85em; }
  .input-area { padding: 10px 12px; }
  .input-wrapper { border-radius: 20px; padding: 6px 6px 6px 12px; gap: 6px; }
  .input-field { font-size: 0.95em; padding: 8px 0; }
  .send-btn { width: 42px; height: 42px; }
  .emoji-panel, .bg-controls-panel, .banned-panel { width: calc(100vw - 32px); left: 16px; right: 16px; bottom: 75px; }
  .player-panel { width: 100%; right: 0; height: 100vh; }
  .private-header { padding: 10px 14px; }
  .ban-notification-popup, .ban-type-popup, .clear-confirmation-popup, .audio-preview-popup { padding: 24px; }
  .toast-container { top: 60px; right: 10px; left: 10px; max-width: 100%; }
  .toast { min-width: 0; width: 100%; padding: 14px 16px; }
}
@media (max-width: 480px) {
  .header { padding: 8px 10px; gap: 6px; min-height: 52px; }
  .header h2 { font-size: 0.9em; }
  .messages { padding: 10px; gap: 10px; }
  .msg { max-width: 90%; padding: 10px 12px; }
  .input-area { padding: 8px 10px; }
  .input-wrapper { border-radius: 18px; padding: 4px 4px 4px 10px; gap: 4px; }
  .input-field { font-size: 0.9em; padding: 6px 0; min-width: 100px; }
  .send-btn { width: 38px; height: 38px; }
  .send-btn svg { width: 18px; height: 18px; }
  .emoji-btn, .mic-btn, .image-btn { font-size: 1.2em; padding: 6px; }
  .emoji-panel { height: 350px; bottom: 70px; }
  .emoji-category { grid-template-columns: repeat(5, 1fr); }
  .emoji { font-size: 1.4em; padding: 6px; }
  .player-panel-header { padding: 10px 12px; }
  .player-panel-title { font-size: 0.9em; }
  .player-close-btn, .player-disconnect-btn { padding: 6px 12px; font-size: 0.8em; }
}
@media (max-width: 360px) {
  .header h2 { font-size: 0.85em; }
  .msg { max-width: 95%; }
  .input-wrapper { gap: 2px; padding: 4px; }
  .send-btn { width: 36px; height: 36px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .header { padding: 6px 12px; min-height: 44px; }
  .messages { padding: 8px; }
  .msg { max-width: 75%; }
  .input-area { padding: 6px 10px; }
  .emoji-panel { height: 220px; bottom: 55px; }
  .bg-controls-panel, .banned-panel { bottom: 55px; }
  .player-panel { height: 100vh; }
}

.image-btn.loading { pointer-events: none; }
.image-btn .spinner { width: 22px; height: 22px; border: 3px solid rgba(16, 185, 129, 0.3); border-top-color: #10b981; border-radius: 50%; animation: spin 0.8s linear infinite; }
.mic-btn {
  background: none;
  border: none;
  color: #ffff00;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.mic-btn svg {
  width: 24px;
  height: 24px;
}

.mic-btn:hover {
  color: #fff;
  background: rgba(102, 255, 51,0.7);
  transform: scale(1.1);
}

.mic-btn.recording {
  color: #ef4444;
  animation: micPulse 1s infinite;
  background: rgba(239, 68, 68, 0.15);
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.glow-btn {
  font-size: 18px;
  padding: 5px 5px;
  border: none;
  border-radius: 20%;
  cursor: pointer;
  color: white;
  animation: glowing 3s infinite;
}

@keyframes glowing {
  0% { background-color: #ff0055; box-shadow: 0 0 5px #ff0055; }
  50% { background-color: #00e5ff; box-shadow: 0 0 20px #00e5ff; }
  100% { background-color: #ff0055; box-shadow: 0 0 5px #ff0055; }
}