/* Lock.ai Custom Styles */

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --user-message-bg: #e8e8ff;
    --assistant-message-bg: #f8f9fa;
    --code-bg: #1e1e2e;
    --code-header-bg: #181825;
    --code-border: #313244;
    --code-text: #cdd6f4;
    --code-comment: #6c7086;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-page .card {
    border: none;
    border-radius: 16px;
}

.navbar-brand {
    font-weight: 600;
}

/* Chat Layout */
.chat-messages {
    overflow-y: auto;
    background: #f5f5f5;
}

.chat-input {
    background: white;
}

/* Messages */
.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.message-user {
    flex-direction: row-reverse;
    margin-left: auto;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-user .message-avatar {
    background: var(--primary-color);
    color: white;
}

.message-assistant .message-avatar {
    background: #e0e0e0;
    color: #666;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    max-width: 100%;
}

.message-user .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-assistant .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.assistant-text {
    line-height: 1.6;
}

/* Code Block - Claude Style */
.code-block {
    margin: 12px 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    max-width: 100%;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--code-header-bg);
    border-bottom: 1px solid var(--code-border);
}

.code-lang {
    font-size: 12px;
    font-weight: 500;
    color: var(--code-comment);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-actions {
    display: flex;
    gap: 8px;
}

.code-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--code-text);
    background: transparent;
    border: 1px solid var(--code-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-btn:hover {
    background: var(--code-border);
    border-color: #45475a;
}

.code-btn.copied {
    color: #a6e3a1;
    border-color: #a6e3a1;
}

.code-content {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--code-text);
    background: transparent;
}

.code-content code {
    font-family: inherit;
    background: transparent;
}

/* Scrollbar for code */
.code-content::-webkit-scrollbar {
    height: 6px;
}

.code-content::-webkit-scrollbar-track {
    background: var(--code-header-bg);
}

.code-content::-webkit-scrollbar-thumb {
    background: var(--code-border);
    border-radius: 3px;
}

/* Inline code in text */
.assistant-text code:not(.code-content code) {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

/* Typing Indicator */
.typing-dots {
    display: inline-flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Welcome Message */
.welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Sidebar */
.list-group-item {
    border: none;
    border-radius: 8px;
    margin-bottom: 4px;
}

.list-group-item.active {
    background-color: var(--primary-color);
}

/* Chat Header */
.chat-header {
    background: white;
}

/* Responsive */
@media (max-width: 768px) {
    .message {
        max-width: 95%;
    }

    .col-md-3 {
        display: none;
    }

    .code-block {
        margin: 8px -8px;
        border-radius: 8px;
    }
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Copy button feedback animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.code-btn.copied {
    animation: fadeIn 0.2s ease;
}