:root {
    --flc-purple: #6C2BD9;
    --flc-purple-light: #8A4FE9;
    --flc-purple-dark: #4A1A9E;
    --flc-white: #FFFFFF;
    --flc-gray-50: #F9FAFB;
    --flc-gray-100: #F3F4F6;
    --flc-gray-200: #E5E7EB;
    --flc-gray-300: #D1D5DB;
    --flc-gray-400: #9CA3AF;
    --flc-gray-500: #6B7280;
    --flc-gray-600: #4B5563;
    --flc-gray-700: #374151;
    --flc-gray-800: #1F2937;
    --flc-success: #10B981;
    --flc-warning: #F59E0B;
    --flc-danger: #EF4444;
    --flc-info: #3B82F6;
}

/* Container Styles */
.flc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--flc-white);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

/* Header Styles */
.flc-header {
    text-align: center;
    margin-bottom: 40px;
}

.flc-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--flc-purple) 0%, var(--flc-purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.flc-header p {
    color: var(--flc-gray-500);
    font-size: 1.1rem;
}

/* Input Section */
.flc-input-section {
    background: var(--flc-gray-50);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.flc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .flc-form-row {
        grid-template-columns: 1fr;
    }
}

.flc-form-group {
    margin-bottom: 20px;
}

.flc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--flc-gray-700);
}

.flc-form-group .required {
    color: var(--flc-danger);
    margin-left: 4px;
}

.flc-form-group input,
.flc-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--flc-gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--flc-white);
}

.flc-form-group input:focus,
.flc-form-group select:focus {
    outline: none;
    border-color: var(--flc-purple);
    box-shadow: 0 0 0 4px rgba(108, 43, 217, 0.1);
}

.flc-form-group input.error,
.flc-form-group select.error {
    border-color: var(--flc-danger);
}

/* Button Styles */
.flc-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.flc-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flc-btn-primary {
    background: linear-gradient(135deg, var(--flc-purple) 0%, var(--flc-purple-light) 100%);
    color: white;
    flex: 2;
}

.flc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 43, 217, 0.2);
}

.flc-btn-secondary {
    background: var(--flc-white);
    color: var(--flc-gray-700);
    border: 2px solid var(--flc-gray-200);
    flex: 1;
}

.flc-btn-secondary:hover {
    background: var(--flc-gray-100);
    border-color: var(--flc-gray-300);
}

/* Results Section */
.flc-results-section {
    background: var(--flc-white);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.flc-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.flc-results-header h3 {
    font-size: 1.8rem;
    color: var(--flc-gray-800);
    margin-bottom: 10px;
}

/* Circular Progress */
.flc-score-circle {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.flc-circular-progress {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--flc-purple) 0deg, var(--flc-gray-200) 0deg);
    position: relative;
    transition: background 2s ease;
}

.flc-circular-progress::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--flc-white);
}

.flc-progress-value {
    position: relative;
    font-size: 3rem;
    font-weight: 700;
    color: var(--flc-purple);
    z-index: 1;
}

/* Results Grid */
.flc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.flc-result-card {
    background: var(--flc-gray-50);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--flc-gray-200);
}

.flc-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(108, 43, 217, 0.1);
    border-color: var(--flc-purple-light);
}

.flc-result-card h4 {
    color: var(--flc-gray-600);
    font-size: 1rem;
    margin-bottom: 10px;
}

.flc-result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--flc-gray-800);
    margin-bottom: 5px;
}

.flc-result-category {
    color: var(--flc-gray-500);
    font-size: 0.9rem;
}

.flc-result-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.badge-excellent {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.badge-good {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
}

.badge-average {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.badge-poor {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: white;
}

.badge-very-poor {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
}

/* Recommendations Section */
.flc-recommendations,
.flc-weekly-target,
.flc-calorie-suggestion,
.flc-tips-section,
.flc-compare-section {
    background: var(--flc-gray-50);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.flc-recommendations h4,
.flc-weekly-target h4,
.flc-calorie-suggestion h4,
.flc-tips-section h4,
.flc-compare-section h4 {
    color: var(--flc-gray-800);
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--flc-gray-200);
}

.flc-recommendations-list,
.flc-tips-list {
    list-style: none;
    padding: 0;
}

.flc-recommendations-list li,
.flc-tips-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--flc-gray-600);
}

.flc-recommendations-list li:before,
.flc-tips-list li:before {
    content: '✓';
    color: var(--flc-purple);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Action Buttons */
.flc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--flc-gray-200);
}

.flc-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.flc-share-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.flc-share-btn.facebook {
    background: #1877f2;
}

.flc-share-btn.twitter {
    background: #1da1f2;
}

.flc-share-btn.whatsapp {
    background: #25d366;
}

.flc-share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(110%);
}

/* Dark Mode */
.flc-container.flc-dark-mode {
    background: var(--flc-gray-800);
    color: var(--flc-white);
}

.flc-container.flc-dark-mode .flc-input-section {
    background: var(--flc-gray-700);
}

.flc-container.flc-dark-mode .flc-form-group label {
    color: var(--flc-gray-200);
}

.flc-container.flc-dark-mode .flc-form-group input,
.flc-container.flc-dark-mode .flc-form-group select {
    background: var(--flc-gray-600);
    border-color: var(--flc-gray-500);
    color: var(--flc-white);
}

.flc-container.flc-dark-mode .flc-result-card {
    background: var(--flc-gray-700);
    border-color: var(--flc-gray-600);
}

.flc-container.flc-dark-mode .flc-result-value {
    color: var(--flc-white);
}

.flc-container.flc-dark-mode .flc-recommendations,
.flc-container.flc-dark-mode .flc-weekly-target,
.flc-container.flc-dark-mode .flc-calorie-suggestion,
.flc-container.flc-dark-mode .flc-tips-section,
.flc-container.flc-dark-mode .flc-compare-section {
    background: var(--flc-gray-700);
}

.flc-container.flc-dark-mode .flc-recommendations h4,
.flc-container.flc-dark-mode .flc-weekly-target h4,
.flc-container.flc-dark-mode .flc-calorie-suggestion h4,
.flc-container.flc-dark-mode .flc-tips-section h4,
.flc-container.flc-dark-mode .flc-compare-section h4 {
    color: var(--flc-white);
    border-bottom-color: var(--flc-gray-600);
}

/* Responsive Design */
@media (max-width: 640px) {
    .flc-header h2 {
        font-size: 2rem;
    }
    
    .flc-form-actions {
        flex-direction: column;
    }
    
    .flc-results-grid {
        grid-template-columns: 1fr;
    }
    
    .flc-actions {
        flex-direction: column;
    }
    
    .flc-share-buttons {
        justify-content: center;
    }
    
    .flc-circular-progress {
        width: 140px;
        height: 140px;
    }
    
    .flc-circular-progress::before {
        width: 120px;
        height: 120px;
    }
    
    .flc-progress-value {
        font-size: 2.5rem;
    }
}

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

.flc-result-card {
    animation: fadeIn 0.5s ease forwards;
}

.flc-result-card:nth-child(1) { animation-delay: 0.1s; }
.flc-result-card:nth-child(2) { animation-delay: 0.2s; }
.flc-result-card:nth-child(3) { animation-delay: 0.3s; }
.flc-result-card:nth-child(4) { animation-delay: 0.4s; }

/* Schema Markup */
.flc-schema {
    display: none;
}

/* Loading State */
.flc-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.flc-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--flc-gray-200);
    border-top-color: var(--flc-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tooltip Styles */
.flc-tooltip {
    position: relative;
    display: inline-block;
}

.flc-tooltip .flc-tooltip-text {
    visibility: hidden;
    width: 200px;
    background: var(--flc-gray-800);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.flc-tooltip:hover .flc-tooltip-text {
    visibility: visible;
    opacity: 1;
}