/* Reset and Base Styles */
.rst-container {
    --rst-primary: #4a90e2;
    --rst-secondary: #f5f7fa;
    --rst-success: #2ecc71;
    --rst-warning: #f1c40f;
    --rst-danger: #e74c3c;
    --rst-text: #2c3e50;
    --rst-border: #dfe6e9;
    --rst-shadow: rgba(0, 0, 0, 0.1);
    
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    color: var(--rst-text);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--rst-shadow);
}

/* Section Styles */
.rst-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--rst-secondary);
    border-radius: 6px;
    border: 1px solid var(--rst-border);
}

.rst-section h3 {
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--rst-primary);
    color: var(--rst-text);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Progress Indicator */
.rst-progress {
    font-size: 0.875rem;
    color: var(--rst-text);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 4px;
    text-align: center;
}

/* Question Styles */
.rst-question {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px var(--rst-shadow);
}

.rst-question p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--rst-text);
}

/* Scale Options */
.rst-scale {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.rst-scale-option {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.rst-scale-option input[type="radio"] {
    display: none;
}

.rst-scale-option label {
    display: block;
    padding: 0.75rem;
    background: #ffffff;
    border: 2px solid var(--rst-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.rst-scale-option input[type="radio"]:checked + label {
    background: var(--rst-primary);
    color: #ffffff;
    border-color: var(--rst-primary);
}

/* Navigation */
.rst-next-section {
    margin-top: 1.5rem;
    padding: 1rem;
    text-align: center;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.rst-next-section.rst-next-active {
    color: var(--rst-primary);
    opacity: 1;
    cursor: pointer;
}

.rst-next-section.rst-next-active:hover {
    color: #2171c7;
}

/* Submit Button */
.rst-submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background: var(--rst-primary);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rst-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.rst-submit-btn.rst-submit-ready:hover {
    background: #2171c7;
}

/* Results Section */
.rst-results {
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--rst-shadow);
}

.rst-overall-score {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--rst-secondary);
    border-radius: 6px;
}

.rst-score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--rst-primary);
}

/* Category Scores */
.rst-category-scores {
    margin-bottom: 2rem;
}

.rst-category-score {
    margin-bottom: 1rem;
}

.rst-category-name {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.rst-score-bar {
    height: 2rem;
    background: var(--rst-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.rst-score-fill {
    height: 100%;
    background: var(--rst-primary);
    color: #ffffff;
    text-align: right;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    transform-origin: left;
    transition: width 1s ease-out;
}

.rst-score-animate {
    animation: scoreFill 1s ease-out forwards;
}

/* Feedback Section */
.rst-feedback-overall {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--rst-secondary);
    border-radius: 6px;
}

.rst-feedback-categories {
    display: grid;
    gap: 1.5rem;
}

.rst-feedback-item {
    padding: 1rem;
    background: #ffffff;
    border: 1px solid var(--rst-border);
    border-radius: 4px;
    display: none;
}

.rst-feedback-item h5 {
    margin: 0 0 0.5rem 0;
    color: var(--rst-primary);
    font-size: 1.125rem;
}

/* Error Message */
.rst-error {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--rst-danger);
    color: #ffffff;
    border-radius: 4px;
    text-align: center;
}

/* Reset Button */
.rst-reset-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    background: var(--rst-secondary);
    color: var(--rst-text);
    border: 1px solid var(--rst-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rst-reset-btn:hover {
    background: #e9ecef;
}

/* Animations */
@keyframes scoreFill {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .rst-container {
        margin: 1rem;
        padding: 1rem;
    }

    .rst-scale {
        flex-direction: column;
    }

    .rst-scale-option {
        min-width: 100%;
    }

    .rst-score-value {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .rst-container {
        box-shadow: none;
        margin: 0;
        padding: 1rem;
    }

    .rst-submit-btn,
    .rst-reset-btn,
    .rst-next-section {
        display: none;
    }

    .rst-score-fill {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Accessibility */
.rst-scale-option input[type="radio"]:focus + label {
    outline: 2px solid var(--rst-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .rst-score-fill,
    .rst-scale-option label,
    .rst-submit-btn {
        transition: none;
    }
    
    .rst-score-animate {
        animation: none;
    }
}