:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --success-color: #28a745;
    --error-color: #dc3545;
    --text-color: #4a4a4a;
    --light-gray: #f5f7fa;
    --medium-gray: #e0e0e0;
    --dark-gray: #666;
    --whatsapp-green: #25D366;
    --whatsapp-dark-green: #128C7E;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--light-gray) 0%, #c3cfe2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    line-height: 1.6;
}

.quiz-container {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 10;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.progress-container {
    background-color: var(--medium-gray);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.4s ease;
}

.quiz-step {
    display: none;
    animation-duration: 0.5s;
}

.quiz-step.active {
    display: block;
    animation-name: fadeIn;
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
}

input,
select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

input:focus,
select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 117, 252, 0.2);
}

.btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #fff;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.message {
    margin-top: 1.5rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.success {
    background-color: #e6f7ee;
    color: var(--success-color);
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #fdecea;
    color: var(--error-color);
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none !important;
}

.product-card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    border-radius: 10px;
}

/* Estilos da introdução */
#intro-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: opacity 0.5s ease;
}

#intro-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.intro-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

.intro-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #9d4edd, #7b2cbf, #6b1cba);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(202, 178, 255, 0.5), 0 0 10px rgba(202, 178, 255, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.intro-title:hover {
    -webkit-text-fill-color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.intro-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.intro-button {
    position: relative;
    z-index: 10;
    padding: 15px 30px;
    font-size: 1.2rem;
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.intro-button:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Estilos para a recomendação */
.recommendation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
    animation: fadeIn 0.8s ease;
}

.user-profile {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.user-profile p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.product-image {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 15px auto;
}

.product-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

.product-benefits {
    margin: 15px 0;
}

.product-benefits ul {
    padding-left: 20px;
}

.product-benefits li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.price-tag {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--whatsapp-green);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background: var(--whatsapp-dark-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.whatsapp-link img {
    width: 20px;
    height: 20px;
}

.text-muted {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
}

.mercado-livre-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #FFE600 0%, #FFD500 100%);
    color: #2D3277;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mercado-livre-btn:hover {
    background: linear-gradient(135deg, #FFD500 0%, #FFE600 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ml-logo {
    height: 24px;
    width: auto;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.coupon-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FFE600 0%, #FFD500 100%);
    color: #2D3277;
    border-radius: 20px;
    font-weight: bold;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 214, 0, 0.3);
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsividade */
@media (max-width: 768px) {
    .quiz-container {
        padding: 1.5rem;
        margin: 15px;
    }
    
    .intro-title {
        font-size: 2rem;
    }
    
    .intro-subtitle {
        font-size: 1.2rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    .quiz-container {
        padding: 1rem;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .intro-title {
        font-size: 1.8rem;
    }
    
    .intro-subtitle {
        font-size: 1rem;
    }
    
    .intro-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    input, select {
        padding: 0.7rem;
    }
}