/* ===================== 城市空气质量排行面板 ===================== */
.rank-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.rank-panel.show {
    transform: translateX(0);
}

/* 排行面板遮罩层 */
.rank-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 1999;
    display: none;
}

.rank-mask.show {
    display: block;
}

/* 排行面板头部 */
.rank-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rank-close {
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.rank-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* 排行筛选区域 */
.rank-filters {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
}

.filter-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.filter-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    color: #333;
    cursor: pointer;
}

.filter-select:focus {
    border-color: #1890ff;
    outline: none;
}

.filter-reset-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.filter-reset-btn:hover {
    background: #e8e8e8;
    border-color: #bfbfbf;
}

.filter-reset-btn:active {
    background: #d9d9d9;
}

/* 排行面板标签栏 */
.rank-tabs {
    padding: 0;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
}

.rank-tab {
    flex: 0 0 calc(100% / 7);
    width: calc(100% / 7);
    box-sizing: border-box;
    padding: 10px 2px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
}

.rank-tab.active {
    background: #fff;
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.rank-tab:hover:not(.active) {
    color: #1890ff;
    background-color: #f8f9fa;
}

/* 排行列表容器 */
.rank-list {
    height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 8px;
}

/* 单个排名项 */
.rank-item {
    display: flex;
    align-items: center;
    padding: 5px 5px;
    border-radius: 4px;
    margin-bottom: 0px;
    transition: background 0.2s;
}

.rank-item:hover {
    background: #f5f5f5;
}

/* 排名数字 */
.rank-num {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: #eee;
    color: #666;
    font-size: 12px;
    margin-right: 20px;
}

/* 前三名特殊样式 */
.rank-item:nth-child(1) .rank-num {
    background: #ffd700;
    color: #333;
    font-weight: bold;
}
.rank-item:nth-child(2) .rank-num {
    background: #c0c0c0;
    color: #333;
    font-weight: bold;
}
.rank-item:nth-child(3) .rank-num {
    background: #cd7f32;
    color: #fff;
    font-weight: bold;
}

/* 城市名称 */
.rank-city {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.city-name {
    font-weight: bold;
    margin-bottom: 2px;
}

.city-location {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

/* 空气质量数值 */
.rank-value {
    min-width: 40px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
}