body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    text-align: center;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

h1 {
    color: #000;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #333;
    margin-bottom: 20px;
}

.step {
    display: block;
    margin: 20px 0;
}

.hidden {
    display: none;
}

button {
    background: #000;
    color: white;
    padding: 12px 25px;
    border: 2px solid #000;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s ease;
    font-size: 1em;
}

button:hover {
    background: white;
    color: #000;
}

.step select {
    width: 300px;
    padding: 12px;
    margin: 15px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.step select:focus {
    border-color: #000;
    outline: none;
}

/* Ranking items styling */
.ranking-container {
    max-width: 500px;
    margin: 20px auto;
}

.ranking-item {
    background: white;
    border: 2px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    cursor: move;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    border-color: #000;
    transform: translateX(10px);
}

.rank-number {
    background: #000;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
}

/* Results grid styling */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.university-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.university-card:hover {
    border-color: #000;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.university-card h3 {
    color: #000;
    margin: 0 0 15px 0;
    font-size: 1.3em;
}

.university-card .rank-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #000;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

.match-reasons {
    background: #f8f8f8;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
}

.match-reasons h4 {
    color: #000;
    margin: 0 0 10px 0;
}

.match-reasons ul {
    margin: 0;
    padding-left: 20px;
}

.match-reasons li {
    margin: 5px 0;
    color: #555;
}

.scores {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
}

.hint {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

/* Country selection styling */
.country-selection-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 10px;
}

.select-all-btn,
.clear-selection-btn {
    padding: 8px 15px;
    font-size: 0.9em;
    background: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
}

.select-all-btn:hover,
.clear-selection-btn:hover {
    background: #eee;
    border-color: #999;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.country-option:hover {
    background: #fff;
    border-color: #000;
}

.country-option input[type="checkbox"] {
    margin-right: 10px;
}

.country-name {
    font-size: 0.95em;
}

#countrySelection {
    margin-top: 15px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

#countrySelection h3 {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
}

.reset-button {
    background: #333;
    margin-top: 30px;
}

.reset-button:hover {
    background: white;
    color: #333;
    border-color: #333;
}

.split-container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    height: calc(100vh - 180px);
}

.questionnaire-side {
    flex: 0 0 400px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.results-side {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.results-title {
    text-align: left;
}

.results-subtitle {
    color: #666;
    margin-top: 5px;
    font-size: 0.9em;
}

.results-count {
    color: #666;
    font-size: 0.9em;
}

.live-results-container {
    overflow-y: auto;
    flex: 1;
}

.university-preview {
    padding: 15px;
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 1;
    position: relative;
    border-left: 4px solid transparent;
}

.university-preview.filtered-out {
    opacity: 0.3;
    pointer-events: none;
}

.university-preview:hover {
    border-color: #000;
    transform: translateX(5px);
}

.university-preview[data-score="100"] {
    border-left-color: #00c853;
}

.university-preview[data-score^="9"] {
    border-left-color: #64dd17;
}

.university-preview[data-score^="8"] {
    border-left-color: #ffd600;
}

.university-preview[data-score^="7"] {
    border-left-color: #ffab00;
}

.university-preview[data-score^="6"] {
    border-left-color: #ff6d00;
}

.university-preview[data-score^="5"] {
    border-left-color: #dd2c00;
}

.perfect-match {
    background-color: #f8fff8;
}

.match-score {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 0.8em;
    color: #666;
}

.rank-indicator {
    display: inline-block;
    padding: 2px 8px;
    background: #000;
    color: white;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 10px;
}

.preview-details {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.preview-tooltip {
    position: absolute;
    right: -300px;
    top: 0;
    width: 280px;
    background: white;
    border: 1px solid #000;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 100;
}

.preview-tooltip h4 {
    margin: 0 0 10px 0;
    color: #000;
}

.preview-tooltip p {
    margin: 5px 0;
    font-size: 0.9em;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #000;
    outline: none;
}

.matching-explanation {
    background: #f8f8f8;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    text-align: left;
}

.matching-explanation ul {
    list-style: none;
    padding: 0;
}

.matching-explanation li {
    margin: 12px 0;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.matching-explanation li:last-child {
    border-bottom: none;
}

.matching-explanation ol {
    margin: 10px 0;
    padding-left: 20px;
}

.university-match-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.university-match-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.match-score {
    font-size: 0.95em;
    font-weight: 600;
    color: #00a651;
    background: #f0f9f4;
    padding: 4px 12px;
    border-radius: 20px;
}

.rank-badge {
    font-size: 0.85em;
    color: #666;
}

.university-details {
    margin: 15px 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.university-details p {
    margin: 8px 0;
    color: #555;
}

.university-details strong {
    color: #333;
    margin-right: 5px;
}

/* Preference Summary Styling */
.preference-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.preference-summary h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.preference-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-label {
    font-weight: 600;
    color: #444;
}

.preference-value {
    color: #666;
}

/* Score Breakdown Styling */
.score-breakdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.score-breakdown h4 {
    font-size: 0.95em;
    color: #333;
    margin-bottom: 12px;
}

.score-bar-container {
    margin: 8px 0;
    font-size: 0.85em;
}

.score-bar-container label {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin-bottom: 4px;
}

.score-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Score colors based on percentage */
.score-fill.high {
    background: linear-gradient(to right, #4CAF50, #8BC34A);
}

.score-fill.medium {
    background: linear-gradient(to right, #FFC107, #FFE082);
}

.score-fill.low {
    background: linear-gradient(to right, #FF5722, #FFAB91);
}

.view-details-btn {
    margin-top: auto;
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #333;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-details-btn:hover {
    background: #eee;
    border-color: #ddd;
}

.detailed-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 0.9em;
}

.detailed-info h4 {
    color: #333;
    margin-bottom: 10px;
}

.detailed-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detailed-info li {
    margin: 8px 0;
    color: #666;
    display: flex;
    justify-content: space-between;
}

/* Style for the final matches display */
.final-matches-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 300px); /* Account for header and preferences */
}

.university-match-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.university-match-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.match-score {
    font-size: 0.95em;
    font-weight: 600;
    color: #00a651;
    background: #f0f9f4;
    padding: 4px 12px;
    border-radius: 20px;
}

.rank-badge {
    font-size: 0.85em;
    color: #666;
}

.university-details {
    margin: 15px 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.university-details p {
    margin: 8px 0;
    color: #555;
}

.university-details strong {
    color: #333;
    margin-right: 5px;
}

.preference-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.preference-summary h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.preference-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-label {
    font-weight: 600;
    color: #444;
}

.preference-value {
    color: #666;
}

.score-breakdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.score-breakdown h4 {
    font-size: 0.95em;
    color: #333;
    margin-bottom: 12px;
}

.score-bar-container {
    margin: 8px 0;
    font-size: 0.85em;
}

.score-bar-container label {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin-bottom: 4px;
}

.score-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.score-fill.high {
    background: linear-gradient(to right, #4CAF50, #8BC34A);
}

.score-fill.medium {
    background: linear-gradient(to right, #FFC107, #FFE082);
}

.score-fill.low {
    background: linear-gradient(to right, #FF5722, #FFAB91);
}

.view-details-btn {
    margin-top: auto;
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #333;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-details-btn:hover {
    background: #eee;
    border-color: #ddd;
}

.detailed-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 0.9em;
}

.detailed-info h4 {
    color: #333;
    margin-bottom: 10px;
}

.detailed-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detailed-info li {
    margin: 8px 0;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.welcome-screen {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-content {
    max-width: 600px;
    margin: 0 auto;
}

.welcome-content ul {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: left;
}

.welcome-content li {
    margin: 15px 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.helper-text {
    color: #666;
    font-size: 1.1em;
    margin: 20px 0;
    font-style: italic;
}

.start-button {
    font-size: 1.2em;
    padding: 15px 30px;
    margin-top: 20px;
}

/* Update existing step styles to include helper text */
.step .helper-text {
    color: #666;
    font-size: 0.9em;
    margin: 10px 0 20px 0;
    text-align: left;
}

.retry-button {
    margin-top: 10px;
    background: #f44336;
}

.retry-button:hover {
    background: white;
    color: #f44336;
    border-color: #f44336;
}

/* Results View Styling */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.results-title {
    text-align: left;
}

.results-subtitle {
    color: #666;
    margin-top: 5px;
    font-size: 0.9em;
}

.matches-container {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 150px);
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.match-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.match-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.match-card-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
}

.match-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-percentage {
    color: #00a651;
    font-weight: 600;
    font-size: 0.9em;
}

.rank-badge {
    font-size: 0.85em;
    color: #666;
}

.match-card-body {
    padding: 20px;
}

.key-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
}

.info-value {
    font-size: 0.95em;
    color: #333;
}

.match-metrics {
    margin: 20px 0;
}

.details-button {
    width: 100%;
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.details-button:hover {
    background: #eee;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric-label {
    font-size: 0.8em;
    color: #666;
}

.metric-value {
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

/* Pathways Branding */
.welcome-header {
    margin-bottom: 30px;
}


/* Update color scheme to match Pathways brand */
:root {
    --pathways-primary: #000000;    /* Black from logo */
    --pathways-secondary: #666666;  /* Grey for text */
    --pathways-accent: #00a651;     /* Green for highlights */
}

/* Update button styles */
.start-button, 
button {
    background: var(--pathways-primary);
    color: white;
    border: 2px solid var(--pathways-primary);
}

.start-button:hover, 
button:hover {
    background: white;
    color: var(--pathways-primary);
    border-color: var(--pathways-primary);
}

/* Update header styles */
h1, h2 {
    color: var(--pathways-primary);
}

/* Update match percentage colors */
.match-percentage {
    color: var(--pathways-accent);
}

/* Update the results header */
.results-header {
    position: relative;
}

/* Update score bars */
.score-fill.high {
    background: linear-gradient(to right, var(--pathways-accent), #8BC34A);
}

/* Update helper text */
.helper-text {
    color: var(--pathways-secondary);
}

/* Update header styling */
.site-header {
    text-align: center;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}


.site-header h1 {
    margin: 10px 0 0 0;
    font-size: 1.8em;
    color: var(--pathways-primary);
}

/* Adjust split container for new header */
.split-container {
    height: calc(100vh - 180px); /* Account for new header */
}


/* Remove the old h1 margin */
body > h1 {
    display: none;
}
