/* ===== 战场（city） ===== */
.city-panel {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 400;
    overflow: hidden;
}

.city-tabs {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 30;
}

.city-tab {
    padding: 5px 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    font-size: 13px;
}

.city-tab.active {
    background: #c8862d;
    border-color: #ffd98a;
    color: #fff;
}

.city-tab.locked { opacity: 0.45; }

.city-squad-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 5px 14px;
    color: #fff;
    background: #2d7fc8;
    border: 1px solid #7fbaff;
    border-radius: 16px;
    font-size: 13px;
    z-index: 30;
}

/* 返回按钮：固定在页面左下角 */
.city-back {
    position: absolute;
    left: 12px;
    bottom: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 30;
}

.city-back img {
    width: 100%;
    height: auto;
    display: block;
}

.city-wrap {
    position: absolute;
    inset: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

.city-stage {
    position: relative;
    height: 100%;
}

.city-bg {
    display: block;
    height: 100%;
    width: auto;
    user-select: none;
    pointer-events: none;
}

.city-map {
    position: absolute;
    left: 0;
    top: 0;
}

.city-icon {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 64px;
    cursor: pointer;
    z-index: 5;
}

.city-icon img { width: 100%; height: auto; display: block; }

.city-icon.locked { filter: grayscale(1); }

.city-cloud {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 80px;
    z-index: 6;
    pointer-events: none;
}

.city-cloud img { width: 100%; height: auto; }

.city-portal {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 80px;
    z-index: 7;
}

.city-portal img { width: 80px; height: auto; display: block; }

.city-fighting {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 70px;
    z-index: 8;
    pointer-events: none;
}

/* 兵营内的传送门 */
.barracks-portal {
    position: absolute;
    width: 80px;
    height: 96px;
    cursor: pointer;
    z-index: 8;
}

.barracks-portal-door {
    position: absolute;
    left: 0;
    top: 0;
    width: 80px;
    height: auto;
}

/* ===== 城池信息面板：初级=居中弹框(70%高) / 中级高级=全屏 ===== */
.city-info-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.city-info-box {
    width: 100%;
    height: 70%;
    box-sizing: border-box;
    border-radius: 12px;
    padding: 50px;
    color: #3a2800;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 中级/高级：全屏，无 bg_xiao2 */
.city-info-box.pvp {
    height: 100%;
    border-radius: 0;
    background: rgba(18, 22, 28, 0.97);
    color: #e8d9b0;
}

.city-info-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.city-info-name { font-size: 20px; font-weight: 700; color: #5a3a00; }
.city-info-box.pvp .city-info-name { color: #ffd98a; }

.city-info-back {
    position: absolute;
    left: 16px;
    bottom: 20px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
}

.city-info-back img { width: 100%; height: 100%; display: block; }

.city-info-body { flex: 1; font-size: 14px; line-height: 1.7; overflow-y: auto; color: #3a2800; }
.city-info-box.pvp .city-info-body { color: #e8d9b0; }

.city-info-title { font-size: 15px; color: #7a5200; font-weight: 700; margin: 12px 0 8px; }
.city-info-box.pvp .city-info-title { color: #ffd98a; }

.city-info-city-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.city-info-city-icon { width: 64px; height: auto; }

.city-info-bonus { font-size: 14px; color: #7a5200; font-weight: 700; }
.city-info-box.pvp .city-info-bonus { color: #ffd98a; }

.city-info-heroes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 占领小队（驻守玩家头像） */
.city-def-members {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.city-def-member {
    width: 56px;
    text-align: center;
}

.city-def-member img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #7fbaff;
}

.city-def-member span {
    display: block;
    font-size: 11px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-def-empty { font-size: 14px; opacity: 0.75; }

/* 预留战斗动画区域 */
.city-battle-anim {
    width: 100%;
    min-height: 160px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    margin: 4px 0 10px;
}

.city-info-box:not(.pvp) .city-battle-anim {
    border-color: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.3);
}

/* 排队列表 */
.city-info-queue { font-size: 13px; }
.city-info-queue .queue-item { padding: 2px 0; }

.city-info-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
}

.city-auto-label { font-size: 14px; color: #3a2800; margin-right: 16px; }
.city-info-box.pvp .city-auto-label { color: #e8d9b0; }

.city-attack-btn {
    padding: 10px 46px;
    font-size: 16px;
}

/* ===== 小队面板 ===== */
.city-squad-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 55;
    display: flex;
    align-items: center;
    justify-content: center;
}

.city-squad-box {
    width: 90%;
    max-width: 480px;
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    background: linear-gradient(180deg, #1f2836, #12161d);
    border: 1px solid #7fbaff;
}

.city-squad-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #9ecbff;
    margin-bottom: 8px;
}

.city-squad-tools { display: flex; gap: 6px; margin-bottom: 8px; }

.city-squad-tools input {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #7fbaff;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.city-squad-list { max-height: 38vh; overflow-y: auto; }

.city-squad-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
}

.city-squad-item .pos-tag {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    background: rgba(255,255,255,0.12);
}

.city-squad-item .pos-tag.captain { background: #c8862d; }
.city-squad-item .pos-tag.vice { background: #2d7fc8; }

.city-squad-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.city-squad-actions button {
    flex: 1;
    min-width: 90px;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #7fbaff;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 12px;
}
