.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Pretendard', sans-serif;
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 70px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 15px;
}

.compare-title h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.compare-title p {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Selection Section */
.selection-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.search-box {
    background: var(--bg-card);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-box h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input-group input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-color);
    font-size: 1rem;
}

.btn-select {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.selected-apt-info {
    padding: 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-apt-info .name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.btn-remove {
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
    background: none;
    border: 1px solid #e74c3c;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: #e74c3c;
    color: white;
}

/* VS Badge */
.vs-badge {
    font-size: 1.2rem;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 3px solid white;
    position: relative;
    z-index: 2;
}

/* Search Results Overlay */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 100;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
}

.result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.result-item:hover {
    background: var(--bg-light);
}

.result-item .sgg { font-size: 0.8rem; color: var(--text-muted); }
.result-item .apt { font-weight: 600; margin-left: 5px; }

/* Comparison Dashboard */
.compare-dashboard {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th, .dashboard-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--secondary-color);
    width: 200px;
}

.apt-header-cell {
    background: var(--bg-light);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.apt1-col { color: var(--primary-color); }
.apt2-col { color: #e67e22; }

.metric-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.better { color: #e74c3c !important; }

.score-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.5rem;
    background: #f1f2f6;
    color: #2c3e50;
}

.score-badge.high {
    background: #ffeaa7;
    color: #d35400;
}

[data-theme="dark"] .score-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

[data-theme="dark"] .score-badge.high {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.rep-area-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.progress-container {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s;
}

/* Chart Card */
.chart-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

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

.chart-header h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.chart-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.chart-container {
    position: relative;
    height: 450px;
    width: 100%;
}
