/* Quiz Modal Styles */
.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

/* Botão Calcule seu IMC com destaque dourado */
[data-quiz-trigger] {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: var(--white);
    border: 2px solid #D4AF37;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

[data-quiz-trigger]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #B8941F 0%, #9C7A19 100%);
}

[data-quiz-trigger]::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.6s;
}

[data-quiz-trigger]:hover::before {
    left: 100%;
}

/* Adicionar animação de pulso para chamar atenção */
@keyframes pulseGold {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    }
    50% { 
        box-shadow: 0 12px 40px rgba(212, 175, 55, 0.6);
    }
}

[data-quiz-trigger].header-cta {
    animation: pulseGold 3s infinite;
}

.quiz-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.quiz-container {
    background: var(--white);
    border-radius: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    position: relative;
}

.quiz-header {
    background: var(--primary-gradient);
    padding: 30px;
    border-radius: 30px 30px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.quiz-progress {
    background: rgba(255, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.quiz-progress-bar {
    background: var(--accent-gold);
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 33.33%;
}

.quiz-title {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-align: center;
}

.quiz-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    text-align: center;
}

.quiz-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 20; /* Garantir que fique acima do header */
}

.quiz-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.quiz-body {
    padding: 40px;
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.form-label .required {
    color: #ef4444;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: var(--white);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.form-error.show {
    display: block;
}

.form-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.form-radio-item {
    flex: 1;
}

.form-radio-label {
    display: block;
    padding: 20px;
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.form-radio-label:hover {
    border-color: var(--accent-gold);
    background: var(--white);
}

.form-radio-input {
    position: absolute;
    opacity: 0;
}

.form-radio-input:checked + .form-radio-label {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-color: var(--accent-gold);
}

.form-radio-icon {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-radio-text {
    font-weight: 600;
    color: var(--text-dark);
}

.form-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: var(--white);
}

.quiz-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.quiz-btn {
    flex: 1;
    padding: 18px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-btn-back {
    background: transparent;
    color: var(--text-light);
    border: 2px solid #e0e0e0;
}

.quiz-btn-back:hover {
    background: #f5f5f5;
}

.quiz-btn-next {
    background: var(--primary-gradient);
    color: var(--white);
}

.quiz-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 35, 50, 0.3);
}

.quiz-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Section */
.quiz-results {
    display: none;
    animation: fadeIn 0.5s ease;
}

.quiz-results.active {
    display: block;
}

.result-card {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
}

.result-main {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.imc-value {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.imc-classification {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.imc-classification.normal {
    color: #10b981;
}

.imc-classification.sobrepeso {
    color: #f59e0b;
}

.imc-classification.obesidade {
    color: #ef4444;
}

.imc-classification.baixo {
    color: #3b82f6;
}

.imc-bar {
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, 
        #3b82f6 0%, 
        #10b981 25%, 
        #f59e0b 50%, 
        #ef4444 75%);
    border-radius: 20px;
    position: relative;
    margin: 30px 0;
}

.imc-indicator {
    position: absolute;
    top: -10px;
    width: 4px;
    height: 60px;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: left 0.5s ease;
}

.imc-indicator::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.result-item {
    text-align: center;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.result-unit {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
}

.result-message {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-left: 4px solid var(--accent-gold);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.result-message h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.result-message p {
    color: var(--text-light);
    line-height: 1.6;
}

.result-cta {
    background: var(--primary-gradient);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: var(--white);
}

.result-cta h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.result-cta p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.result-cta-btn {
    background: var(--white);
    color: var(--primary-blue);
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    background: var(--accent-gold);
    color: var(--white);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quiz-container {
        width: 95%;
        max-height: 100vh;
        border-radius: 20px;
    }
    
    .quiz-header {
        padding: 25px 20px;
    }
    
    .quiz-body {
        padding: 30px 20px;
    }
    
    .form-radio-group {
        flex-direction: column;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .imc-value {
        font-size: 3rem;
    }
    
    .quiz-actions {
        flex-direction: column-reverse;
    }
    
    .quiz-btn {
        width: 100%;
    }
}