:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

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

.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.navbar-brand img {
    border-radius: 50%;
}

.upload-dropzone {
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-dropzone:hover {
    background-color: #e7f3ff;
    border-color: #0056b3;
}

.upload-dropzone.dragover {
    background-color: #e7f3ff;
    border-color: #0056b3;
    transform: scale(1.02);
}

.feature-icon {
    font-size: 1.5rem;
}

.step-number {
    font-size: 1.2rem;
    font-weight: bold;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.chat-message {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: slideInMessage 0.3s ease-out forwards;
}

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

.message-bubble {
    max-width: 100%;
    word-wrap: break-word;
    position: relative;
    transition: all 0.2s ease;
}

.message-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
    color: white;
    border: none !important;
}

.bot-message .message-bubble {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    color: #495057;
}

.avatar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bot-message .avatar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
}

.user-message .avatar {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #495057 100%) !important;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
}

.typing-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    animation: typing 1.4s infinite ease-in-out;
}

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

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

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.4;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.file-icon {
    font-size: 1.2rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .message-content {
        max-width: 85% !important;
    }
    
    .avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
    
    .avatar i {
        font-size: 1rem !important;
    }
    
    .message-bubble {
        padding: 0.75rem !important;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    #chat-container {
        height: 400px !important;
        padding: 1rem !important;
    }
    
    .chat-message {
        margin-bottom: 1rem;
    }
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom scrollbar for chat */
#chat-container {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

#chat-container::-webkit-scrollbar {
    width: 8px;
}

#chat-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

#chat-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c1c1c1 0%, #a8a8a8 100%);
    border-radius: 4px;
}

#chat-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a8a8a8 0%, #888888 100%);
}

/* File upload styling */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #e7f3ff;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #e7f3ff;
    transform: scale(1.02);
}

/* Success states */
.upload-success {
    border-color: var(--success-color);
    background-color: #d4edda;
}

/* Error states */
.upload-error {
    border-color: var(--danger-color);
    background-color: #f8d7da;
}

/* Animation for page transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Quiz Section Styles */
.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.quiz-preview {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.quiz-features .fas {
    font-size: 1.1rem;
}

.quiz-question {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.quiz-options .form-check-label {
    cursor: pointer;
    padding: 0.5rem 0;
}

.quiz-options .form-check-input:checked + .form-check-label {
    font-weight: bold;
    color: var(--success-color);
}

/* Chat input styling */
#chat-input {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

#chat-input:focus {
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-1px);
}

#send-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#send-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#send-btn:active {
    transform: translateY(0);
}

/* Chat container enhancements */
#chat-container {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0;
}

.chat .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
    border-radius: 0.375rem 0.375rem 0 0 !important;
}

/* Enhance chat card styling */
.chat .card {
    border: none;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.75rem;
    overflow: hidden;
}
