:root {
    --primary-purple: #7B2CBF; /* Adjusted purple */
    --primary-pink: #E04080; /* Adjusted pink */
    --primary-gradient: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-pink) 100%);
    --light-bg: #F8F7FC; /* Light lavender/grey */
    --card-bg: #FFFFFF;
    --text-dark: #333;
    --text-light: #F0F2F5;
    --text-secondary: #555;
    --border-color: #E0E0E0;
    --active-step-bg: var(--primary-purple);
    --inactive-step-bg: #D1C4E9; /* Lighter purple for inactive steps */
    --step-label-color: #4A4A4A;
    --header-title-color: var(--primary-purple); /* This was in your :root, keeping it */
    --star-filled-color: #FFD700; /* Gold for filled stars */
    --star-empty-color: #FFEEAA; /* Lighter yellow for empty stars */
    --employability-card-bg: #FFF0F5; /* LavenderBlush like for the card */
    --employability-title-color: #FF1493; /* DeepPink for title */
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Corrected from 100Vh to 100vh */
}

header {
    background: var(--primary-gradient);
    color: var(--text-light); /* This was in your general header, now it's the default */
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center; /* Default alignment for desktop */
    gap: 1.5rem; /* Default gap for desktop */
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

#header-logo {
    height: 100px; /* Your adjusted size, kept from your version for desktop */
    width: auto;
    flex-shrink: 0;
}

.header-text-content {
    text-align: left; /* Default for desktop */
    flex-grow: 1;
}

header h1 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    margin: 0;
    font-size: 48px; /* Your adjusted size for desktop */
    font-weight: 700;
    color: var(--text-light); /* Ensuring this for h1 as per your original header styling */
}

header p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-light); /* Ensuring this for p as per your original header styling */
    opacity: 0.9;
    max-width: 700px;
}

.progress-indicator-container {
    background-color: #fff;
    padding: 1.5rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.progress-indicator {
    display: flex;
    justify-content: space-around;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.progress-indicator::before { /* Connector line */
    content: '';
    position: absolute;
    top: 17px; 
    left: 10%; 
    right: 10%; 
    height: 2px;
    background-color: var(--inactive-step-bg);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative; 
    z-index: 2; 
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--inactive-step-bg);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    border: 2px solid white; 
    box-shadow: 0 0 0 2px var(--inactive-step-bg); 
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.step.active .step-number {
    background-color: var(--active-step-bg);
    box-shadow: 0 0 0 2px var(--active-step-bg);
    font-weight: 700;
}

.step-label {
    font-size: 0.75rem; 
    color: var(--step-label-color);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-purple);
    font-weight: 700;
}


main#app-container {
    flex: 1;
    max-width: 900px;
    margin: 0 auto 2rem auto; 
    padding: 1rem;
    width: 95%;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 2rem; 
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem; 
    padding-bottom: 0.75rem; 
    border-bottom: 1px solid #eaeaea;
}

.section-header h2 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    margin: 0;
    color: var(--header-title-color); /* Uses the root variable you had */
    font-size: 1.6rem; 
    font-weight: 600;
    display: flex;
    align-items: center;
}

.step-icon {
    margin-right: 0.75rem;
    font-size: 1.5rem;
    color: var(--primary-purple);
}


.edit-button {
    background-color: #E8EAF6; 
    color: var(--primary-purple);
    border: 1px solid #C5CAE9;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-button:hover, .edit-button:focus {
    background-color: #D1C4E9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(123, 44, 191, 0.2);
}

.step-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}


.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

select#province-select {
    width: 100%;
    padding: 0.85rem 1rem; 
    border: 1px solid var(--border-color);
    border-radius: 6px; 
    background-color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237B2CBF' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 16px;
}

select#province-select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.15);
}


#degree-list, #university-list {
    list-style-type: none;
    padding: 0;
}

#degree-list li, #university-list li {
    padding: 0.85rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fdfdff; 
}

#university-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.university-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #fff;
    flex-shrink: 0;
    border: 1px solid #eee;
}

#degree-list li:hover, #degree-list li:focus,
#university-list li:hover, #university-list li:focus {
    background-color: #F3E5F5; 
    border-color: var(--primary-purple);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(123, 44, 191, 0.1);
    outline: none;
}

#degree-list li.selected, #university-list li.selected {
    background-color: var(--primary-purple);
    color: white;
    font-weight: 500;
    border-color: var(--primary-purple);
    box-shadow: 0 2px 8px rgba(123, 44, 191, 0.3);
}

#university-list li.selected span { 
    color: white;
}


.button-next-step, .button-primary, .button-secondary {
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 8px; 
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center; 
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1.2;
}
.button-next-step:active, .button-primary:active {
    transform: translateY(1px);
}


.button-next-step, .button-primary {
    background: var(--primary-gradient);
    color: white;
    min-width: 180px; 
}

.button-next-step:hover, .button-primary:hover {
    background: linear-gradient(135deg, #8A2BE2, #C71585); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.button-next-step:disabled, .button-primary:disabled {
    background: #D1C4E9; 
    cursor: not-allowed;
    box-shadow: none;
}

.button-secondary {
    background-color: #F1F3F4; 
    color: var(--primary-purple);
    border: 1px solid #D1C4E9;
}

.button-secondary:hover {
    background-color: #E8EAF6;
    border-color: var(--primary-purple);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.button-secondary:disabled {
    background-color: #e0e0e0;
    color: #95a5a6;
    border-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

.button-secondary.active { 
    background-color: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.controls-report {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.employability-score-card {
    background-color: var(--employability-card-bg);
    border: 1px solid var(--primary-pink);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(224, 64, 128, 0.1);
}

.employability-score-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--employability-title-color);
    margin: 0 0 0.75rem 0;
}

.stars-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.star-icon {
    width: 28px; 
    height: 28px;
}

.star-icon.filled path {
    fill: var(--star-filled-color);
}

.star-icon.empty path {
    fill: var(--star-empty-color); 
}


.employability-score-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}


#curriculum-analysis-report, #general-assistant-report, #specific-employability-report {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background-color: #fdfdfe;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    min-height: 100px;
    white-space: pre-wrap; 
    font-size: 0.95rem;
    color: var(--text-dark); 
    overflow-wrap: break-word;
    word-break: break-word; 
}

#curriculum-analysis-report p, 
#general-assistant-report p,
#specific-employability-report p {
    line-height: 1.45; 
    margin-top: 0.4em;  
    margin-bottom: 0.8em; 
}

#curriculum-analysis-report h3, #specific-employability-report h3, #general-assistant-report h3 { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    color: var(--primary-purple);
    margin-top: 0.6em;   
    margin-bottom: 0.1em; 
    line-height: 1.2;    
    font-size: 1.2em;   
}

#curriculum-analysis-report h4, #specific-employability-report h4, #general-assistant-report h4 { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    color: var(--primary-purple);
    font-size: 1.1em; 
    margin-top: 0.3em;   
    margin-bottom: 0.05em; 
    line-height: 1.15;     
}

#curriculum-analysis-report ul, #curriculum-analysis-report ol,
#specific-employability-report ul, #specific-employability-report ol,
#general-assistant-report ul, #general-assistant-report ol {
    padding-left: 1.75rem; 
    margin-top: 0.1em;     
    margin-bottom: 0.4em;  
}

#curriculum-analysis-report li, 
#specific-employability-report li,
#general-assistant-report li { 
    line-height: 1.25;      
    margin-bottom: 0.1em;  
}

#curriculum-analysis-report ul ul, #curriculum-analysis-report ul ol,
#curriculum-analysis-report ol ul, #curriculum-analysis-report ol ol,
#specific-employability-report ul ul, #specific-employability-report ul ol,
#specific-employability-report ol ul, #specific-employability-report ol ol,
#general-assistant-report ul ul, #general-assistant-report ul ol,
#general-assistant-report ol ul, #general-assistant-report ol ol {
    padding-left: 1.5rem; 
    margin-top: 0.1em;    
    margin-bottom: 0.2em; 
}

#curriculum-analysis-report h1, #curriculum-analysis-report h2, 
#curriculum-analysis-report h5, #curriculum-analysis-report h6,
#specific-employability-report h1, #specific-employability-report h2, 
#specific-employability-report h5, #specific-employability-report h6,
#general-assistant-report h1, #general-assistant-report h2, 
#general-assistant-report h5, #general-assistant-report h6 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    color: var(--primary-purple); 
    margin-top: 1em; 
    margin-bottom: 0.4em; 
    line-height: 1.35; 
}

#curriculum-analysis-report strong, 
#specific-employability-report strong,
#general-assistant-report strong {
    color: #4A044E; 
    font-weight: 600; 
}

.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    gap: 0.75rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 1s linear infinite;
}

.spinner-inline {
    width: 1em; 
    height: 1em; 
    border: 2px solid currentColor; 
    border-right-color: transparent; 
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.75s linear infinite;
    margin-right: 0.5em; 
    vertical-align: text-bottom; 
}

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

.sources-container {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid #eee;
}

.sources-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

#degree-sources-list, #university-sources-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0;
    font-size: 0.85rem;
}

#degree-sources-list li, #university-sources-list li {
    margin-bottom: 0.3rem;
}

#degree-sources-list a, #university-sources-list a {
    color: var(--primary-purple);
    text-decoration: none;
}

#degree-sources-list a:hover, #university-sources-list a:hover {
    text-decoration: underline;
}

.error-message {
    color: #B71C1C; 
    padding: 0.85rem 1.2rem; 
    border: 1px solid #EF9A9A; 
    background-color: #FFEBEE; 
    border-radius: 6px;
    margin-top: 1.2rem; 
    margin-bottom: 1.2rem; 
    font-size: 0.9rem;
    line-height: 1.4;
}
.error-message a {
    color: #B71C1C;
    font-weight: bold;
}

.warning-message {
    color: #664d03; 
    padding: 0.85rem 1.2rem;
    border: 1px solid #ffecb5; 
    background-color: #fff9e6; 
    border-radius: 6px;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.4;
}
.warning-message strong {
    color: #523e02; 
}


footer {
    background-color: #311B4F; 
    color: #E0E0E0; 
    text-align: center;
    padding: 1.8rem 1rem;
    font-size: 0.85rem;
    margin-top: auto; 
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        /* Changes for mobile header: logo left, text right */
        padding: 0.8rem 1rem; 
        flex-direction: row; /* Align items in a row */
        align-items: center; /* Vertically center logo and text block */
        /* text-align: left; is implicitly handled by .header-text-content */
        gap: 0.8rem; /* Space between logo and text */
    }

    #header-logo {
        height: 38px; /* Adjusted logo size for mobile */
        width: auto;
        margin-bottom: 0; /* Remove bottom margin from previous centered layout */
        flex-shrink: 0; /* Prevent logo from shrinking */
    }

    .header-text-content {
        text-align: left; /* Ensure text aligns left */
        flex-grow: 1; /* Allow text content to take available space */
    }

    header h1 {
        font-size: 1.4rem; /* Slightly smaller title for mobile */
        margin-bottom: 0.1rem; /* Reduced space to slogan */
    }

    header p {
        font-size: 0.75rem; /* Slightly smaller slogan for mobile */
        line-height: 1.3;
        /* max-width will still apply, which is fine */
    }

    /* --- Rest of your mobile styles --- */
    .progress-indicator-container {
        padding: 1rem 0.5rem;
    }
    .progress-indicator {
        justify-content: space-between; 
    }
    .progress-indicator::before {
        left: 5%;
        right: 5%;
    }
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .step-label {
        font-size: 0.65rem; 
        max-width: 60px; 
        overflow-wrap: break-word;
    }

    main#app-container {
        margin: 1rem auto;
        padding: 0.5rem;
    }
    .card {
        padding: 1.2rem;
    }
    .section-header h2 {
        font-size: 1.3rem;
    }
    .step-icon {
        font-size: 1.3rem;
    }
    
    .employability-score-card {
        padding: 1rem;
    }
    .employability-score-title {
        font-size: 1.1rem;
    }
    .star-icon {
        width: 24px;
        height: 24px;
    }
    .employability-score-text {
        font-size: 0.9rem;
    }


    .button-next-step, .button-primary, .button-secondary {
        width: 100%; 
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    .controls-report {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .step-label {
        font-size: 0.6rem;
    }
     .section-header h2 {
        font-size: 1.1rem;
    }
    .step-icon {
        font-size: 1.1rem;
    }
    .employability-score-title {
        font-size: 1rem;
    }
    .star-icon {
        width: 20px;
        height: 20px;
    }
}