.rank-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

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

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

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

.region-select {
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
}

/* Chart Section */
.chart-section {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin-bottom: 35px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-container {
    width: 100%;
    max-width: 900px;
    height: 450px;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    table-layout: fixed;
}

.rank-table th, .rank-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--secondary-color);
}

.rank-no {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.apt-info {
    text-align: left !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apt-nm {
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apt-addr {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volume-badge {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

[data-theme="dark"] .volume-badge {
    background: rgba(52, 152, 219, 0.2);
}

.btn-detail {
    padding: 5px 12px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
}

.btn-detail:hover {
    background: #2980b9;
}
