/* Custom CSS for AI Design Analysis Project */

/* Global Styles */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(45deg, #667eea, #764ba2);
    --gradient-success: linear-gradient(45deg, #28a745, #20c997);
    --gradient-danger: linear-gradient(45deg, #dc3545, #fd7e14);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-color);
    line-height: 1.6;
    color: var(--dark-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 12px 24px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
}

.btn-danger {
    background: var(--gradient-danger);
    border: none;
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a42a0);
    color: white;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 20px;
}

.card-body {
    padding: 25px;
}

/* Navigation */
.navbar {
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 10px 15px !important;
    border-radius: 8px;
    margin: 0 5px;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: var(--transition);
    font-size: 16px;
}

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

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* File Upload */
.file-upload-area {
    border: 3px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: white;
}

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

.file-upload-area.dragover {
    border-color: var(--success-color);
    background: #f0fff4;
}

.file-upload-icon {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 15px;
    transition: var(--transition);
}

.file-upload-area:hover .file-upload-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

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

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-left-color: var(--info-color);
    color: #0c5460;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Tables */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 15px;
}

.table td {
    border: none;
    border-bottom: 1px solid #dee2e6;
    padding: 15px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8f9ff;
}

/* Badges */
.badge {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Image Preview */
.image-preview {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.image-preview:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Pagination */
.pagination .page-link {
    border: none;
    border-radius: 8px;
    margin: 0 2px;
    padding: 10px 15px;
    color: var(--primary-color);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border: none;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: var(--transition);
    border-radius: 8px;
    margin: 2px 10px;
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border: none;
    padding: 20px;
}

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 10px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1a1a1a;
        --dark-color: #ffffff;
    }
    
    body {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .card {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .table {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .table th {
        background: #3d3d3d;
        color: #ffffff;
    }
    
    .form-control, .form-select {
        background: #2d2d2d;
        border-color: #4d4d4d;
        color: #ffffff;
    }
    
    .dropdown-menu {
        background: #2d2d2d;
        border-color: #4d4d4d;
    }
    
    .dropdown-item {
        color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .pagination, .dropdown {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Utility Classes */
.shadow-custom {
    box-shadow: var(--shadow-md);
}

.shadow-custom-lg {
    box-shadow: var(--shadow-lg);
}

.border-radius-custom {
    border-radius: var(--border-radius);
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.bg-gradient-danger {
    background: var(--gradient-danger);
}

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

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-3px);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a42a0);
}