:root {
    --main-color: #00BEBD; /* 湖蓝 */
    --sub-color: #FF9212;  /* 橙色 */
    --text-main: #333333;
    --text-gray: #666666;
    --bg-light: #F8F9FA;
    --radius: 4px; /* 统一小圆角 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #FFF; color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* 响应式容器 */
.container {
    width: 100%;
    max-width: 1000px; /* PC端限制宽度，手机端自动撑开 */
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部标题区 */
.page-header {
    padding: 40px 0 20px;
    border-bottom: 1px solid #F0F0F0;
    text-align: center;
}
.page-header h1 { font-size: 24px; margin: 0; color: var(--text-main); }
.page-header p { font-size: 14px; color: var(--text-gray); margin-top: 8px; }

/* 当前定位 */
.current-location {
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.loc-label { font-size: 14px; color: var(--text-gray); }
.loc-city {
    padding: 6px 20px;
    background: rgba(0, 190, 189, 0.08);
    border: 1px solid var(--main-color);
    color: var(--main-color);
    border-radius: var(--radius);
    font-weight: bold;
}

/* 城市区块标题 */
.section-hd {
    font-size: 16px;
    font-weight: 600;
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-hd::before {
    content: "";
    width: 4px;
    height: 16px;
    background: var(--main-color);
    border-radius: 2px;
}

/* 自适应网格布局：核心代码 */
.city-grid {
    display: grid;
    /* 手机端默认3列，PC端通过媒体查询修改 */
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px;
    margin-bottom: 30px;
}

.city-item {
    display: block;
    background: var(--bg-light);
    padding: 12px 5px;
    text-align: center;
    font-size: 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
}

/* 交互反馈 */
.city-item:hover {
    background: #FFF;
    border-color: var(--main-color);
    color: var(--main-color);
    box-shadow: 0 4px 12px rgba(0,190,189,0.1);
}

.city-item.active {
    background: var(--main-color);
    color: #FFF;
    font-weight: bold;
}

/* 字母索引列表 */
.letter-row {
    display: flex;
    border-bottom: 1px solid #F5F5F5;
    padding: 15px 0;
}
.letter-tag {
    width: 40px;
    font-weight: bold;
    color: var(--main-color);
    font-size: 18px;
}
.letter-cities {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
}
.letter-cities a:hover { color: var(--sub-color); }

/* --- 响应式媒体查询 --- */

/* 中等屏幕（平板及小屏幕PC） */
@media (min-width: 768px) {
    .city-grid {
grid-template-columns: repeat(6, 1fr); /* PC端变6列 */
    }
    .page-header { text-align: left; padding: 60px 0 30px; }
    .current-location { justify-content: flex-start; }
}

/* 手机端细节优化 */
@media (max-width: 480px) {
    .city-grid { gap: 8px; }
    .city-item { font-size: 13px; padding: 10px 2px; }
    .letter-tag { width: 30px; font-size: 16px; }
    .letter-cities { gap: 10px 15px; font-size: 14px; }
}