/* MacroFactor-inspired design for food analyzer */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* MacroFactor Color Scheme */
    --primary-blue: #4A90E2;
    --primary-dark: #2E5B8A;
    --primary-light: #6BA3E8;
    --accent-blue: #5A9BD4;
    --secondary-blue: #7BB3E8;
    
    /* Gradients inspired by MacroFactor */
    --primary-gradient: linear-gradient(135deg, #4A90E2 0%, #2E5B8A 100%);
    --accent-gradient: linear-gradient(135deg, #5A9BD4 0%, #4A90E2 100%);
    --success-gradient: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    --warning-gradient: linear-gradient(135deg, #F39C12 0%, #E67E22 100%);
    --danger-gradient: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    
    /* Background and surfaces */
    --light-bg: #ffffff;
    --card-bg: rgba(74, 144, 226, 0.02);
    --card-border: rgba(74, 144, 226, 0.08);
    
    /* Text colors */
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.75);
    --text-muted: rgba(26, 26, 26, 0.55);
    
    /* Shadows */
    --shadow-primary: 0 20px 40px rgba(74, 144, 226, 0.15);
    --shadow-hover: 0 30px 60px rgba(74, 144, 226, 0.25);
    
    /* Border radius */
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--light-bg);
    background-image: 
        url('https://images.unsplash.com/photo-1490645935967-10de6ba17061?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;
    background-blend-mode: overlay;
    color: var(--text-primary);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
}


/* Alternative background images for variety */
.bg-variant-1 {
    background-image: 
        url('https://images.unsplash.com/photo-1543339494-b4cd4f7ba686?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-2 {
    background-image: 
        url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-3 {
    background-image: 
        url('https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-4 {
    background-image: 
        url('https://images.unsplash.com/photo-1604152135912-04a022e23696?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-5 {
    background-image: 
        url('https://images.unsplash.com/photo-1547573854-74d2a71d0826?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-6 {
    background-image: 
        url('https://images.unsplash.com/photo-1565299624946-b28f40a0ca4b?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-7 {
    background-image: 
        url('https://images.unsplash.com/photo-1540189549336-e6e99c3679fe?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-8 {
    background-image: 
        url('https://images.unsplash.com/photo-1559181567-c3190ca9959b?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-9 {
    background-image: 
        url('https://images.unsplash.com/photo-1498837167922-ddd27525d352?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.bg-variant-10 {
    background-image: 
        url('https://images.unsplash.com/photo-1546069901-ba9599a7e63c?w=1920&q=80&auto=format&fit=crop'),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

/* Modern Upload Area */
.upload-area, .upload-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 60px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.upload-area::before, .upload-drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--border-radius-lg);
    z-index: -1;
}

.upload-area:hover, .upload-area.dragover,
.upload-drop-zone:hover, .upload-drop-zone.drag-over {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.upload-area:hover::before, .upload-area.dragover::before,
.upload-drop-zone:hover::before, .upload-drop-zone.drag-over::before {
    opacity: 0.05;
}

.upload-icon {
    font-size: 4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.3));
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Modern Buttons */
.btn {
    font-weight: 500;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(253, 187, 45, 0.3);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-outline-secondary {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Modern Cards */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 144, 226, 0.15);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--card-border);
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1.5rem;
    position: relative;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
}

.card-body {
    padding: 1.5rem;
}

/* Gradient Backgrounds */
.bg-success {
    background: var(--success-gradient) !important;
    color: white !important;
}

.bg-warning {
    background: var(--warning-gradient) !important;
    color: white !important;
}

.bg-danger {
    background: var(--danger-gradient) !important;
    color: white !important;
}

.bg-info {
    background: var(--primary-gradient) !important;
    color: white !important;
}

.bg-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
}

.bg-dark {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Modern Progress Bar */
.progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    background: var(--success-gradient);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Modern Badges */
.badge {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Text Colors */
.text-primary {
    color: var(--primary-blue) !important;
    font-weight: 600;
}

.text-success {
    color: #2ECC71 !important;
}

.text-warning {
    color: #F39C12 !important;
}

.text-danger {
    color: #E74C3C !important;
}

.text-info {
    color: var(--accent-blue) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Border Colors */
.border-success {
    border-color: rgba(46, 204, 113, 0.3) !important;
}

.border-warning {
    border-color: rgba(243, 156, 18, 0.3) !important;
}

.border-danger {
    border-color: rgba(231, 76, 60, 0.3) !important;
}

.border-info {
    border-color: rgba(74, 144, 226, 0.3) !important;
}

/* File Preview */
.file-preview, .preview-image {
    max-width: 200px;
    border-radius: 12px;
    border: 2px solid var(--card-border);
    margin: 15px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.preview-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    max-width: none;
}

.file-preview:hover, .preview-image:hover {
    transform: scale(1.05);
}

.file-info {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid var(--card-border);
}

/* Loading Animation */
.loading-spinner, .spinner-border, .spinner-border-sm {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid;
    border-top-color: transparent;
    background: var(--primary-gradient);
    animation: spin 1s linear infinite;
    position: relative;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: var(--primary-gradient);
    z-index: -1;
    filter: blur(8px);
}

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

/* Container and Layout */
.container {
    max-width: 1200px;
}

/* Form Controls */
.form-control {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 14px 18px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--card-bg);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Minimal Navigation */
.minimal-nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(74, 144, 226, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.minimal-brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.minimal-brand:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.alert-success {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
    border-left: 4px solid #4facfe;
}

.alert-warning {
    background: rgba(253, 187, 45, 0.1);
    color: #fdbb2d;
    border-left: 4px solid #fdbb2d;
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border-left: 4px solid #ff6b6b;
}

.alert-info {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-left: 4px solid #667eea;
}

/* List Groups */
.list-group-item {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.list-group-item.active {
    background: var(--primary-gradient);
    border-color: rgba(102, 126, 234, 0.5);
}

/* Stats Cards */
.stats-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

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

/* Footer */
footer {
    border-top: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

/* Portion selector styling */
.portion-selector {
    background: rgba(74, 144, 226, 0.1);
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}

.portion-selector label {
    font-weight: 600;
    color: #ffffff !important;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.portion-selector select {
    background-color: #2d3748 !important;
    border: 2px solid #4A90E2 !important;
    color: #ffffff !important;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.portion-selector select:focus {
    border-color: #63B3ED !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    outline: none;
}

.portion-selector select option {
    background-color: #2d3748;
    color: #ffffff;
    padding: 8px;
}

.portion-selector small {
    color: #a0aec0 !important;
    font-style: italic;
}

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

.success-pulse {
    animation: pulse 2s infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .upload-area, .upload-drop-zone {
        padding: 40px 20px;
        min-height: 200px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(74, 144, 226, 0.05);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gradient);
}

/* Minimal MacroFactor-style components */
.minimal-upload-zone {
    border: 2px dashed rgba(74, 144, 226, 0.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.1);
}

.minimal-upload-zone:hover {
    border-color: rgba(74, 144, 226, 0.5);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.15);
}

.minimal-preview {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 2px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.12);
    transition: all 0.3s ease;
}

.minimal-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(74, 144, 226, 0.18);
}

.preview-thumb {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.preview-thumb:hover {
    transform: scale(1.02);
}

.preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
}

.minimal-context {
    position: relative;
}

.minimal-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 144, 226, 0.15);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    resize: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.05);
}

.minimal-textarea:focus {
    outline: none;
    border-color: rgba(74, 144, 226, 0.4);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.1);
}

.minimal-textarea::placeholder {
    color: var(--text-muted);
}

.context-controls {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.voice-btn, .clear-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
}

.voice-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-blue);
}

.clear-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
}

.analyze-btn {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: 16px;
    padding: 1.25rem 2rem;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.25);
    position: relative;
    overflow: hidden;
}

.analyze-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.analyze-btn:hover:not(:disabled)::before {
    left: 100%;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(74, 144, 226, 0.35);
}

.analyze-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.15);
}

.analyze-btn.analyzing {
    background: var(--accent-gradient);
    animation: pulse 2s infinite;
}

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

/* Minimal results styling */
.minimal-results {
    margin-top: 2rem;
}

.calorie-display {
    text-align: center;
    padding: 2rem;
    background: rgba(74, 144, 226, 0.04);
    border-radius: 16px;
    border: 1px solid rgba(74, 144, 226, 0.1);
    margin-bottom: 1.5rem;
}

.calorie-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
}

.calorie-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.macro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.macro-item {
    text-align: center;
    padding: 1rem;
    background: rgba(74, 144, 226, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.08);
}

.macro-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.macro-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.25rem;
}

.food-items {
    background: rgba(74, 144, 226, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.08);
    padding: 1rem;
}

.food-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(74, 144, 226, 0.05);
}

.food-item:last-child {
    border-bottom: none;
}

.food-name {
    font-weight: 500;
    color: var(--text-primary);
}

.food-calories {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Hide complex elements for minimal design */
.confidence-section,
.weight-correction,
.detailed-breakdown {
    display: none;
}

/* Dark mode compatibility */
[data-bs-theme="dark"] .upload-drop-zone {
    background: var(--card-bg);
}

[data-bs-theme="dark"] .upload-drop-zone:hover {
    background: rgba(102, 126, 234, 0.1);
}

[data-bs-theme="dark"] .stats-card {
    background: var(--card-bg);
}

/* Feedback Voucher Incentive Styles */
.feedback-incentive {
    position: relative;
    color: var(--primary-blue) !important;
    font-weight: 600;
}

.feedback-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 5px;
    animation: pulse-glow 2s infinite;
}

.btn-voucher {
    background: linear-gradient(135deg, #4A90E2, #2E5B8A);
    border: none;
    color: white !important;
    position: relative;
    overflow: hidden;
    animation: voucher-shine 3s infinite;
}

.btn-voucher:hover {
    background: linear-gradient(135deg, #5A9BD4, #4A90E2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.voucher-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
    animation: pulse-glow 2s infinite;
}

.btn-voucher-results {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    border: none;
    color: white !important;
    position: relative;
}

.btn-voucher-results:hover {
    background: linear-gradient(135deg, #58D68D, #2ECC71);
    transform: translateY(-1px);
}

.voucher-mini {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    margin-right: 4px;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
}

@keyframes voucher-shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.btn-voucher::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-voucher:hover::before {
    left: 100%;
}

/* Feedback Popup Styles */
.feedback-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback-popup-overlay.show {
    opacity: 1;
}

.feedback-popup {
    background: white;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    margin: 20px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feedback-popup-overlay.show .feedback-popup {
    transform: scale(1);
}

.feedback-popup-header {
    background: linear-gradient(135deg, #4A90E2, #2E5B8A);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-popup-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.3rem;
}

.feedback-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.feedback-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.feedback-popup-body {
    padding: 30px 20px;
    text-align: center;
}

.voucher-highlight {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.voucher-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: voucher-shine 2s infinite;
}

.voucher-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.voucher-text {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.feedback-popup-body p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.feedback-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.btn-voucher-popup {
    background: linear-gradient(135deg, #4A90E2, #2E5B8A);
    border: none;
    color: white !important;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-voucher-popup:hover {
    background: linear-gradient(135deg, #5A9BD4, #4A90E2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.btn-later {
    background: transparent;
    border: 2px solid #ddd;
    color: #666;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-later:hover {
    border-color: #bbb;
    color: #444;
}

@media (max-width: 480px) {
    .feedback-popup {
        margin: 10px;
        max-width: none;
    }
    
    .feedback-popup-header {
        padding: 15px;
    }
    
    .feedback-popup-body {
        padding: 20px 15px;
    }
    
    .voucher-amount {
        font-size: 2rem;
    }
}

/* Credit Dashboard Styles */
.credit-dashboard {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.credit-card {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(46, 91, 138, 0.1));
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(74, 144, 226, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

.credit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

.credit-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.credit-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4A90E2;
    margin-bottom: 2px;
}

.credit-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credit-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-credit-feedback {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    border: none;
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.btn-credit-feedback:hover {
    background: linear-gradient(135deg, #58D68D, #2ECC71);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.btn-referral {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.btn-referral:hover {
    background: linear-gradient(135deg, #BB8FCE, #9B59B6);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.3);
}

.credit-earn-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 6px;
}

@media (max-width: 576px) {
    .credit-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-credit-feedback,
    .btn-referral {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .credit-amount {
        font-size: 1.5rem;
    }
    
    .credit-dashboard {
        padding: 15px;
    }
}

/* Credit Toast Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.referral-link-container {
    text-align: center;
}

.referral-link-container input {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #333;
    border-radius: 8px;
}

