.city-selector-modal {
    max-width: 700px;
    margin: 20px auto;
}

.city-selector-trigger {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #1e293b;
    font-weight: 500;
}

.city-selector-trigger:hover {
    background: transparent;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.city-selector-trigger:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.trigger-text {
    color: #64748b;
    font-size: 14px;
}

.current-city {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
}

.trigger-arrow {
    color: #64748b;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.city-selector-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.city-selector-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    width: 80%; /* 改为全屏宽度的80% */
    max-width: 1000; /* 改为全屏宽度的80% */
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.city-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.city-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.close-popup {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.city-grid {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 70px);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.city-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: #f8fafc;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
}

.city-item:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.city-item.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.city-name {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.city-check {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ffffff;
    color: #3b82f6;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media screen and (max-width: 1200px) {
    .city-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .city-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .city-selector-modal {
        max-width: 60%;
        margin: 25px 0;
    }
    
    .city-selector-trigger {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .trigger-text {
        font-size: 13px;
    }
    
    .current-city {
        font-size: 14px;
    }
    
    .city-selector-popup {
        width: 90%; /* 移动端占90%宽度 */
        max-width: 90%;
        max-height: 85vh;
    }
    
    .city-popup-header {
        padding: 15px;
    }
    
    .city-popup-header h3 {
        font-size: 16px;
    }
    
    .city-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 15px;
    }
    
    .city-item {
        padding: 12px 8px;
        min-height: 50px;
    }
    
    .city-name {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .city-selector-trigger {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .trigger-text {
        font-size: 12px;
    }
    
    .current-city {
        font-size: 13px;
    }
    
    .city-selector-popup {
        width: 95%; /* 小屏幕占95%宽度 */
        max-width: 95%;
        max-height: 90vh;
    }
    
    .city-popup-header {
        padding: 12px;
    }
    
    .city-popup-header h3 {
        font-size: 15px;
    }
    
    .city-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }
    
    .city-item {
        padding: 10px 6px;
        min-height: 45px;
    }
    
    .city-name {
        font-size: 12px;
    }
}