:root {
    --mat-primary: #2E7D32;
    /* Dark Green */
    --mat-primary-dark: #1B5E20;
    --mat-bg: #ffffff;
    --mat-text: #111111;
    /* Black */
    --mat-text-light: #444444;
    /* Dark Grey */
    --mat-surface: #f8f9fa;
    --mat-border: #000000;
    --mat-radius: 12px;
    --mat-font: 'Inter', system-ui, -apple-system, sans-serif;
}

.mat-container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--mat-bg);
    border-radius: var(--mat-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    font-family: var(--mat-font);
    color: var(--mat-text);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mat-title,
.mat-result-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #000;
    line-height: 1.2;
}

.mat-description {
    font-size: 1.1rem;
    color: var(--mat-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.mat-btn {
    background: var(--mat-primary);
    color: #fff;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.mat-btn:hover {
    background: var(--mat-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.mat-btn-secondary {
    background: transparent;
    color: var(--mat-text);
    border: 2px solid var(--mat-border);
    box-shadow: none;
}

.mat-btn-secondary:hover {
    border-color: var(--mat-text);
    background: transparent;
    color: #000;
    transform: translateY(-1px);
}

/* Question Section */
.mat-progress-bar {
    height: 6px;
    background: var(--mat-surface);
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
}

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

.mat-question {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    min-height: 3.6em;
    /* Prevent layout shift */
    display: flex;
    align-items: center;
    justify-content: center;
}

.mat-options {
    display: grid;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.mat-option {
    background: var(--mat-surface);
    border: 2px solid transparent;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--mat-text);
    text-align: left;
    /* Better for reading options */
}

@media(min-width: 600px) {
    .mat-option {
        text-align: center;
    }
}

.mat-option:hover {
    background: #fff;
    border-color: var(--mat-primary);
    color: var(--mat-primary);
}

/* Force Green on all interaction states to override theme defaults */
#mat-test-container .mat-options .mat-option:hover,
#mat-test-container .mat-options .mat-option:focus,
#mat-test-container .mat-options .mat-option:active,
#mat-test-container .mat-options .mat-option.selected {
    background-color: #2E7D32 !important;
    border-color: #2E7D32 !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3) !important;
}

.mat-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    border-top: 1px solid var(--mat-border);
    padding-top: 20px;
}

.mat-nav-btn {
    background: none;
    border: none;
    font-size: 0.95rem;
    color: var(--mat-text-light);
    cursor: pointer;
    padding: 10px;
}

/* Force specific styling for Nav button to override theme defaults */
#mat-test-container .mat-nav-btn {
    background: transparent !important;
    background-color: transparent !important;
    color: #444444 !important;
    box-shadow: none !important;
    border: none !important;
}

.mat-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#mat-test-container .mat-nav-btn:hover:not(:disabled) {
    background-color: #2E7D32 !important;
    color: #ffffff !important;
    border-radius: 5px;
    /* Add radius for better look if it gains a background */
}

/* Results */
.mat-main-result {
    font-size: 4rem;
    color: var(--mat-primary);
    margin: 10px 0 30px;
    line-height: 1;
}

.mat-result-desc {
    text-align: center;
    background: var(--mat-surface);
    padding: 30px;
    border-radius: var(--mat-radius);
    margin-bottom: 30px;
}

.mat-result-desc h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--mat-primary-dark);
}

/* Spinner */
.mat-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--mat-surface);
    border-top-color: var(--mat-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    .mat-container {
        padding: 25px 20px;
        margin: 20px;
    }

    .mat-title {
        font-size: 2rem;
    }
}