/* Custom CSS for ArtFundi */

:root {
    /* Calm, Professional, Peaceful Color Palette */
    --primary-color: #7c9885;           /* Muted sage green */
    --secondary-color: #a8b5a0;        /* Soft olive green */
    --accent-color: #c9a96e;            /* Warm gold */
    --success-color: #8a9a5b;          /* Natural green */
    --warning-color: #d4a574;            /* Soft terracotta */
    --danger-color: #b5654c;           /* Muted red-brown */
    --dark-color: #3a3a38;             /* Deep charcoal */
    --light-color: #fafaf8;             /* Warm white */
    --neutral-light: #f5f5f3;          /* Soft beige */
    --neutral-medium: #d1d1cd;         /* Gentle gray */
    --neutral-dark: #8a8a86;         /* Muted gray */
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Monaco', 'Consolas', monospace;
    
    /* Spacing & Sizing */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --box-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
    --box-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f8faf8 0%, #e8ebe6 50%, #dde0d9 100%);
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Header Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 152, 133, 0.15);
    box-shadow: var(--box-shadow-sm);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color) !important;
    letter-spacing: -0.02em;
}

.navbar-brand i {
    margin-right: 0.75rem;
    color: var(--accent-color);
}

.navbar-nav .nav-link {
    color: var(--neutral-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(124, 152, 133, 0.08);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(124, 152, 133, 0.12);
}

/* Hero Section */
.hero-section {
    background: transparent;
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(124, 152, 133, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(200, 169, 110, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-section h1.display-4 {
    color: var(--dark-color) !important;
    font-weight: 300 !important;
    font-size: 3.2rem !important;
    line-height: 1.3 !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 1.5rem !important;
    text-shadow: none !important;
    font-family: var(--font-primary);
}

.hero-section .lead {
    color: var(--neutral-dark) !important;
    font-weight: 400 !important;
    font-size: 1.2rem !important;
    line-height: 1.7 !important;
    margin-bottom: 2rem !important;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: none !important;
    opacity: 0.9;
    letter-spacing: -0.01em;
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(124, 152, 133, 0.2);
    box-shadow: var(--box-shadow-sm);
    margin-top: 2rem;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.upload-area {
    border: 2px dashed rgba(124, 152, 133, 0.3);
    border-radius: var(--border-radius);
    padding: 4rem 3rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(245, 245, 243, 0.6);
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(124, 152, 133, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(124, 152, 133, 0.15);
}

.upload-area h3 {
    color: var(--dark-color) !important;
    font-weight: 500 !important;
    font-size: 1.75rem !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.01em !important;
}

.upload-area p {
    color: var(--neutral-dark) !important;
    font-weight: 400 !important;
    font-size: 1rem !important;
    opacity: 0.9 !important;
}

/* Image Preview */
.image-preview {
    position: relative;
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.image-preview img {
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--border-radius);
}

/* Fundamental Cards */
/* Fundamental Cards */
.fundamental-card {
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-sm);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.fundamental-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
    border-color: rgba(124, 152, 133, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.fundamental-card.selected {
    border-color: var(--primary-color);
    background: rgba(124, 152, 133, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 152, 133, 0.2);
}

.fundamental-card.selected::before {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fundamental-card .card-body {
    padding: 2rem;
    text-align: center;
}

.fundamental-card .display-4 {
    color: var(--primary-color) !important;
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
    opacity: 0.9;
}

.fundamental-card .card-title {
    color: var(--dark-color);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.fundamental-card .card-text {
    color: var(--neutral-dark);
    font-weight: 400;
    opacity: 0.85;
    line-height: 1.5;
}

.fundamental-card .card-body {
    padding: 1.5rem;
}

.fundamental-card .display-4 {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    text-transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 16px rgba(124, 152, 133, 0.3);
}

.btn-primary:hover {
    background: #6b8474;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 152, 133, 0.4);
}

.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 16px rgba(138, 154, 91, 0.3);
}

.btn-success:hover {
    background: #768a50;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    border-radius: var(--border-radius);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-danger {
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Results Section */
#results-section {
    background: white;
    margin-top: 2rem;
}

.analysis-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.analysis-item {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.tips-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
}

.tips-section h6 {
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.tips-section ul li {
    padding: 0.25rem 0;
    color: #374151;
}

.tips-section i {
    color: var(--primary-color);
}

/* Feature Icons */
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(124, 152, 133, 0.2);
    transition: var(--transition);
}

.feature-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 152, 133, 0.25);
}

.feature-icon i {
    color: white;
    font-size: 1.75rem;
}

/* Form Elements */
.form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--dark-color) !important;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .upload-section {
        margin: 1rem;
    }
    
    .fundamental-card {
        margin-bottom: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .upload-section .card-body {
        padding: 2rem 1rem;
    }
    
    .fundamental-card .card-body {
        padding: 1rem;
    }
    
    .analysis-item {
        padding: 1rem;
    }
}

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

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

/* 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 #e5e7eb;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
button:focus,
input:focus,
.fundamental-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}