* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Bloop Brand Colors - Modern purple/blue gradient theme */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --message-sent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --message-received: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* Auth Screen */
.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    background: white;
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
}

/* Logo Styles */
.logo-image {
    max-width: 200px;
    width: 80%;
    height: auto;
    margin: 0 auto 16px;
    display: block;
}

.brand-logo {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 32px;
}

.form-title {
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
}

/* Input Groups with Icons */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.auth-form input {
    width: 100%;
    padding: 14px 14px 14px 48px;
    border: 2px solid var(--bg-tertiary);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.auth-form input:focus + .input-icon {
    color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee2e2;
    border: 2px solid #fca5a5;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.success-message {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.error-message.hidden,
.success-message.hidden {
    display: none;
}

/* App Screen */
.app-screen {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-info span {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

#user-status {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

.btn-logout {
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.search-bar {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.search-bar input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-secondary);
    transition: background 0.2s;
}

.conversation-item:hover {
    background: var(--bg-secondary);
}

.conversation-item.active {
    background: var(--bg-tertiary);
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.conversation-last-message {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    text-align: right;
}

.conversation-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.unread-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.no-chat {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%; /* Constrains to parent height */
    overflow: hidden; /* Prevents container from growing */
}

.chat-header {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevents header from being squished */
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-username {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: -2px;
    margin-bottom: 2px;
}

.status-text {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-text::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.status-text.online {
    color: var(--success-color);
}

.status-text.online::before {
    background: var(--success-color);
}

.status-text.away {
    color: var(--warning-color);
}

.status-text.away::before {
    background: var(--warning-color);
}

.status-text.busy {
    color: var(--danger-color);
}

.status-text.busy::before {
    background: var(--danger-color);
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.btn-call {
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.btn-call:hover {
    color: var(--primary-color);
}

.btn-delete:hover {
    color: #ef4444 !important;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: linear-gradient(135deg, 
        var(--bg-gradient-start, #f0f4ff) 0%, 
        var(--bg-gradient-end, #e0e7ff) 100%);
    min-height: 0; /* Important: allows flex item to shrink below content size */
    display: flex;
    flex-direction: column;
}

.message {
    display: flex;
    margin-bottom: 15px;
    max-width: 70%;
}

.message.sent {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 10px;
}

.message-content {
    flex: 1;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 12px;
    margin-bottom: 4px;
}

.message.received .message-bubble {
    background: var(--message-received);
}

.message.sent .message-bubble {
    background: var(--message-sent);
    color: white;
}

.message-info {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.message.sent .message-info {
    justify-content: flex-end;
}

.voice-note {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-note audio {
    max-width: 200px;
}

.typing-indicator {
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.message-input-area {
    background: white;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0; /* Prevents input from being pushed off screen */
    position: relative;
    z-index: 10;
}

.btn-voice {
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.btn-voice.recording {
    color: var(--danger-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#message-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
}

#message-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-send {
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.btn-send:hover {
    background: var(--primary-hover);
}

/* Users Panel */
.users-panel {
    width: 300px;
    background: white;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.users-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.users-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.users-list {
    flex: 1;
    overflow-y: auto;
}

.user-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-item:hover {
    background: var(--bg-secondary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
}

.call-modal-content {
    min-width: 400px;
}

.incoming-call-info {
    margin: 20px 0;
}

.call-timer {
    font-size: 24px;
    font-weight: 600;
    margin: 20px 0;
}

.video-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: black;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid white;
}

.call-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-answer {
    padding: 12px 24px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-decline, .btn-end-call {
    padding: 12px 24px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-mute, .btn-video {
    padding: 12px 24px;
    background: var(--text-secondary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Responsive */
/* Mobile back button */
.mobile-back-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
    color: var(--text-primary);
}

.mobile-back-btn:hover {
    background: var(--bg-secondary);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .mobile-back-btn {
        display: block;
    }
    
    .sidebar {
        width: 100%;
        position: absolute;
        z-index: 10;
        height: 100vh;
    }
    
    .sidebar.hidden {
        display: none;
    }
    
    /* Users panel on mobile - clean dropdown */
    .users-panel {
        position: absolute;
        top: 155px; /* Right below search bar */
        left: 15px;
        right: 15px;
        max-height: 300px;
        z-index: 25;
        background: white;
        overflow-y: auto;
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
        border-radius: 12px;
        border: 1px solid var(--border-color);
    }
    
    .users-panel.hidden {
        display: none;
    }
    
    /* Hide users header on mobile - not needed */
    .users-panel .users-header {
        display: none;
    }
    
    .chat-area {
        width: 100%;
    }
    
    .chat-container {
        position: absolute;
        width: 100%;
        height: 100vh;
        z-index: 11;
        display: none;
    }
    
    .message {
        max-width: 85%;
    }
}

/* Bloop Branding */
.app-logo {
    text-align: center;
    margin-bottom: 30px;
}

.app-name {
    font-size: 48px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.app-tagline {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.app-brand {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.brand-name {
    font-size: 28px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.5px;
}

/* Modern Button Styles */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
}

/* Modern Message Bubbles */
.message.sent .message-bubble {
    background: var(--message-sent);
    box-shadow: var(--shadow-sm);
}

.message.received .message-bubble {
    background: var(--message-received);
    box-shadow: var(--shadow-sm);
}

/* Modern Cards */
.conversation-item {
    transition: all 0.2s ease;
}

.conversation-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.conversation-item.active {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary-color);
}

/* File Upload Styles */
.btn-attachment {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-attachment:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.file-preview {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 12px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    max-height: 150px;
    z-index: 5;
}

.file-preview-item {
    position: relative;
    min-width: 100px;
    max-width: 120px;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.file-preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.file-icon {
    font-size: 48px;
    margin: 8px 0;
}

.file-name {
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.file-size {
    font-size: 10px;
    color: var(--text-secondary);
}

.btn-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: var(--danger-color);
}

/* File Message Styles */
.message-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.message-file img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
}

.message-file .file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-file .file-icon {
    font-size: 32px;
}

.message-file .file-name {
    font-weight: 600;
    color: var(--text-primary);
}

.message-file .file-size {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Improved Sidebar Header */
.user-profile-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    position: relative;
}

.user-profile-main {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile-main:hover {
    background: rgba(0, 0, 0, 0.05);
}

.avatar-wrapper {
    position: relative;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--success-color);
}

.status-indicator.away {
    background: var(--warning-color);
}

.status-indicator.busy {
    background: var(--danger-color);
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.user-status-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.dropdown-icon {
    margin-left: auto;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.user-profile-main.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Profile Menu Dropdown */
.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 1000;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary);
    font-size: 14px;
}

.menu-item:hover {
    background: var(--bg-secondary);
}

.menu-item svg {
    color: var(--text-secondary);
}

.menu-item-danger {
    color: var(--danger-color);
}

.menu-item-danger svg {
    color: var(--danger-color);
}

.menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.menu-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px 4px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.status-online {
    background: var(--success-color);
}

.status-dot.status-away {
    background: var(--warning-color);
}

.status-dot.status-busy {
    background: var(--danger-color);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.help-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.avatar-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
}

/* Mobile Send Button Fix */
@media (max-width: 768px) {
    .message-input-area {
        padding: 10px;
        gap: 6px;
    }
    
    #message-input {
        font-size: 16px; /* Prevents zoom on iOS */
        min-width: 0; /* Allows input to shrink below content size */
    }
    
    .btn-send {
        flex-shrink: 0;
        min-width: 60px;
        padding: 10px 16px;
    }
    
    .btn-attachment, .btn-voice {
        flex-shrink: 0;
        padding: 8px;
    }
    
    /* On very small screens, make buttons even smaller but keep them visible */
    @media (max-width: 360px) {
        .btn-attachment, .btn-voice {
            padding: 6px;
            min-width: 36px;
        }
        
        .btn-attachment svg, .btn-voice svg {
            width: 18px;
            height: 18px;
        }
        
        .btn-send {
            min-width: 50px;
            padding: 8px 12px;
            font-size: 14px;
        }
        
        .message-input-area {
            gap: 4px;
            padding: 8px;
        }
    }
}

/* Message Status Indicators (WhatsApp-style checkmarks) */
.message-status {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    font-size: 14px;
    vertical-align: middle;
}

.message-status svg {
    width: 16px;
    height: 16px;
}

/* Single checkmark - sent */
.status-sent {
    color: rgba(0, 0, 0, 0.4);
}

/* Double checkmark - delivered */
.status-delivered {
    color: rgba(0, 0, 0, 0.4);
}

/* Double checkmark blue - read */
.status-read {
    color: #4fc3f7;
}

.message.received .message-status {
    display: none; /* Don't show status on received messages */
}

/* Theme Settings Modal */
.color-picker-group {
    display: flex;
    gap: 20px;
}

.color-picker-group > div {
    flex: 1;
}

.color-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

.theme-preview {
    margin-top: 20px;
}

.preview-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    padding: 20px;
    border-radius: 12px;
    min-height: 80px;
}

.preview-message {
    background: #6366f1;
    color: white;
    padding: 10px 15px;
    border-radius: 18px;
    display: inline-block;
    max-width: 70%;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
}

.success-message.hidden {
    display: none;
}