:root {
    /* Colors */
    --color-primary: #81C784;
    --color-primary-dark: #66BB6A;
    --color-secondary: #F48FB1;
    --color-secondary-dark: #F06292;
    --color-accent: #FFD54F;
    --color-complementary: #64B5F6;
    --color-text: #424242;
    --color-text-light: #757575;
    --color-bg: #FFFFFF;
    --color-bg-alt: #E8F5E9;
    --color-surface: #FFFFFF;
    --color-border: #E0E0E0;

    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    /* 8px */
    --spacing-sm: 1rem;
    /* 16px */
    --spacing-md: 1.5rem;
    /* 24px */
    --spacing-lg: 2rem;
    /* 32px */
    --spacing-xl: 3rem;
    /* 48px */
    --border-radius: 12px;
    --container-max-width: 600px;
    /* Focused view for quiz */

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('../images/fundo.jpeg') no-repeat center center fixed;
    background-size: cover;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

button {
    cursor: pointer;
    font-family: var(--font-heading);
    border: none;
    outline: none;
    transition: all 0.2s ease;
}

/* Container */
#app {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--spacing-md);
    background: transparent;
}

/* Card Component */
.card {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(129, 199, 132, 0.4);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(129, 199, 132, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(129, 199, 132, 0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

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

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(129, 199, 132, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(129, 199, 132, 0.4);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    width: 100%;
}

.btn-secondary:hover {
    background-color: var(--color-secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-text-light);
    color: var(--color-text-light);
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 50px;
}

.btn-outline:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

/* Badges */
.badge-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.badge {
    background-color: rgba(129, 199, 132, 0.1);
    color: var(--color-primary-dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Quiz Options */
.option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: white;
    border: 2px solid var(--color-border);
    padding: 16px;
    margin-bottom: 12px;
    border-radius: var(--border-radius);
    text-align: left;
    transition: all 0.2s ease;
}

.option-btn:hover {
    border-color: var(--color-primary);
    background-color: rgba(129, 199, 132, 0.05);
}

.option-btn.selected {
    border-color: var(--color-primary);
    background-color: rgba(129, 199, 132, 0.1);
}

.option-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.option-text {
    font-weight: 500;
    color: var(--color-text);
}

/* Progress Bar */
.progress-container {
    background-color: #eee;
    height: 8px;
    border-radius: 4px;
    margin-bottom: var(--spacing-lg);
    width: 100%;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--color-primary);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

/* Analysis Screen specific */
.analysis-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(129, 199, 132, 0.2);
    border-left-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Results */
.result-header {
    background-color: var(--color-bg-alt);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
}

.result-type {
    color: var(--color-primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.recommendations-list {
    text-align: left;
    margin: var(--spacing-md) 0;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.rec-icon {
    min-width: 24px;
    margin-right: 10px;
    color: var(--color-primary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.text-lg {
    font-size: 1.2rem;
}

.font-bold {
    font-weight: 700;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

/* Responsive */
@media (min-width: 768px) {
    #app {
        box-shadow: var(--shadow-lg);
        background: white;
        border-radius: 20px;
        margin-top: var(--spacing-xl);
        margin-bottom: var(--spacing-xl);
        min-height: auto;
    }

    body {
        align-items: flex-start;
        padding: 40px 0;
    }
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.image-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 24px 0 12px 0;
    text-align: left;
}

/* Nutritionist Card */
.nutritionist-card {
    background: #e3f2fd;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-top: 32px;
    text-align: center;
    border: 1px solid #bbdefb;
}

.nutritionist-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.nutritionist-text {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 24px;
    font-style: italic;
    line-height: 1.5;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}