:root {
    --primary: #1e3a5f;
    --primary-light: #2a5082;
    --primary-lighter: #e8eef6;
    --primary-bg: #f4f7fb;
    --accent: #1a6fb5;
    --accent-hover: #1580d0;
    --text: #1c2b3a;
    --text-secondary: #5a7190;
    --border: #d0dae6;
    --border-light: #e4ebf2;
    --surface: #ffffff;
    --surface-alt: #f0f4f9;
    --warning: #c0392b;
    --success: #1a8a5c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Lock icon for branding */
.lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    color: white;
}

.msg-bubble {
    max-width: 75%;
    word-break: break-word;
}

.msg-own {
    background: var(--accent);
    color: white;
    border: none;
}

.msg-own .msg-meta {
    color: rgba(255,255,255,0.7);
}

.msg-other {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.msg-other .msg-meta {
    color: var(--text-secondary);
}

.msg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--warning);
    font-style: italic;
}

pre.code-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.msg-own pre.code-block {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

.file-attachment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--accent);
    font-size: 13px;
}

.file-attachment:hover {
    background: var(--primary-lighter);
    border-color: var(--accent);
}

.msg-own .file-attachment {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    color: white;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-connected { background: var(--success); }
.status-connecting { background: #e8a317; animation: pulse 1s infinite; }
.status-error { background: var(--warning); }

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

/* Subtle encryption badge */
.crypto-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--primary-lighter);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 0.02em;
}
