/**
 * Quiz System Frontend Styles
 * Based on the original design with modern enhancements
 */

.quiz-system-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

.quiz-title {
    font-size: 28px;
    font-weight: 900;
    color: #22c55e;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.quiz-subtitle {
    font-size: 18px;
    color: #374151;
    margin: 0;
    line-height: 1.4;
}

/* Progress Bar */
.quiz-progress-container {
    margin: 30px 0;
}

.quiz-progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.quiz-progress-step {
    position: relative;
}

.quiz-progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.3s ease;
}

.quiz-progress-step.active .quiz-progress-circle {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    transform: scale(1.1);
}

/* Quiz Content */
.quiz-content {
    margin-bottom: 30px;
}

.quiz-card {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: relative;
    min-height: 300px;
}

.question-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin: 0 0 30px 0;
    line-height: 1.4;
}

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

.quiz-option-button {
    width: 100%;
    padding: 16px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quiz-option-button:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.quiz-option-button.selected {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    color: white;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
    transform: translateY(-2px);
}

/* User Data Form */
.quiz-user-data {
    text-align: center;
}

.form-field {
    margin-bottom: 20px;
    text-align: left;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-field input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 25px 0;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #22c55e;
}

.quiz-submit-hint {
    text-align: center;
    margin: 20px 0;
}

.submit-arrow {
    font-size: 24px;
    color: #22c55e;
    margin-bottom: 8px;
}

.quiz-submit-hint p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.quiz-submit-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.quiz-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.quiz-legal-text {
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    margin-top: 15px;
    line-height: 1.4;
}

.quiz-legal-text a {
    color: #22c55e;
    text-decoration: underline;
}

.quiz-legal-text a:hover {
    text-decoration: none;
}

/* Loading State */
.quiz-loading {
    text-align: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Success State */
.quiz-success {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin: 0 auto 20px;
    font-weight: bold;
}

.quiz-success h3 {
    color: #22c55e;
    font-size: 24px;
    margin: 0 0 10px 0;
}

.quiz-success p {
    color: #6b7280;
    margin: 0;
}

/* Counter */
.quiz-counter {
    text-align: center;
    margin: 20px 0;
}

.quiz-counter p {
    font-size: 14px;
    color: #22c55e;
    font-weight: 500;
    margin: 0;
}

.counter-number {
    font-weight: 700;
}

/* Footer */
.quiz-footer {
    text-align: center;
    margin-top: 30px;
}

.quiz-footer p {
    font-size: 11px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Google Ads Container */
.quiz-ads-container {
    margin: 30px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
    text-align: center;
}

.quiz-ads-container:empty::before {
    content: "Espaço para Anúncios";
    color: #9ca3af;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-system-container {
        padding: 15px;
    }
    
    .quiz-card {
        padding: 30px 20px;
    }
    
    .quiz-title {
        font-size: 24px;
    }
    
    .quiz-subtitle {
        font-size: 16px;
    }
    
    .question-title {
        font-size: 18px;
    }
    
    .quiz-option-button {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .quiz-progress-circle {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .quiz-progress-bar {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .quiz-system-container {
        padding: 10px;
    }
    
    .quiz-card {
        padding: 25px 15px;
    }
    
    .quiz-title {
        font-size: 22px;
    }
    
    .question-title {
        font-size: 17px;
        margin-bottom: 25px;
    }
    
    .quiz-option-button {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* Animation for transitions */
.quiz-question, .quiz-user-data, .quiz-loading, .quiz-success {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}