/* === KURAI - Modern Dark Theme v3 === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f0f23;
    --bg-server: #0a0a1a;
    --bg-hover: #1f2544;
    --bg-active: #2a2f5a;
    --bg-input: #1c1c3a;
    --bg-float: #0d0d1f;
    --text-primary: #e8eaf6;
    --text-secondary: #b0b3cc;
    --text-muted: #7f83a2;
    --text-link: #64b5f6;
    --text-normal: #e8eaf6;
    --accent: #7c4dff;
    --accent-hover: #651fff;
    --blurple: #7c4dff;
    --green: #00e676;
    --red: #ff5252;
    --yellow: #ffd740;
    --pink: #ff4081;
    --channel-text: #7f83a2;
    --divider: #252850;
    --scrollbar: #0f0f23;
    --scrollbar-thumb: #2a2f5a;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth transitions everywhere */
*, *::before, *::after { transition-duration: 0.15s; }

/* === APP LAYOUT === */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* === SERVER LIST === */
.server-list {
    width: 72px;
    min-width: 72px;
    background: var(--bg-server);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
    overflow-y: auto;
}
.server-list::-webkit-scrollbar { width: 0; }

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-radius 0.2s ease, background 0.2s ease;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
}
.notif-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-tertiary);
    z-index: 1;
}
.server-icon:hover, .server-icon.active {
    border-radius: 16px;
    background: var(--accent);
    color: white;
}
.server-icon.home {
    background: var(--accent);
    color: white;
    border-radius: 16px;
    font-size: 22px;
}
.server-icon.home:hover { background: var(--accent-hover); }
.server-icon.add {
    background: var(--bg-primary);
    color: var(--green);
    font-size: 24px;
}
.server-icon.add:hover {
    background: var(--green);
    color: white;
    border-radius: 16px;
}

.server-divider {
    width: 32px;
    height: 2px;
    background: var(--divider);
    border-radius: 1px;
}

.server-pill {
    position: absolute;
    left: -16px;
    width: 4px;
    height: 0;
    background: var(--text-primary);
    border-radius: 0 4px 4px 0;
    transition: height 0.2s;
}
.server-icon:hover .server-pill { height: 20px; }
.server-icon.active .server-pill { height: 40px; }

/* === CHANNEL SIDEBAR === */
.channel-sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.server-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 2px solid var(--bg-tertiary);
    cursor: pointer;
    transition: background 0.1s;
}
.server-header:hover { background: var(--bg-hover); }

.server-banner {
    width: 100%;
    max-height: 120px;
    overflow: hidden;
}
.server-banner img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
}

.channel-category {
    padding: 16px 0 4px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.channel-category:hover { color: var(--text-secondary); }

.channel-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--channel-text);
    font-size: 15px;
    gap: 6px;
    transition: background 0.1s, color 0.1s;
}
.channel-item:hover { background: var(--bg-hover); color: var(--text-secondary); }
.channel-item.active { background: var(--bg-active); color: var(--text-primary); }

.channel-hash {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.7;
    margin-right: 2px;
}

/* === USER PANEL === */
.user-panel {
    height: 52px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
    cursor: pointer;
}
.user-panel:hover { background: rgba(255,255,255,0.03); }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-status { font-size: 11px; color: var(--text-muted); }

/* === CHAT AREA === */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.chat-header {
    height: 48px;
    min-height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--bg-tertiary);
    gap: 8px;
}

.chat-header-hash { font-size: 22px; color: var(--text-muted); }
.chat-header-name { font-size: 15px; font-weight: 600; }
.chat-header-divider {
    width: 1px;
    height: 24px;
    background: var(--divider);
    margin: 0 8px;
}
.chat-header-topic {
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === MESSAGES === */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
}
.messages-container::-webkit-scrollbar { width: 8px; }
.messages-container::-webkit-scrollbar-track { background: transparent; }
.messages-container::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.message {
    display: flex;
    padding: 4px 16px;
    gap: 16px;
    min-height: 2.75rem;
    border-radius: 4px;
    margin: 0 8px;
}
.message:hover { background: rgba(255,255,255,0.03); }

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.message-content { flex: 1; min-width: 0; }
.message-header { display: flex; align-items: baseline; gap: 8px; }
.message-author {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.message-author:hover { text-decoration: underline; }
.message-timestamp { font-size: 12px; color: var(--text-muted); }
.message-body {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.375;
    word-wrap: break-word;
}

/* Badge next to username in messages */
.message-badge {
    font-size: 11px;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 2px;
}

/* === WELCOME === */
.welcome-message { padding: 16px; margin: 16px; }
.welcome-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 8px;
}
.welcome-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.welcome-desc { color: var(--text-muted); font-size: 14px; }

/* === MESSAGE INPUT === */
.message-input-container { padding: 0 16px 24px; }
.message-input-wrapper {
    background: var(--bg-input);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 16px;
}
.message-input-wrapper .attach-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 10px 4px 10px 0;
}
.message-input-wrapper .attach-btn:hover { color: var(--text-secondary); }

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    padding: 11px 0;
    resize: none;
    max-height: 200px;
}
.message-input::placeholder { color: var(--text-muted); }

.input-actions { display: flex; gap: 4px; align-items: center; }
.input-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}
.input-action-btn:hover { color: var(--text-secondary); }

/* === MEMBER LIST === */
.member-list {
    width: 240px;
    min-width: 240px;
    background: var(--bg-secondary);
    padding: 16px 8px;
    overflow-y: auto;
}

.member-category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 16px 8px 4px;
    letter-spacing: 0.02em;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    gap: 12px;
    cursor: pointer;
}
.member-item:hover { background: var(--bg-hover); }

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    position: relative;
}
.member-avatar .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--bg-secondary);
}

.member-name {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}

.member-role-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    white-space: nowrap;
}

/* === AUTH PAGES === */
.auth-page {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.auth-left {
    flex: 1;
    background: linear-gradient(-45deg, #5865f2, #9b59b6, #e74c8a, #1abc9c, #5865f2);
    background-size: 400% 400%;
    animation: authGradient 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@keyframes authGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
}

/* Floating particles */
.auth-left::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: floatParticles 20s linear infinite;
}

@keyframes floatParticles {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(15deg); }
}

.auth-branding {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    padding: 40px;
}

.auth-logo {
    font-size: 80px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.4));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.auth-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.auth-tagline {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    opacity: 0.9;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.08);
    padding: 10px 16px;
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
}
.auth-feature:hover {
    transform: translateX(4px);
    background: rgba(255,255,255,0.15);
}
.auth-feature-icon { font-size: 20px; }

.auth-right {
    width: 480px;
    min-width: 480px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    width: 100%;
    padding: 40px;
}
.auth-box h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.auth-field { margin-bottom: 18px; }
.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.auth-field input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid transparent;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    padding: 12px 14px;
    border-radius: 4px;
    transition: border-color 0.2s;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-field input::placeholder { color: var(--text-muted); }

.auth-submit {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, transform 0.1s;
    margin-top: 6px;
}
.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:active { transform: scale(0.98); }

.auth-error {
    background: rgba(242,63,67,0.15);
    color: var(--red);
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 3px solid var(--red);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-link a { color: var(--text-link); text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .auth-left { display: none; }
    .auth-right { width: 100%; min-width: 100%; }
}

/* === AVATAR COLORS === */
.avatar-red { background: var(--red) !important; }
.avatar-green { background: var(--green) !important; }
.avatar-yellow { background: var(--yellow) !important; }
.avatar-accent { background: var(--accent) !important; }
.avatar-blue { background: #3498db !important; }
.avatar-purple { background: #9b59b6 !important; }
.avatar-orange { background: #e67e22 !important; }
.avatar-teal { background: #1abc9c !important; }

/* === AVATAR IMAGES === */
.avatar-img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.avatar-32 { width: 32px; height: 32px; }
.avatar-40 { width: 40px; height: 40px; }
.avatar-80 { width: 80px; height: 80px; border: 4px solid var(--bg-primary); }

.member-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.member-avatar-wrap .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--bg-secondary);
}

/* === LOGOUT === */
.logout-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}
.logout-btn:hover { color: var(--red); }

/* === MODAL OVERLAY === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === PROFILE MODAL (own profile editing) === */
.profile-modal {
    background: var(--bg-primary);
    border-radius: 8px;
    width: 440px;
    overflow-y: auto;
    max-height: 90vh;
    position: relative;
    animation: modalSlide 0.2s ease;
}

@keyframes modalSlide {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.profile-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--accent), #9b59b6);
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-banner-upload {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: background 0.2s;
}
.profile-banner-upload:hover { background: rgba(0,0,0,0.7); }

.profile-modal-content {
    padding: 0 24px 24px;
}

.profile-avatar-section {
    margin-top: -40px;
    position: relative;
    display: inline-block;
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    border: 4px solid var(--bg-primary);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    border: 2px solid var(--bg-primary);
}
.avatar-upload-btn:hover { background: var(--bg-hover); }

/* === USER PROFILE CARD (popup when clicking on a user) === */
.profile-card {
    background: var(--bg-float);
    border-radius: 8px;
    width: 340px;
    overflow: hidden;
    position: relative;
    animation: modalSlide 0.2s ease;
}

.profile-card-banner {
    height: 60px;
    background: linear-gradient(135deg, var(--accent), #9b59b6);
    background-size: cover;
    background-position: center;
}

.profile-card-body {
    padding: 0 16px 16px;
}

.profile-card-avatar {
    margin-top: -30px;
    position: relative;
    display: inline-block;
}

.profile-card-avatar img,
.profile-card-avatar .profile-card-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid var(--bg-float);
    object-fit: cover;
}

.profile-card-avatar-placeholder {
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.profile-card-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--bg-float);
}
.profile-card-status.online { background: var(--green); }
.profile-card-status.offline { background: var(--text-muted); }

.profile-card-name {
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.profile-card-badges {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    cursor: default;
    transition: transform 0.1s;
}
.badge-pill:hover { transform: scale(1.05); }

.profile-card-section {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.profile-card-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-card-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.profile-card-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.profile-card-roles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
}
.role-pill .role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Admin crown indicator */
.admin-crown {
    color: var(--yellow);
    font-size: 14px;
}

/* === BIO === */
.bio-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
}
.bio-input:focus { outline: 2px solid var(--accent); }

.save-bio-btn {
    margin-top: 8px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.save-bio-btn:hover { background: var(--accent-hover); }

.close-modal-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.3);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.close-modal-btn:hover { background: rgba(0,0,0,0.5); }

/* === FRIENDS PANEL === */
.friends-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.friend-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}
.friend-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.friend-tab.active { color: var(--text-primary); background: var(--bg-active); }

.add-friend-tab {
    background: var(--green) !important;
    color: white !important;
    border-radius: 4px;
}
.add-friend-tab:hover { opacity: 0.9; }

.pending-badge {
    background: var(--red);
    color: white;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}

.friends-content { flex: 1; overflow-y: auto; padding: 8px 0; }

.friends-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px;
    font-size: 15px;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    border-top: 1px solid var(--divider);
    cursor: pointer;
}
.friend-item:hover { background: var(--bg-hover); }

.friend-info { flex: 1; display: flex; flex-direction: column; }
.friend-name { font-size: 15px; font-weight: 600; }
.friend-sub { font-size: 13px; color: var(--text-muted); }

.friend-actions { display: flex; gap: 8px; }

.friend-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.friend-action-btn.accept:hover { background: var(--green); color: white; }
.friend-action-btn.decline:hover { background: var(--red); color: white; }
.friend-action-btn.message:hover { background: var(--blurple); color: white; }

/* === DM SIDEBAR === */
.dm-conversation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--channel-text);
    transition: background 0.1s, color 0.1s;
}
.dm-conversation-item:hover { background: var(--bg-hover); color: var(--text-normal); }
.dm-conversation-item.active { background: var(--bg-active); color: white; }
.dm-conversation-info { min-width: 0; }
.dm-conversation-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dm-call-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    opacity: 0.7;
}
.dm-call-btn:hover { background: var(--bg-hover); opacity: 1; }

.status-dot-friend {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}
.status-dot-friend.online { background: var(--green); }
.status-dot-friend.offline { background: var(--text-muted); }

/* === ADD FRIEND === */
.add-friend-section { padding: 24px; }
.add-friend-section h3 { font-size: 18px; margin-bottom: 8px; }
.add-friend-input-wrapper { display: flex; gap: 8px; }
.add-friend-input {
    flex: 1;
    background: var(--bg-tertiary);
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    padding: 12px;
    border-radius: 4px;
}
.add-friend-input:focus { outline: 2px solid var(--accent); }
.add-friend-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.add-friend-btn:hover { background: var(--accent-hover); }

/* === GENERIC MODAL === */
.generic-modal {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 32px;
    width: 440px;
    position: relative;
    animation: modalSlide 0.2s ease;
}

.modal-label {
    display: block;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.login-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.login-input:focus { outline: 2px solid var(--accent); }

.login-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}
.login-btn:hover { background: var(--accent-hover); }

/* === SERVER CHOICE === */
.server-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.server-choice-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--divider);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, border-color 0.2s;
}
.server-choice-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* === INVITE CODE === */
.invite-code-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 8px;
}
.invite-code-box code {
    flex: 1;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 16px;
    color: var(--text-primary);
    letter-spacing: 1px;
}
.copy-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.copy-btn:hover { background: var(--accent-hover); }

/* === CHANNEL BTN === */
.add-channel-btn {
    margin-left: auto;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.1s;
    line-height: 1;
}
.add-channel-btn:hover { color: var(--text-primary); }

.delete-channel-btn {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.1s;
    padding: 2px 4px;
}
.channel-item:hover .delete-channel-btn,
.voice-channel-item:hover .delete-channel-btn { opacity: 1; }
.delete-channel-btn:hover { color: var(--red); }

/* === SERVER SETTINGS === */
.settings-danger {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
}
.danger-btn {
    background: var(--red);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    width: 100%;
}
.danger-btn:hover { opacity: 0.9; }
.danger-btn.leave {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
}
.danger-btn.leave:hover { background: var(--red); color: white; }

/* === NOTIFICATION DOT === */
.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
}

/* === ADMIN PANEL STYLES === */
.admin-btn {
    background: none;
    border: none;
    color: var(--yellow);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.admin-btn:hover { background: var(--bg-hover); }

.admin-user-list {
    max-height: 400px;
    overflow-y: auto;
}

.admin-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 4px;
}
.admin-user-item:hover { background: var(--bg-hover); }

.admin-badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.admin-badge-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid var(--divider);
    transition: border-color 0.2s, background 0.2s;
}
.admin-badge-item:hover { border-color: var(--accent); }
.admin-badge-item.granted {
    background: rgba(88,101,242,0.2);
    border-color: var(--accent);
}

/* === ROLE COLORS === */
.role-owner { color: var(--yellow); }
.role-admin { color: var(--red); }
.role-moderator { color: var(--green); }
.role-member { color: var(--text-secondary); }

/* === TOOLTIP === */
.tooltip {
    position: absolute;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
}

/* === ROLE MANAGEMENT IN SETTINGS === */
.role-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--divider);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.kick-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}
.kick-btn:hover { color: var(--red); }

/* === TOAST NOTIFICATIONS === */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-float);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 9999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    border-left: 4px solid var(--accent);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }

@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* === VOICE CHANNELS === */
.voice-channel-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--channel-text);
    font-size: 15px;
    gap: 6px;
    transition: background 0.1s, color 0.1s;
}
.voice-channel-item:hover { background: var(--bg-hover); color: var(--text-secondary); }
.voice-channel-item.active { background: var(--bg-active); color: var(--text-primary); }

.voice-channel-icon {
    font-size: 18px;
    opacity: 0.7;
    margin-right: 2px;
}

.voice-channel-users {
    padding-left: 32px;
    margin-bottom: 4px;
}

.voice-channel-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}
.voice-channel-user:hover { background: var(--bg-hover); }

.voice-channel-user .voice-user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.voice-muted-icon {
    font-size: 11px;
    color: var(--red);
    margin-left: auto;
}

/* === VOICE BAR (bottom of sidebar when connected) === */
.voice-bar {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--divider);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.2s ease;
}

.voice-bar-info {
    flex: 1;
    min-width: 0;
}

.voice-bar-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 4px;
}

.voice-bar-status .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulseDot 1.5s ease infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.voice-bar-channel {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-bar-controls {
    display: flex;
    gap: 4px;
}

.voice-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, color 0.1s;
}
.voice-control-btn:hover { background: var(--bg-active); }
.voice-control-btn.muted { color: var(--red); background: rgba(242,63,67,0.15); }
.voice-control-btn.disconnect { color: var(--red); }
.voice-control-btn.disconnect:hover { background: var(--red); color: white; }

/* === VOICE PANEL === */
.voice-panel-users {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px;
    overflow-y: auto;
}

.voice-panel-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    transition: background 0.2s;
    cursor: pointer;
    min-width: 120px;
}
.voice-panel-user:hover { background: var(--bg-hover); }
.voice-panel-user.muted { opacity: 0.6; }

.voice-panel-user-avatar {
    position: relative;
    border-radius: 50%;
    border: 3px solid var(--green);
    padding: 3px;
    transition: border-color 0.3s;
}
.voice-panel-user.muted .voice-panel-user-avatar {
    border-color: var(--text-muted);
}
.voice-panel-user-avatar img,
.voice-panel-user-avatar .default-avatar {
    border-radius: 50%;
}

.voice-panel-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-normal);
}
.voice-panel-user-status {
    font-size: 12px;
    color: var(--text-muted);
}

.voice-panel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-top: 2px solid var(--bg-tertiary);
}

.voice-panel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    justify-content: center;
    cursor: pointer;
    color: var(--text-normal);
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}
.voice-panel-btn .voice-panel-btn-icon { font-size: 22px; }
.voice-panel-btn .voice-panel-btn-label { display: none; }
.voice-panel-btn:hover { background: var(--bg-active); }
.voice-panel-btn.active { background: var(--blurple); color: white; }
.voice-panel-btn.disconnect { background: var(--red); color: white; }
.voice-panel-btn.disconnect:hover { background: #a12d33; }

/* === STREAM VIDEO === */
.voice-stream-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #000;
    border-bottom: 2px solid var(--bg-tertiary);
    max-height: 50%;
    position: relative;
}
.voice-stream-area video {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.stream-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* === MIC TEST BAR === */
.mic-test-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}
.mic-test-level {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green), #43b581);
    border-radius: 4px;
    transition: width 0.05s;
}

/* === SETTINGS TABS === */
.settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--bg-tertiary);
    padding-bottom: 0;
}
.settings-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.settings-tab:hover { color: var(--text-normal); }
.settings-tab.active { color: white; border-bottom-color: var(--blurple); }

/* === ROLES === */
.role-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}
.role-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.role-name { font-weight: 700; font-size: 14px; }
.role-edit-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.role-edit-btn:hover { opacity: 1; }
.role-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.role-delete-btn:hover { opacity: 1; }
.role-perms { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.perm-tag {
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-active);
    border-radius: 3px;
    color: var(--text-muted);
}
.perm-tag.denied { background: rgba(242,63,67,0.2); color: var(--red); }
.perm-check {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}
.perm-check input { cursor: pointer; }

/* === CHANNEL PERMISSIONS === */
.channel-perm-section {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}
.channel-perm-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-normal);
}
.channel-perm-role {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    border-top: 1px solid var(--bg-active);
}
.channel-perm-toggles { display: flex; gap: 12px; }
.perm-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}
.perm-mini input { cursor: pointer; }

/* === CALL PANEL (in-call interface) === */
.call-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.call-panel-avatar {
    border-radius: 50%;
    border: 4px solid var(--green);
    padding: 4px;
    animation: call-pulse 2s infinite;
}
.call-panel-avatar img,
.call-panel-avatar .default-avatar {
    border-radius: 50%;
}
.call-panel-username {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-normal);
}
.call-panel-timer {
    font-size: 18px;
    color: var(--green);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.call-panel-status {
    font-size: 14px;
    color: var(--text-muted);
}

@keyframes call-pulse {
    0%, 100% { border-color: var(--green); }
    50% { border-color: #2d7d46; }
}

/* === CALL MODAL === */
.call-modal {
    background: var(--bg-float);
    border-radius: 12px;
    width: 340px;
    padding: 32px;
    text-align: center;
    position: relative;
    animation: modalSlide 0.2s ease;
}

.call-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}

.call-avatar.ringing {
    animation: callPulse 1.5s ease infinite;
}

@keyframes callPulse {
    0% { box-shadow: 0 0 0 0 rgba(35,165,89,0.4); }
    70% { box-shadow: 0 0 0 20px rgba(35,165,89,0); }
    100% { box-shadow: 0 0 0 0 rgba(35,165,89,0); }
}

.call-username {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.call-status {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.call-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.call-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}
.call-action-btn:hover { transform: scale(1.1); }
.call-action-btn.accept { background: var(--green); color: white; }
.call-action-btn.reject { background: var(--red); color: white; }
.call-action-btn.hangup { background: var(--red); color: white; }

/* === SPEAKING INDICATOR === */
.speaking {
    box-shadow: 0 0 0 3px var(--green);
    transition: box-shadow 0.2s;
}

/* === PROFILE CALL BUTTON === */
.profile-call-btn {
    background: var(--green);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}
.profile-call-btn:hover { opacity: 0.9; }
.profile-call-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* === REPLY BAR === */
.reply-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 16px; background: var(--bg-secondary); border-radius: 8px 8px 0 0;
    font-size: 13px; color: var(--text-muted); border-left: 3px solid var(--accent);
}
.reply-bar strong { color: var(--text-primary); }

.msg-reply-ref {
    font-size: 12px; color: var(--text-muted); padding: 2px 0 2px 52px;
    cursor: pointer; margin-bottom: -4px;
}
.msg-reply-ref:hover { color: var(--text-primary); }
.reply-icon { color: var(--accent); }

.message-main { display: flex; gap: 12px; }

/* === MESSAGE ACTIONS (reply, react) === */
.message-actions {
    display: none; position: absolute; right: 8px; top: -8px;
    background: var(--bg-secondary); border-radius: 4px; border: 1px solid var(--bg-tertiary);
}
.message-actions button {
    background: none; border: none; cursor: pointer; padding: 2px 6px;
    font-size: 14px; opacity: 0.6; color: var(--text-primary);
}
.message-actions button:hover { opacity: 1; }
.message:hover .message-actions { display: flex; }
.message { position: relative; flex-direction: column; }
.message.highlight { background: var(--accent)15; transition: background 0.3s; }

/* === REACTIONS === */
.msg-reactions { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0 0 52px; }
.reaction-btn {
    background: var(--bg-tertiary); border: 1px solid transparent; border-radius: 6px;
    padding: 2px 6px; cursor: pointer; font-size: 13px; color: var(--text-primary);
    transition: all 0.15s;
}
.reaction-btn:hover { border-color: var(--accent); background: var(--accent)22; }
.reaction-btn.reacted { border-color: var(--accent); background: var(--accent)22; }
.reaction-btn.add-reaction { opacity: 0; font-size: 12px; }
.message:hover .add-reaction { opacity: 0.5; }
.add-reaction:hover { opacity: 1 !important; }

.quick-reaction-picker {
    display: flex; gap: 2px; padding: 4px 8px; background: var(--bg-secondary);
    border-radius: 8px; border: 1px solid var(--bg-tertiary); position: absolute;
    bottom: 100%; right: 8px; z-index: 10; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.quick-reaction-picker button {
    background: none; border: none; cursor: pointer; font-size: 18px; padding: 4px;
    border-radius: 4px; transition: background 0.15s;
}
.quick-reaction-picker button:hover { background: var(--bg-tertiary); }

/* === ATTACHMENTS === */
.msg-attachment { margin-top: 4px; overflow: hidden; }
.msg-attachment img { border-radius: 8px; cursor: pointer; max-width: 100%; max-height: 300px; display: block; }
.msg-attachment img:hover { opacity: 0.9; }

/* === MENTIONS === */
.mention {
    background: var(--accent)22; color: var(--accent); padding: 0 2px;
    border-radius: 3px; cursor: pointer; font-weight: 500;
}
.mention:hover { background: var(--accent)44; }

/* === EMOJI PICKER === */
.emoji-picker {
    position: absolute; bottom: 100%; right: 0; background: var(--bg-secondary);
    border-radius: 8px; border: 1px solid var(--bg-tertiary); padding: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 20; flex-wrap: wrap;
    max-width: 320px;
}
.emoji-grid { display: flex; flex-wrap: wrap; gap: 2px; }
.emoji-btn {
    background: none; border: none; cursor: pointer; font-size: 22px;
    padding: 4px; border-radius: 4px; transition: background 0.15s;
}
.emoji-btn:hover { background: var(--bg-tertiary); }

/* === GIF PICKER === */
.gif-picker {
    position: absolute; bottom: 100%; right: 40px; background: var(--bg-secondary);
    border-radius: 8px; border: 1px solid var(--bg-tertiary); padding: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 20; width: 400px;
    max-height: 400px; flex-direction: column;
}
.gif-picker input {
    width: 100%; padding: 8px; border: 1px solid var(--bg-tertiary);
    border-radius: 4px; background: var(--bg-primary); color: var(--text-primary);
    margin-bottom: 8px; outline: none;
}
.gif-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px;
    overflow-y: auto; max-height: 340px;
}
.gif-grid img {
    width: 100%; border-radius: 4px; cursor: pointer; object-fit: cover; height: 120px;
}
.gif-grid img:hover { opacity: 0.8; }

/* === LIGHT THEME === */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f2f3f5;
    --bg-tertiary: #e3e5e8;
    --text-primary: #2e3338;
    --text-secondary: #4f5660;
    --text-muted: #747f8d;
    --accent: #5865f2;
    --channel-text: #4f5660;
    --server-bg: #e3e5e8;
    --green: #23a559;
    --red: #ed4245;
    --yellow: #f0b232;
}
[data-theme="light"] .server-list { background: #e3e5e8; }
[data-theme="light"] .sidebar { background: #f2f3f5; }
[data-theme="light"] .chat-area { background: #ffffff; }
[data-theme="light"] .member-sidebar { background: #f2f3f5; }
[data-theme="light"] .message:hover { background: #f2f3f580; }
[data-theme="light"] .message-input { background: #ebedef; color: #2e3338; }
[data-theme="light"] .message-input-wrapper { background: #ebedef; }
[data-theme="light"] .chat-header { background: #ffffff; border-color: #e3e5e8; }
[data-theme="light"] .modal-overlay .generic-modal { background: #ffffff; color: #2e3338; }
[data-theme="light"] input, [data-theme="light"] select { background: #e3e5e8; color: #2e3338; }
