/* DQ Quiz Frontend Styles */

.dq-quiz-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.dq-quiz-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    padding: 40px;
}

.dq-quiz-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 15px 0;
    text-align: center;
}

.dq-quiz-subtitle {
    font-size: 18px;
    color: #4a5568;
    text-align: center;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.dq-quiz-question {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
}

.dq-quiz-question:last-of-type {
    border-bottom: none;
}

.dq-quiz-question-text {
    font-size: 18px;
    color: #1d626e;
    font-weight: 500;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.dq-quiz-question-number {
    display: inline-block;
    min-width: 35px;
    color: #71c5d5;
    font-weight: 700;
}

.dq-quiz-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dq-quiz-option {
    flex: 1;
    min-width: 120px;
    position: relative;
    cursor: pointer;
}

.dq-quiz-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.dq-quiz-option input[type="radio"] + span {
    display: block;
    padding: 15px 10px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #f7fafc;
}

.dq-quiz-option-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 5px;
}

.dq-quiz-option-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.dq-quiz-option input[type="radio"]:checked + span {
    border-color: #1d626e;
    background: #71c5d5;
    color: #1d626e;
}

.dq-quiz-option input[type="radio"]:checked + span .dq-quiz-option-label,
.dq-quiz-option input[type="radio"]:checked + span .dq-quiz-option-value {
    color: #ffffff;
}

.dq-quiz-option:hover input[type="radio"]:not(:checked) + span {
    border-color: #cbd5e0;
    background: #ffffff;
}

.dq-quiz-contact {
    margin: 50px 0 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
}

.dq-quiz-contact h3 {
    font-size: 24px;
    color: #2d3748;
    margin: 0 0 10px 0;
}

.dq-quiz-contact > p {
    color: #4a5568;
    margin: 0 0 25px 0;
}

.dq-quiz-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dq-quiz-form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.dq-quiz-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.dq-quiz-form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.dq-quiz-submit-wrapper {
    text-align: center;
    margin-top: 30px;
}

.dq-quiz-submit {
    background: linear-gradient(135deg, #71c5d5 0%, #1d626e 100%);
    color: #ffffff;
    border: none;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dq-quiz-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

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

.dq-quiz-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.dq-quiz-message.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.dq-quiz-message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

/* Results Section */
.dq-quiz-results {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    padding: 40px;
    margin-top: 30px;
}

.dq-results-header {
    text-align: center;
    margin-bottom: 40px;
}

.dq-results-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
}

.dq-results-subtitle {
    font-size: 18px;
    color: #4a5568;
    line-height: 1.6;
}

.dq-intensity-badge {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    margin: 20px 0;
}

.dq-intensity-badge.high {
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    color: #ffffff;
}

.dq-intensity-badge.moderate {
    background: linear-gradient(135deg, #ed8936 0%, #c05621 100%);
    color: #ffffff;
}

.dq-intensity-badge.low {
    background: linear-gradient(135deg, #48bb78 0%, #2f855a 100%);
    color: #ffffff;
}

.dq-score-display {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    margin: 20px 0;
}

.dq-results-section {
    margin: 40px 0;
    padding: 30px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 4px solid #1d626e;
}

.dq-results-section h3 {
    font-size: 24px;
    color: #2d3748;
    margin: 0 0 15px 0;
}

.dq-results-section p {
    color: #4a5568;
    line-height: 1.6;
    margin: 10px 0;
}

.dq-pattern-breakdown {
    margin: 30px 0;
}

.dq-pattern-item {
    margin: 25px 0;
}

.dq-pattern-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.dq-pattern-label span:first-child {
    text-align: left;
}

.dq-pattern-label span:last-child {
    text-align: right;
}

.dq-pattern-bars {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dq-pattern-bar-left,
.dq-pattern-bar-right {
    flex: 1;
    height: 30px;
    background: #e2e8f0;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.dq-pattern-bar-left {
    text-align: right;
}

.dq-pattern-bar-left .dq-pattern-bar-fill {
    float: right;
    height: 100%;
    background: linear-gradient(270deg, #667eea 0%, #764ba2 100%);
    transition: width 1s ease;
    border-radius: 15px 0 0 15px;
}

.dq-pattern-bar-right .dq-pattern-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 1s ease;
    border-radius: 0 15px 15px 0;
}

.dq-pattern-center {
    font-weight: 700;
    color: #2d3748;
    min-width: 120px;
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
    padding: 0 10px;
}

.dq-cta-section {
    text-align: center;
    margin: 50px 0 30px 0;
    padding: 40px;
    background: linear-gradient(135deg, #71c5d5 0%, #1d626e 100%);
    border-radius: 12px;
    color: #ffffff;
}

.dq-cta-section h3 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #ffffff;
}

.dq-cta-section p {
    font-size: 16px;
    margin: 0 0 25px 0;
    opacity: 0.95;
}

.dq-cta-form {
    max-width: 500px;
    margin: 0 auto;
}

.dq-cta-input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.dq-cta-button {
    background: #ffffff;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dq-cta-button:hover {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dq-quiz-container {
        padding: 25px;
    }
    
    .dq-quiz-title {
        font-size: 26px;
    }
    
    .dq-quiz-options {
        flex-direction: column;
    }
    
    .dq-quiz-option {
        min-width: 100%;
    }
    
    .dq-quiz-form-row {
        grid-template-columns: 1fr;
    }
    
    .dq-results-title {
        font-size: 28px;
    }
}

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

.dq-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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