.compare-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 1rem;
}

.compare-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.school-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background-color: white;
    font-family: inherit;
}

.school-selector select:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.spider-chart-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    display: none;
    justify-content: center;
    align-items: center;
    height: 520px;
    min-height: 520px;
}

.spider-chart-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.comparison-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: none;
}

.comparison-box.active {
    display: block;
}

.comparison-box-header {
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.comparison-box-header img {
    height: 60px;
    border-radius: 4px;
}

.comparison-box-header p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.comparison-school-image {
    width: 100%;
    height: 200px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 12px;
    background: #f3f4f6;
}

.comparison-ranking-section {
    background: #f9fafb;
    border-radius: 4px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 12px;
}

.comparison-ranking-item {
    text-align: center;
}

.comparison-ranking-item-label {
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 12px;
}

.comparison-ranking-item-value {
    font-size: 20px;
    font-weight: 800;
    color: #1d4ed8;
}

.comparison-scores-section,
.comparison-stats-section {
    margin-top: 18px;
    margin-bottom: 12px;
}

.comparison-scores-section h3,
.comparison-stats-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    text-align: center;
}

.comparison-score-grid,
.comparison-stat-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comparison-score-item,
.comparison-stat-item {
    background: #f9fafb;
    border-radius: 4px;
    padding: 8px;
    text-align: left;
    border: 1px solid transparent;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.comparison-score-item.highlight,
.comparison-stat-item.highlight {
    background: #dcfce7;
    border-color: #16a34a;
    font-weight: 600;
}

.comparison-score-item.highlight > .comparison-score-value,
.comparison-stat-item.highlight > .comparison-stat-value,
.comparison-score-item.highlight > .comparison-score-name,
.comparison-stat-item.highlight > .comparison-stat-name {
    color: #16a34a;
}

.comparison-score-name,
.comparison-stat-name {
    color: #6b7280;
    margin-bottom: 0px;
    font-size: 10px;
    font-weight: 600;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.comparison-score-value,
.comparison-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
    max-width: 30%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comparison-profile-button {
    width: 100%;
    padding: 8px;
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
    transition: background-color 0.2s;
}

.comparison-profile-button:hover {
    background: #1e40af;
}

.label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    text-align: center;
}

@media (max-width: 1400px) {
    .compare-container {
        grid-template-columns: repeat(3, 1fr);
    }
}