/* CSS Variables */
:root {
    --primary-color: #2c9263;
    --secondary-color: rgb(4, 87, 55);
    --white: #ffffff;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family-primary);
    background: linear-gradient(135deg, #14b93e 0%, #13be7d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--gray-800);
    overflow-x: hidden;
}

.quiz-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
}

.quiz-content {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 30px 25px 25px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    margin-top: 30px;
    min-height: auto;
    color: var(--gray-900);
}

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

.quiz-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1.2;
    padding: 0 20px;
}

.quiz-description {
    font-size: 1rem;
    color: var(--gray-700);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
    padding: 0 20px;
}

/* Progress Container - círculos numerados */
.progress-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.progress-step.active,
.progress-step.completed {
    background: var(--primary-color);
    color: var(--white);
}

.progress-step.pending {
    background: var(--gray-200);
    color: var(--gray-500);
}

.progress-line {
    height: 2px;
    width: 30px;
    background: var(--gray-200);
    transition: background 0.15s ease;
}

.progress-line.active {
    background: var(--primary-color);
}

/* Question Container */
.question-container {
    display: none;
    animation: quizSlideIn 0.1s ease-out;
}

.question-container.active {
    display: block;
}

.question-number {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-align: center;
}

.question-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.4;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 16px;
    padding: 18px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
    width: 100%;
}

.option-button:hover,
.option-button.selected {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.option-button.selected {
    animation: quizSelectedPulse 0.15s ease-out;
}

/* Quiz Actions */
.quiz-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.quiz-button {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quiz-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-next {
    background: var(--primary-color);
    color: var(--white);
}

.button-next:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.button-prev {
    background: var(--gray-200);
    color: var(--gray-700);
}

.button-prev:hover:not(:disabled) {
    background: var(--gray-400);
}

/* Results */
.result-container {
    display: none;
    animation: quizSlideIn 0.15s ease-out;
    text-align: center;
}

.result-container.active {
    display: block;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.results-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.results-text {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 25px;
    line-height: 1.6;
}

.results-cta {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 16px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
}

.results-cta:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.results-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Styles */
.quiz-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 18px;
}

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

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    font-size: 1rem;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    background: var(--white);
    color: var(--gray-900);
    font-family: var(--font-family-primary);
}

.form-control:focus {
    outline: none;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 49, 197, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

.form-control:invalid {
    border-color: #ef4444;
}

.form-control:invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

@keyframes quizSelectedPulse {
    0% { transform: scale(1) translateY(-2px); }
    50% { transform: scale(1.05) translateY(-2px); }
    100% { transform: scale(1) translateY(-2px); }
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .quiz-container {
        padding: 10px;
    }

    .quiz-content {
        padding: 25px 20px 20px 20px;
        margin-top: 20px;
    }

    .quiz-title {
        font-size: 1.5rem;
    }

    .question-title {
        font-size: 1.1rem;
    }

    .option-button {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    .quiz-button {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}

