* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "Microsoft YaHei", sans-serif;
    background: #1a1a2e;
    color: #eee;
    height: 100vh;
    overflow: hidden;
}
button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #4a6cf7;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
button:hover { background: #3a5ce5; }
button:disabled { background: #444; color: #888; cursor: not-allowed; }
input, select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #222;
    color: #eee;
    font-size: 14px;
}

/* ============ 登录 ============ */
#loginPanel {
    display: flex; justify-content: center; align-items: center; height: 100vh;
}
.login-box { background: #222; padding: 32px; border-radius: 12px; width: 320px; text-align: center; }
.login-box h1 { color: #4a6cf7; margin-bottom: 20px; }
.login-box .big-btn { width: 100%; padding: 14px; font-size: 16px; border-radius: 8px; }

/* ============ 主面板 ============ */
#mainPanel { display: flex; flex-direction: column; height: 100vh; min-height: 0; }
.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 54px;
    min-height: 0;
}

/* ============ 顶部资源条 ============ */
.top-bar {
    display: flex; gap: 10px; align-items: center;
    background: #222; padding: 8px 12px; font-size: 12px; flex-shrink: 0;
    flex-wrap: wrap;
}
.top-bar b { color: #ffd666; }
.mini-btn { padding: 4px 10px; font-size: 13px; }

.stage-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 8px 12px;
    gap: 10px;
}
.player-info { text-align: left; }
.player-name { font-size: 14px; color: #4a6cf7; font-weight: bold; }
.player-power { font-size: 11px; color: #ffd666; }
.res-info {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
}

/* ============ 关卡页 ============ */
.stage-body {
    flex: 1; display: flex; align-items: center; justify-content: space-between;
    padding: 20px; gap: 10px; overflow: auto;
}
.arrow-btn {
    width: 50px; height: 80px; font-size: 24px;
    background: #2a2a3e; color: #fff; border-radius: 8px;
    flex-shrink: 0;
}
.stage-card {
    flex: 1; max-width: 500px; margin: 0 auto;
    background: #222; border-radius: 12px; padding: 24px; text-align: center;
}
.stage-card h2 { color: #4a6cf7; margin-bottom: 16px; }
.stage-reward, .stage-cost { color: #aaa; margin-bottom: 8px; font-size: 14px; }
.stage-reward b { color: #ffd666; }
.stage-cost b { color: #8bc34a; }

.stage-team { margin: 20px 0; }
.team-title { font-size: 13px; color: #888; margin-bottom: 8px; }
.team-list { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.team-mini {
    background: #2a2a3e; border-radius: 6px; padding: 8px 12px;
    font-size: 12px; min-width: 100px; text-align: left;
}
.team-mini .star { color: #ffd666; }

.big-btn {
    width: 100%; padding: 14px; font-size: 16px;
    background: #4a6cf7; margin-top: 16px; border-radius: 8px;
}

/* ============ 底部导航 ============ */
.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    display: flex;
    background: #222;
    border-top: 1px solid #333;
    z-index: 50;
}
.nav-btn {
    flex: 1; padding: 16px 4px; border-radius: 0;
    background: transparent; font-size: 13px; color: #888;
}
.nav-btn.active { color: #4a6cf7; background: #2a2a3e; }

/* ============ 抽卡页 ============ */
#gachaPage { padding: 0; padding-bottom: 54px; }
#gachaPage .top-bar { justify-content: flex-start; }
.pool-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pool-card { background: #2a2a3e; border-radius: 8px; padding: 16px; }
.pool-card h3 { color: #4a6cf7; margin-bottom: 10px; }
.pool-btns { display: flex; gap: 8px; }
.pool-btns button { flex: 1; }
.shop-price { font-size: 13px; color: #aaa; margin-bottom: 10px; }
.shop-price b { color: #ffd666; }

.draw-result {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px;
    background: #1a1a2e; border-top: 1px solid #333; max-height: 200px; overflow: auto;
}
.draw-item {
    background: #2a2a3e; border-radius: 6px; padding: 6px 10px; font-size: 13px;
}
.draw-item.frag { color: #8bc34a; }
.draw-item.frag.limit { color: #ff9800; }

/* ============ 商店页 ============ */
#shopPage { padding: 0; padding-bottom: 54px; }

#shopPage #shopList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 16px;
}
#shopPage .shop-item {
    background: #2a2a3e;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}
#shopPage .shop-item:hover {
    background: #3a3a5e;
}
#shopPage .shop-item-name {
    font-size: 14px;
    color: #4a6cf7;
    font-weight: bold;
    margin-bottom: 6px;
}
#shopPage .shop-item-price {
    font-size: 12px;
    color: #aaa;
}
#shopPage .shop-item-price b { color: #ffd666; }

/* ============ 升级页（卡槽） ============ */
#slotPage {
    padding: 0;
    padding-bottom: 54px;
    overflow: hidden;
}

.slot-list {
    flex: 1;
    overflow: hidden;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.slot-card {
    flex: 1;
    background: #2a2a3e;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    overflow: hidden;
}

.slot-card-inner {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}
.slot-role-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #1a1a2e;
}
.slot-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.slot-card-title {
    font-size: 15px;
    color: #4a6cf7;
    margin-bottom: 4px;
    font-weight: bold;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.slot-role-power {
    color: #ff5252;
    font-size: 13px;
    font-weight: normal;
    margin-left: 12px;
}
.slot-role-attr {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
}
.slot-role-empty {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.slot-card-level {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 4px;
}
.slot-card-level b { color: #ffd666; font-size: 15px; }

.slot-card-need {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.slot-card-need b { color: #ccc; }

.slot-card-btns {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.slot-card-btns button {
    flex: 1;
    padding: 6px 8px;
    font-size: 13px;
    min-width: 0;
}
.slot-card-btns button.warn { background: #e6a23c; }
.slot-card-btns button.warn:hover { background: #d4942f; }

.slot-equip-btn {
    padding: 2px 10px;
    font-size: 12px;
    background: #4a6cf7;
    border-radius: 4px;
    flex-shrink: 0;
    margin: 0;
}

/* ============ 装备抽取页 ============ */
#equipGachaPage { padding: 0; padding-bottom: 54px; }

.equip-gacha-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eq-draw-btns {
    display: flex;
    gap: 8px;
}
.eq-draw-btns button {
    flex: 1;
    margin-top: 0;
}

.rate-title {
    font-size: 14px;
    color: #4a6cf7;
    font-weight: bold;
    margin-top: 8px;
}
.rate-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rate-item {
    display: flex;
    justify-content: space-between;
    background: #2a2a3e;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
}

/* 品质颜色 */
.q1 { color: #aaa; }
.q2 { color: #4caf50; }
.q3 { color: #4a6cf7; }
.q4 { color: #ff9800; }
.q5 { color: #ff5252; }
.q6 { color: #ff69b4; }

/* ============ 竞技场 ============ */
.arena-entry-btn {
    position: fixed;
    left: 16px;
    bottom: 70px;
    z-index: 60;
    padding: 10px 16px;
    font-size: 14px;
    background: #e6a23c;
    border-radius: 8px;
}
.arena-entry-btn:hover { background: #d4942f; }

#arenaPage {
    height: calc(100vh - 54px);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.arena-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 12px 16px;
}

.arena-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arena-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2a2a3e;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}
.arena-rank {
    width: 36px;
    text-align: center;
    font-weight: bold;
    color: #ffd666;
    flex-shrink: 0;
}
.arena-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.arena-power {
    color: #ff5252;
    font-size: 13px;
    flex-shrink: 0;
}
.arena-challenge-btn {
    padding: 4px 12px;
    font-size: 12px;
    background: #4a6cf7;
    flex-shrink: 0;
}
.arena-self {
    color: #888;
    font-size: 12px;
    flex-shrink: 0;
}
.arena-load-more {
    text-align: center;
    padding: 12px;
    color: #666;
    font-size: 13px;
}

/* ============ 邮箱 ============ */
.mail-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff5252;
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
}

#mailModal { padding: 16px; }

.mail-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mail-item {
    background: #2a2a3e;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.mail-item:hover { background: #3a3a5e; }
.mail-item.unread { border-left: 3px solid #ff5252; }
.mail-item-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mail-item.unread .mail-item-title { color: #ffd666; font-weight: bold; }
.mail-item-time {
    font-size: 11px;
    color: #888;
    flex-shrink: 0;
}

.mail-bottom {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    flex-shrink: 0;
}
.mail-bottom button { flex: 1; }
.mail-bottom button:last-child { background: #e6a23c; }
.mail-bottom button:last-child:hover { background: #d4942f; }

#mailDetailModal {
    justify-content: center;
    align-items: center;
}
.mail-detail-box {
    background: #222;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.mail-detail-title {
    font-size: 16px;
    color: #4a6cf7;
    font-weight: bold;
    margin-bottom: 6px;
}
.mail-detail-time {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}
.mail-detail-content {
    font-size: 14px;
    color: #ddd;
    line-height: 1.6;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

/* ============ 弹层 ============ */
.overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85); z-index: 100;
    display: flex; flex-direction: column; padding: 16px;
    overflow: auto;
}
.overlay-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 18px; margin-bottom: 12px; flex-shrink: 0;
}
.bag-toolbar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 12px; font-size: 13px;
}
.bag-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.bag-item {
    background: #2a2a3e; border-radius: 6px; padding: 10px; font-size: 13px;
}
.bag-item b { color: #ffd666; }
.bag-item.selectable { cursor: pointer; }
.bag-item.selectable:hover { background: #3a3a5e; }
.bag-item.bag-selectable {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
}
.bag-item.bag-worn {
    opacity: 0.6;
    cursor: default;
}
.bag-check {
    position: absolute;
    left: 8px;
    top: 10px;
}
.bag-check input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.bag-worn .bag-check input {
    cursor: not-allowed;
}
.bag-name {
    font-weight: bold;
}
.bag-attr {
    color: #aaa;
    font-size: 12px;
}
.danger-btn {
    background: #ff5252;
}
.danger-btn:hover {
    background: #e04141;
}
.empty { color: #666; padding: 20px; text-align: center; }

.bag-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.bag-tab {
    flex: 1;
    padding: 8px;
    background: #2a2a3e;
    color: #888;
    border-radius: 6px;
}
.bag-tab.active {
    background: #4a6cf7;
    color: #fff;
}
.bag-tab-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* ============ 布阵 ============ */
.team-tip { font-size: 13px; color: #888; margin-bottom: 12px; }
.team-slots { display: flex; gap: 10px; margin-bottom: 16px; }
.slot {
    flex: 1; background: #2a2a3e; border-radius: 8px;
    padding: 12px; text-align: center; cursor: pointer;
    border: 2px dashed #444;
}
.slot:hover { border-color: #4a6cf7; }
.slot span { font-size: 12px; color: #888; }
.slot-content { margin-top: 8px; font-size: 13px; }

.team-candidates { margin-top: 16px; }

/* ============ 战斗页 ============ */
#battlePage { padding: 0; background: #0f0f1a; }
.battle-top {
    text-align: center; padding: 12px; font-size: 15px;
    background: #1a1a2e; flex-shrink: 0;
}
.battle-top b { color: #ffd666; }
.battle-field {
    flex: 1; display: flex; align-items: center; justify-content: space-around;
    padding: 20px; gap: 20px;
}
.battle-side { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.battle-vs { font-size: 24px; color: #444; font-weight: bold; }

.unit {
    width: 100px;
    margin: 0 auto;
    background: #222;
    border-radius: 8px;
    padding: 6px;
    text-align: center;
    position: relative;
    transition: transform 0.4s;
    overflow: visible;
}
.unit-img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0 auto 4px;
    background: #1a1a2e;
}
.unit-name {
    display: none;
}
.unit-hp-bar {
    height: 8px; background: #333; border-radius: 4px; overflow: hidden;
}
.unit-hp-fill {
    height: 100%; background: #4caf50; transition: width 0.3s;
}
.unit-hp-text { font-size: 11px; color: #888; margin-top: 3px; }

.unit.attacking { transform: scale(1.1); }
.unit.hit { animation: shake 0.5s; background: #5a2020; }
.unit.dead { opacity: 0.3; filter: grayscale(1); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.damage-num {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    color: #ff5252; font-weight: bold; font-size: 10px;
    animation: floatUp 1.5s forwards; pointer-events: none;
    white-space: nowrap;
}
.damage-num.crit { color: #ffd666; font-size: 11px; }

@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -30px); }
}

.stun-label {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: #9c27b0;
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    z-index: 10;
    white-space: nowrap;
}

.battle-bottom {
    padding: 16px; text-align: center; flex-shrink: 0;
}
.skip-btn {
    padding: 10px 30px; background: #555;
}

/* 倍速按钮 */
.speed-btn {
    position: fixed;
    right: 16px;
    bottom: 130px;
    z-index: 60;
    padding: 8px 14px;
    font-size: 13px;
    background: #4a6cf7;
    border-radius: 20px;
    color: #fff;
}
.speed-btn.fast {
    background: #ff9800;
}

/* ============ 结算弹层 ============ */
#battleResult {
    display: flex; justify-content: center; align-items: center;
}
.result-box {
    background: #222; border-radius: 12px; padding: 32px;
    text-align: center; width: 300px;
}
.result-box h2 { color: #4a6cf7; margin-bottom: 16px; }
.result-box p { margin-bottom: 20px; }

/* ============ 设置 / 兑换码弹窗 ============ */
.modal-box {
    background: #222;
    border-radius: 12px;
    padding: 24px;
    width: 360px;
    max-width: 90vw;
    text-align: center;
}
.modal-box.small { width: 300px; }
.modal-title {
    color: #4a6cf7;
    margin-bottom: 16px;
    font-size: 18px;
}
.modal-row {
    text-align: left;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 10px;
}
.modal-row span { color: #ffd666; }
.modal-btns {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.modal-btns button { flex: 1; }
.modal-close {
    margin-top: 12px;
    background: #444;
    width: 100%;
}
#settingModal, #cdkModal, #changeNameModal, #changePassModal, #filterModal, #roleFilterModal {
    justify-content: center;
    align-items: center;
}

/* 筛选行 */
.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}
.filter-row label {
    width: 60px;
    flex-shrink: 0;
    color: #aaa;
}
.filter-row select {
    flex: 1;
}

/* ============ 商店购买弹窗 ============ */
#buyModal {
    justify-content: center;
    align-items: center;
}
.buy-box {
    background: #222;
    border-radius: 12px;
    padding: 20px;
    width: 300px;
    max-width: 90vw;
    text-align: center;
}
.buy-item-name {
    font-size: 15px;
    color: #4a6cf7;
    font-weight: bold;
    margin-bottom: 4px;
}
.buy-price {
    font-size: 12px;
    color: #888;
    margin-bottom: 14px;
}
.buy-range {
    width: 100%;
    margin-bottom: 10px;
    accent-color: #4a6cf7;
}
.buy-input {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}
.buy-total {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 14px;
}
.buy-total b { color: #ffd666; font-size: 15px; }

/* ============ 装备 ============ */
#equipModal {
    padding: 16px;
    background: rgba(0,0,0,0.85);
    z-index: 100;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
}

#equipWornList {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.equip-row {
    display: flex;
    gap: 6px;
}
.equip-row .equip-cell {
    flex: 1;
    min-width: 0;
}
.equip-cell {
    background: #2a2a3e;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    font-size: 11px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    transition: background 0.15s;
}
.equip-cell:hover { background: #3a3a5e; }
.equip-cell-part {
    font-size: 11px;
    color: #888;
}
.equip-cell-name {
    font-weight: bold;
    font-size: 12px;
    word-break: break-all;
}
.equip-cell-attr {
    font-size: 11px;
    color: #aaa;
}
.equip-cell-attr b { color: #ffd666; }
.equip-cell-empty {
    color: #666;
    font-size: 12px;
}

.equip-item-name .q1, .bag-item .q1, .equip-cell-name .q1 { color: #aaa; }
.equip-item-name .q2, .bag-item .q2, .equip-cell-name .q2 { color: #4caf50; }
.equip-item-name .q3, .bag-item .q3, .equip-cell-name .q3 { color: #4a6cf7; }
.equip-item-name .q4, .bag-item .q4, .equip-cell-name .q4 { color: #ff9800; }
.equip-item-name .q5, .bag-item .q5, .equip-cell-name .q5 { color: #ff5252; }
.equip-item-name .q6, .bag-item .q6, .equip-cell-name .q6 { color: #ff69b4; }

/* 选装备弹窗（居中） */
#equipPickModal {
    z-index: 110;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.6);
}
.pick-box {
    background: #222;
    border-radius: 12px;
    padding: 16px;
    width: 90%;
    max-width: 360px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}
.pick-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 15px;
    flex-shrink: 0;
}
.pick-header button {
    padding: 4px 10px;
    font-size: 12px;
}
#pickList {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.equip-item {
    background: #2a2a3e;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}
.equip-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.equip-item-name {
    font-weight: bold;
    font-size: 13px;
}
.equip-item-attr {
    color: #aaa;
    font-size: 12px;
}
.equip-item-attr b { color: #ffd666; }
.equip-item-btns {
    margin-top: 6px;
}
.equip-item-btns button {
    padding: 4px 10px;
    font-size: 12px;
}

/* 装备操作小菜单 */
#equipMenuModal {
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.6);
}
.equip-menu-box {
    background: #222;
    border-radius: 10px;
    padding: 16px;
    width: 200px;
    text-align: center;
}
.equip-menu-title {
    font-size: 14px;
    color: #4a6cf7;
    font-weight: bold;
    margin-bottom: 12px;
}
.equip-menu-box button {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    font-size: 13px;
}

/* ============ 升级池子弹窗 ============ */
#poolUpModal {
    z-index: 200;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.85);
}
.pool-up-box {
    background: #222;
    border-radius: 12px;
    padding: 16px;
    width: 90%;
    max-width: 460px;
    max-height: 85vh;
    overflow-y: auto;
    text-align: center;
}
.pool-up-compare {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.pool-up-col {
    flex: 1;
    min-width: 0;
}
.pool-up-title {
    font-size: 13px;
    color: #4a6cf7;
    font-weight: bold;
    margin-bottom: 6px;
}
.pool-up-arrow {
    display: flex;
    align-items: center;
    font-size: 20px;
    color: #888;
    flex-shrink: 0;
    padding-top: 24px;
}
.pool-up-rates {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pool-up-rates .rate-item {
    font-size: 11px;
    padding: 5px 8px;
}
.pool-up-cost {
    font-size: 13px;
    color: #ffd666;
    margin: 10px 0;
}

/* ============ 备案号 / 版本号 ============ */
.beian-bar {
    position: fixed;
    right: 8px;
    bottom: 56px;
    z-index: 40;
    font-size: 10px;
    color: #666;
    text-align: right;
    line-height: 1.4;
}
.beian-bar a {
    color: #666;
    text-decoration: none;
    display: block;
}
.beian-bar a:hover {
    color: #4a6cf7;
    text-decoration: underline;
}
.version-bar {
    position: fixed;
    left: 8px;
    bottom: 56px;
    z-index: 40;
    font-size: 10px;
    color: #666;
    line-height: 1.4;
}

/* 竞技场玩家详情 */
#arenaPlayerModal {
    padding: 16px;
}
.arena-player-slots {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.arena-slot-card {
    background: #2a2a3e;
    border-radius: 8px;
    padding: 10px 12px;
}
.arena-slot-card .slot-title {
    font-size: 13px;
    color: #4a6cf7;
    font-weight: bold;
    margin-bottom: 4px;
}
.arena-slot-card .slot-info {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 6px;
}
.arena-slot-card .slot-info b { color: #ffd666; }
.arena-slot-card .slot-power { color: #ff5252; }
.arena-slot-empty {
    color: #666;
    font-size: 12px;
}

.slot-equip-title {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}
.slot-equip-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.slot-equip-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    line-height: 1.5;
}
.slot-equip-line .eq-part {
    color: #4a6cf7;
    min-width: 28px;
    flex-shrink: 0;
}
.slot-equip-line .eq-lv {
    color: #888;
    flex-shrink: 0;
}
.slot-equip-line .eq-attr {
    color: #ffd666;
    flex-shrink: 0;
}
/* 竞技场装备 3 行格子 */
.arena-equip-row {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}
.arena-equip-cell {
    flex: 1;
    min-width: 0;
    background: #1a1a2e;
    border-radius: 4px;
    padding: 4px 2px;
    text-align: center;
    font-size: 10px;
    line-height: 1.4;
}
.aec-part {
    color: #888;
    font-size: 9px;
}
.aec-name {
    font-weight: bold;
    font-size: 10px;
    word-break: break-all;
}
.aec-lv {
    color: #888;
    font-size: 9px;
}
.aec-attr {
    color: #ffd666;
    font-size: 9px;
    word-break: break-all;
}
.aec-empty {
    color: #666;
    font-size: 10px;
}