/* Chat-specific styles */
.chat-container {
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    text-align: center;
    margin-bottom: 40px;
}

.chat-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-light);
}

.chat-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.chat-messages {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
    margin-bottom: 20px;
}

.chat-message {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    animation: fadeIn 0.3s ease-out;
}

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

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

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

.ai-message .message-avatar {
    background: rgba(255, 255, 255, 0.1);
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 18px;
    line-height: 1.6;
}

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

.ai-message .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-bottom-left-radius: 4px;
}

.message-content p {
    margin-bottom: 10px;
}

.message-content ul {
    margin-left: 20px;
    margin-top: 10px;
}

.message-content li {
    margin-bottom: 5px;
}

.chat-input-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 10px 15px;
    backdrop-filter: blur(10px);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    padding: 5px 10px;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.send-button {
    padding: 10px 20px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: var(--glow);
}

.send-button:active {
    transform: scale(0.95);
}

.chat-controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 5px;
}

.show-reasoning-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    user-select: none;
}

.show-reasoning-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.show-reasoning-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    justify-content: center;
}

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

.local-indicator {
    background: #38ef7d;
    box-shadow: 0 0 10px rgba(56, 239, 125, 0.5);
}

.checking-indicator {
    background: #ffd93d;
    box-shadow: 0 0 10px rgba(255, 217, 61, 0.5);
    animation: pulse 1.5s infinite;
}

.error-indicator {
    background: #f5576c;
    box-shadow: 0 0 10px rgba(245, 87, 108, 0.5);
}

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

.service-warning {
    background: rgba(245, 87, 108, 0.1);
    border: 2px solid #f5576c;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.warning-content h3 {
    color: #f5576c;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.warning-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    line-height: 1.6;
}

.warning-content ol {
    text-align: left;
    display: inline-block;
    color: rgba(255, 255, 255, 0.8);
    margin: 15px 0;
}

.warning-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #38ef7d;
}

.warning-content a {
    color: #667eea;
    text-decoration: none;
}

.warning-content a:hover {
    text-decoration: underline;
}

/* Reasoning display styles */
.message-reasoning {
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    font-size: 0.85rem;
}

.reasoning-header {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.reasoning-content {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    line-height: 1.5;
}

.reasoning-content p {
    margin: 4px 0;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: typing 1.4s infinite;
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
    .chat-header h1 {
        font-size: 2rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-messages {
        max-height: calc(100vh - 250px);
    }
}

