/*
Educational Tutor Bot Stylesheet
Author: RSK World (https://rskworld.in)
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Contact: info@rskworld.com, +91 93305 39277
Year: 2026
*/

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --rsk-blue: #0066cc;
    --rsk-green: #28a745;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Header Styles */
header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Chat Messages Container */
.chat-messages {
    border-radius: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease-in;
}

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

.user-message {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    color: var(--dark-color);
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message .time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    font-weight: 600;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0aa2c0);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #157347);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Progress Styles */
.progress-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--rsk-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.progress-bar {
    background: linear-gradient(90deg, var(--rsk-blue), var(--rsk-green));
    border-radius: 10px;
}

/* History Styles */
.history-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--info-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.history-question {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.history-answer {
    color: var(--dark-color);
    margin-bottom: 8px;
}

.history-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    border-top: 1px solid #eee;
    padding-top: 8px;
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer h6 {
    color: var(--rsk-blue);
    font-weight: 600;
}

/* Loading Spinner */
.typing-indicator {
    display: inline-block;
    padding: 10px 15px;
    background: white;
    border-radius: 18px;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.4rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    footer .text-md-end {
        text-align: left !important;
        margin-top: 15px;
    }
}

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

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* RSK World Branding */
.rsk-brand {
    color: var(--rsk-blue);
    font-weight: 600;
}

.rsk-footer {
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
}

/* Feature Icons */
.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rsk-blue), var(--rsk-green));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.2rem;
}
