/* Base Styles and Variables */
.mat-container {
    --mat-primary: #7c3aed;
    --mat-primary-light: #9f67ff;
    --mat-primary-dark: #5b21b6;
    --mat-secondary: #e9d5ff;
    --mat-text: #1f2937;
    --mat-text-light: #4b5563;
    --mat-border: #e5e7eb;
    --mat-success: #10b981;
    --mat-error: #ef4444;
    --mat-warning: #f59e0b;
    --mat-shadow: rgba(0, 0, 0, 0.1);

    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--mat-text);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--mat-shadow);
}

/* Progress Bar */
.mat-progress {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--mat-secondary);
    border-radius: 8px;
}

.mat-progress-bar {
    height: 8px;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
}

.mat-progress-fill {
    height: 100%;
    background: var(--mat-primary);
    transition: width 0.3s ease;
}

.mat-progress-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    color: var(--mat-text);
}

/* Section Styles */
.mat-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid var(--mat-border);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--mat-shadow);
}

.mat-section h3 {
    margin: 0 0 1rem 0;
    color: var(--mat-primary-dark);
    font-size: 1.5rem;
    font-weight: 600;
}

.mat-description {
    margin-bottom: 1.5rem;
    color: var(--mat-text-light);
    font-size: 0.9rem;
}

.mat-section-progress {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--mat-secondary);
    border-radius: 4px;
    font-size: 0.875rem;
    text-align: center;
}

/* Question Styles */
.mat-question {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
}

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

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

.mat-scale-option {
    flex: 1;
    min-width: 0;
}

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

.mat-scale-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    background: #ffffff;
    border: 2px solid var(--mat-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mat-scale-option label:hover {
    border-color: var(--mat-primary-light);
    background: #f8f5ff;
}

.mat-scale-option input[type="radio"]:checked + label {
    background: var(--mat-primary);
    border-color: var(--mat-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px var(--mat-shadow);
}

.mat-scale-value {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mat-scale-label {
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.2;
}

/* Navigation Buttons */
.mat-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.mat-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mat-prev {
    background: var(--mat-secondary);
    color: var(--mat-primary-dark);
}

.mat-next, .mat-submit {
    background: var(--mat-primary);
    color: #ffffff;
}

.mat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px var(--mat-shadow);
}

.mat-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.mat-results {
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
}

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

.mat-overall-score h4 {
    margin: 0 0 1rem 0;
    color: var(--mat-primary-dark);
    font-size: 1.5rem;
}

.mat-category-scores {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mat-category-score {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
}

.mat-category-score h5 {
    margin: 0 0 0.75rem 0;
    color: var(--mat-primary-dark);
    font-size: 1.125rem;
}

.mat-score-bar {
    height: 1.5rem;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

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

.mat-score-animate {
    transform: translateX(0);
}

.mat-insight {
    margin: 0.75rem 0 0 0;
    font-size: 0.9rem;
    color: var(--mat-text-light);
}

/* Recommendations */
.mat-recommendations-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.mat-recommendations-list li {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-left: 4px solid var(--mat-primary);
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
}

/* Error Messages */
.mat-error {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid var(--mat-error);
    border-radius: 6px;
    color: var(--mat-error);
    text-align: center;
}

/* Tooltips */
.mat-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: var(--mat-text);
    color: #ffffff;
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

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

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

    .mat-scale-option {
        width: 100%;
    }

    .mat-navigation {
        flex-direction: column;
    }

    .mat-btn {
        width: 100%;
    }
}

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

    .mat-navigation,
    .mat-reset,
    .mat-form {
        display: none;
    }

    .mat-results {
        display: block !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .mat-score-fill,
    .mat-scale-option label,
    .mat-btn {
        transition: none;
    }
}

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