/**
 * MumbleChat CSS Styles
 * Futuristic Neon Theme - Centralized styles
 */

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Futuristic Neon Color Palette */
    --primary: #06B6D4;
    --primary-soft: #0891B2;
    --secondary: #8B5CF6;
    --accent: #22D3EE;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    /* Neon Highlights */
    --neon-cyan: #00F5FF;
    --neon-purple: #A855F7;
    --neon-blue: #3B82F6;
    --neon-pink: #EC4899;
    
    /* Text Colors */
    --text: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    /* Background Colors - Deep Space */
    --bg: #0A0E1A;
    --bg-panel: #111827;
    --bg-card: #1F2937;
    --bg-soft: #1E293B;
    --bg-hover: #2D3748;
    
    /* Borders & Effects */
    --border: rgba(139, 92, 246, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.3);
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
    
    /* Message Colors */
    --msg-sent-start: #06B6D4;
    --msg-sent-end: #8B5CF6;
    --msg-received-bg: #1E293B;
    --msg-received-border: #334155;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(ellipse at 15% 10%, rgba(139, 92, 246, 0.15), transparent 40%),
                radial-gradient(ellipse at 85% 5%, rgba(6, 182, 212, 0.12), transparent 35%),
                radial-gradient(ellipse at 50% 95%, rgba(59, 130, 246, 0.08), transparent 30%),
                #0A0E1A;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Lock scroll only when app is loaded */
body.app-loaded {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ===== Loading Screen ===== */
.loading-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== App Container ===== */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    padding-bottom: 70px;
}

.main-view {
    width: 340px;
    background: linear-gradient(180deg, #111827 0%, #0A0E1A 100%);
    border-right: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #111827 0%, #0A0E1A 100%);
}

/* ===== Top Bar ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: grid;
    place-items: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.35),
                0 4px 16px rgba(139, 92, 246, 0.25);
}

.brand-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.brand-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
}

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    color: var(--text-secondary);
    flex-direction: column;
    gap: 18px;
    padding: 20px;
}

.empty-icon {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.3), rgba(139, 92, 246, 0.15), transparent);
    display: grid;
    place-items: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35),
                inset 0 0 60px rgba(6, 182, 212, 0.1);
}

.empty-icon span {
    font-size: 64px;
}

.empty-state h2 {
    font-size: 22px;
    margin: 0;
    color: var(--text);
}

.empty-state p {
    color: var(--text-secondary);
    margin-top: 6px;
    font-size: 14px;
}

.empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(6, 182, 212, 0.3),
                0 4px 12px rgba(139, 92, 246, 0.2);
    font-size: 14px;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-soft);
}

.btn {
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    border: none;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, #0A0E1A 0%, #050810 100%);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    border-radius: 12px;
    min-width: 60px;
    position: relative;
}

.nav-item.active {
    color: var(--success);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    width: 32px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.5);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
}

.nav-item:active {
    transform: scale(0.95);
}

/* ===== Sidebar (Contacts Panel) ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-header {
    flex-shrink: 0;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-top h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.header-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-btn:hover {
    background: var(--bg-soft);
}

.back-arrow {
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-arrow:hover {
    background: var(--bg-soft);
}

.search-container {
    padding: 10px 16px;
    flex-shrink: 0;
}

.search-box {
    width: 100%;
    padding: 10px 14px;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
}

.search-box::placeholder {
    color: var(--text-secondary);
}

/* ===== Contacts List - SCROLLABLE ===== */
.contacts-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.contact-item:hover {
    background: var(--bg-soft);
}

.contact-item.active {
    background: rgba(6, 182, 212, 0.12);
    border-left: 3px solid var(--primary);
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
}

.contact-avatar .online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--bg-panel);
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-preview {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.contact-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.unread-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.muted-icon {
    font-size: 12px;
}

.empty-contacts {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-contacts .hint {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.7;
}

/* ===== Sidebar Status Bar (inside main-view) ===== */
.sidebar-status-bar {
    padding: 10px 16px;
    background: rgba(10, 14, 26, 0.95);
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* Old fixed status bar - HIDDEN */
.status-bar {
    display: none !important;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #53607a;
    box-shadow: 0 0 0 2px rgba(83,96,122,0.25);
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(51,214,159,0.25);
}

/* ===== Badge ===== */
.badge-pill {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
    color: var(--neon-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    opacity: 1;
}

.modal-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg-soft);
}

.modal-content {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===== Toast Notification ===== */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s;
    max-width: 350px;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 2500;
    opacity: 0;
    transition: opacity 0.3s;
}

.loading-overlay.show {
    opacity: 1;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

.loading-message {
    color: var(--text);
    font-size: 16px;
}

/* ===== Context Menu ===== */
.context-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 180px;
    z-index: 1500;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}

.context-menu-item:hover {
    background: var(--bg-soft);
}

.context-menu-item.danger {
    color: var(--error);
}

.context-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    background: rgba(17, 24, 39, 0.8);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.prompt-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .main-view {
        width: 100%;
        height: calc(100vh - 70px);
        border-right: none;
        border-bottom: none;
    }

    .chat-area {
        display: none;
        width: 100%;
        height: calc(100vh - 70px);
    }

    .chat-area.active {
        display: flex !important;
    }

    .main-view.hidden {
        display: none;
    }

    .status-bar {
        display: none !important;
    }

    .empty-icon {
        width: 120px;
        height: 120px;
    }

    .empty-icon span {
        font-size: 48px;
    }

    .empty-state h2 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 13px;
    }

    .modal-dialog {
        width: 95%;
    }

    .toast-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .brand-text h2 {
        font-size: 16px;
    }

    .brand-text p {
        font-size: 11px;
    }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Mobile Layout Fixes ===== */
@media (max-width: 768px) {
    /* Sidebar status bar visible on mobile */
    .sidebar-status-bar {
        display: flex !important;
    }
    
    /* Hide old fixed status bar */
    .status-bar {
        display: none !important;
    }
    
    .app-container {
        padding-bottom: 70px !important;
    }
    
    .chat-area {
        height: calc(100vh - 70px) !important;
    }
    
    .conversation-container {
        height: calc(100vh - 70px) !important;
        padding-bottom: 0 !important;
    }
    
    /* Input area fixed above bottom nav with more spacing */
    .input-area {
        position: fixed !important;
        bottom: 80px !important;
        left: 8px !important;
        right: 8px !important;
        background: rgba(17, 24, 39, 0.98) !important;
        border: 1px solid var(--border) !important;
        border-radius: 16px !important;
        padding: 8px 12px !important;
        z-index: 999 !important;
        margin: 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3) !important;
    }
    
    .messages-container {
        max-height: calc(100vh - 240px) !important;
        padding-bottom: 90px !important;
        margin-bottom: 0 !important;
    }
}

/* ===== Desktop Input Area ===== */
@media (min-width: 769px) {
    .input-area {
        position: relative !important;
        margin-bottom: 10px !important;
        padding: 12px 16px !important;
        background: rgba(17, 24, 39, 0.9) !important;
        border-radius: 12px !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
}

/* ===== Wallet Info Box ===== */
.wallet-info-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.wallet-info-box p {
    margin: 0;
}

.wallet-info-box p + p {
    margin-top: 8px;
}

.wallet-info-box strong {
    color: var(--text);
}

/* ===== Message Bubbles - Futuristic Theme ===== */
.message {
    display: flex;
    flex-direction: column;
    margin: 8px 16px;
    max-width: 75%;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.message.received {
    align-self: flex-start;
    align-items: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    max-width: 100%;
}

.message-text {
    white-space: pre-wrap;
}

.message-translation {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.message.received .message-translation {
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, var(--msg-sent-start) 0%, var(--msg-sent-end) 100%);
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25),
                0 2px 8px rgba(139, 92, 246, 0.2);
}

.message.received .message-bubble {
    background: var(--msg-received-bg);
    color: var(--text);
    border: 1px solid var(--msg-received-border);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.message-status {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    font-size: 12px;
}

.status-icon {
    font-size: 11px;
}

.status-icon.sending {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.status-icon.delivered {
    color: var(--success) !important;
}

.status-icon.read {
    color: var(--primary) !important;
}

.status-icon.failed {
    color: var(--error) !important;
    cursor: pointer;
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.empty-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-align: center;
    padding: 40px;
}

.empty-messages .hint {
    font-size: 13px;
    margin-top: 8px;
    opacity: 0.7;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Conversation Header */
.conversation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.back-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--bg-soft);
}

.chat-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chat-info h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.chat-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* Input Area */
.input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(17, 24, 39, 0.95);
    border-top: 1px solid var(--border);
}

.input-actions {
    display: flex;
    gap: 4px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    opacity: 0.7;
}

.action-btn:hover {
    background: var(--bg-soft);
    opacity: 1;
}

.message-input {
    flex: 1;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
}

.message-input::placeholder {
    color: var(--text-muted);
}

.message-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-soft);
    box-shadow: none;
}

/* Conversation Container */
.conversation-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
}
