/* Custom styles for KOJIE AI Software Engineering Platform */

:root {
    --kojie-primary: #0dcaf0;
    --kojie-secondary: #6c757d;
    --kojie-success: #198754;
    --kojie-warning: #ffc107;
    --kojie-danger: #dc3545;
    --kojie-dark: #212529;
}

/* Fix potential layout issues */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.container, .container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Ensure navbar stays at top */
.navbar {
    position: relative !important;
    top: auto !important;
    z-index: 1030;
}

/* Fix dropdown positioning */
.navbar .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--kojie-dark) 0%, #2c3e50 100%);
    min-height: 80vh;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Cards and Shadows */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

/* Feature Icons */
.feature-icon img {
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.feature-icon:hover img {
    transform: scale(1.05);
}

/* Technology Stack Icons */
.tech-item i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.tech-item:hover i {
    transform: translateY(-5px);
    color: var(--kojie-primary) !important;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--kojie-primary) !important;
}

/* Buttons */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Code Editor Styles */
.CodeMirror {
    height: 100%;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
}

.CodeMirror-scroll {
    max-height: 500px;
}

/* Chat Messages */
.message {
    animation: fadeInUp 0.3s ease;
}

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

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--kojie-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* File Explorer */
.list-group-item {
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background-color: var(--bs-light) !important;
}

/* Error Pages */
.error-page i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Dashboard Stats Cards */
.card-body i {
    transition: transform 0.3s ease;
}

.card:hover .card-body i {
    transform: scale(1.1);
}

/* Modal Enhancements */
.modal-content {
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

/* Progress Indicators */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .display-5 {
        font-size: 2.5rem;
    }
}

/* Dark Theme Enhancements */
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-gray-800) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--bs-gray-400) !important;
}

[data-bs-theme="dark"] .border {
    border-color: var(--bs-gray-700) !important;
}

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

::-webkit-scrollbar-track {
    background: var(--bs-gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Utility Classes */
.border-radius-lg {
    border-radius: 1rem !important;
}

.shadow-lg-soft {
    box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03) !important;
}

.text-gradient {
    background: linear-gradient(45deg, var(--kojie-primary), #6f42c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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