* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 30px 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.chat-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding: 20px;
    margin-bottom: 30px;
    height: 500px;
    display: flex;
    flex-direction: column;
}

#chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    border-radius: 10px;
    background: #f8f9fa;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.message.user {
    background: #4a6fa5;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.message.bot {
    background: #e9ecef;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.message.reasoning {
    background: #fff3cd;
    color: #856404;
    align-self: flex-start;
    border-bottom-left-radius: 0;
    font-size: 0.9rem;
}

.input-area {
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: #4a6fa5;
}

#send-btn {
    padding: 15px 25px;
    background: #4a6fa5;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s;
}

#send-btn:hover {
    background: #3a5a80;
}

.reasoning-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding: 20px;
    height: 200px;
    overflow-y: auto;
}

.reasoning-container h3 {
    margin-bottom: 15px;
    color: #4a6fa5;
}

#reasoning-output {
    font-family: monospace;
    white-space: pre-wrap;
    line-height: 1.5;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .input-area {
        flex-direction: column;
    }
    
    #send-btn {
        width: 100%;
    }
}