:root { --main: #121212; --sec: #1e1e1e; --accent: #e94560; --text: #e0e0e0; --gold: #f1c40f; --hp: #e74c3c; --mp: #3498db; --stamina: #f39c12; --vip: #ffd700; --btn-green: #2ecc71; }
* { box-sizing: border-box; }
body { margin:0; background:var(--main); color:var(--text); font-family:sans-serif; height:100vh; overflow:hidden; display:flex; flex-direction:column; }

.app-header {
    flex: 0 0 50px;
    background: #141e30;
    display: grid; 
    grid-template-columns: auto 1fr auto;
    align-items: center;
    border-bottom: 1px solid #333;
    padding: 0 10px;
    z-index: 200;
    gap: 10px;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.header-btn {
    background: rgba(255,255,255,0.1);
    color: #ccc;
    border: 1px solid #444;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.header-btn:hover { background: rgba(255,255,255,0.2); }
.header-btn:active { transform: scale(0.95); }

.player-nameplate {
    justify-self: center;
    background: linear-gradient(135deg, #2c3e50, #4a6a8a);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 1px solid #5c7a99;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}
.vip-badge {
    color: var(--vip); font-weight: bold; margin-left: 5px; font-size: 10px; border: 1px solid var(--vip); padding: 0 3px; border-radius: 3px; display:none;
    text-shadow: 0 0 5px var(--vip);
}

.system-bar { 
    background: #000; 
    padding: 5px 6px; 
    font-size: 11px; 
    line-height: 1.6;
    color: #888; 
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    height: 81px; 
    overflow: hidden;
    cursor: pointer;
    transition: height 0.3s ease;
    will-change: height;
    position: relative;
}
.system-bar.expanded {
    cursor: default;
    height: calc(100vh - 50px - 55px - env(safe-area-inset-bottom));
}

#log-box { height: 100%; overflow-y: auto; scroll-behavior: auto; }
.log-line { padding: 0 2px; border-bottom: 1px dashed #222; }
.log-line:last-child { border-bottom: none; }
.log-line b { color: #d35400; font-weight: normal; } 

#toast-container {
    position: fixed; top: 40%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85); color: #fff; padding: 12px 24px; border-radius: 8px;
    z-index: 9999; display: none; text-align: center; font-size: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); border: 1px solid #555; pointer-events: none;
    backdrop-filter: blur(2px); transition: opacity 0.3s;
}

.main-container { flex: 1; overflow-y: auto; padding-bottom: 120px; }
.tab-content { padding:15px; display:none; }
.tab-content.active { display:block; }
.card { background:var(--sec); padding:10px; border-radius:6px; margin-bottom:10px; border:1px solid #333; }
h3 { margin-top: 0; margin-bottom: 10px; }
.row { display:flex; justify-content:space-between; margin-bottom:8px; align-items:center; gap: 8px; }
.row-upgrade { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.row-upgrade .left, .row-item .left { flex-grow: 1; margin-right: auto; }
.btn { background:var(--accent); color:#fff; border:none; padding:8px 12px; border-radius:4px; font-size:14px; cursor: pointer; white-space:nowrap; }
.btn:disabled { background: #555; cursor: not-allowed; opacity: 0.6; }
.btn-vip { background: #8e44ad; }
.btn-heal { background: #27ae60; padding: 2px 6px; font-size: 10px; margin-left: 5px; }
.btn-sell { background: #f39c12; }
.btn-destroy { background: #7f8c8d; }
.btn-open { background: #ffd700; color: #000; font-weight: bold; }
.bar-box { background: #333; height: 8px; width: 60px; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; }
.bar-fill { height: 100%; transition: width 0.3s; } .hp-fill { background: var(--hp); } .mp-fill { background: var(--mp); } .stamina-fill { background: var(--stamina); }
.nav-bar { position: fixed; bottom: 0; width: 100%; height: 55px; background:#1a1a1a; display:flex; border-top:1px solid #333; padding-bottom: env(safe-area-inset-bottom); height: calc(55px + env(safe-area-inset-bottom)); z-index: 100;}
.nav-item { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:12px; color:#666; cursor:pointer; }
.nav-item.active { color:var(--accent); }
.meditate-wrapper { padding: 10px 0 60px 0; }
.quantity-input { width: 60px; background: #333; color: #fff; border: 1px solid #555; text-align: center; border-radius: 3px; padding: 2px;}
.recharge-link { display: block; font-size: 13px; color: var(--accent); text-decoration: none; margin-bottom: 15px; padding: 8px; border: 1px dashed var(--accent); border-radius: 4px; text-align: center; transition: all 0.2s; background: rgba(233, 69, 96, 0.1); }
.price-highlight { font-size: 14px !important; color: var(--vip) !important; font-weight: bold; margin-top: 10px; text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); text-align: center; }
.recharge-ratio { font-size: 12px; color: #888; text-align: center; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.input-group { display: flex; width: 100%; margin-top: 10px; gap: 5px; }
.input-group .form-input { flex-grow: 1; border-radius: 4px; background: #333; color: #fff; border: 1px solid #555; padding: 10px; font-size: 16px; }
.input-group .btn { border-radius: 4px; flex-shrink: 0; font-size: 14px; padding: 0 20px; }
.btn-exchange-lingshi { background-color: var(--btn-green); }
.privilege-list { font-size:13px; line-height:1.8; color:#ccc; margin-top:15px; margin-bottom: 15px; display: inline-block; text-align: left; width: 100%; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 5px;}
.privilege-list b { color: var(--vip); }
.item-desc { font-size: 11px; color: #888; margin-top: 2px; }
.item-sell-price { font-size: 10px; color: var(--gold); }
.btn-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cost-tag { color: #888; font-size: 11px; margin-right: 5px; flex-shrink: 0; }
.craft-info { font-size: 12px; color: #aaa; margin-bottom:15px; line-height: 1.6; }
#login-prompt { padding: 40px 15px; text-align: center; }
#login-prompt p { font-size: 16px; margin-bottom: 20px; }
#login-prompt a { color: var(--accent); text-decoration: none; font-weight: bold; }

.modal-overlay { position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-content { background-color: #252525; margin: auto; padding: 0; border: 1px solid #555; width: 92%; max-width: 500px; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); display: flex; flex-direction: column; max-height: 85vh; }
.modal-header { display: flex; justify-content: space-between; align-items: center; background: #333; padding: 12px 15px; border-bottom: 1px solid #444; border-radius: 10px 10px 0 0; }
.modal-header h3 { margin: 0; color: #eee; font-size: 16px; }
.close-btn { color: #aaa; font-size: 24px; font-weight: bold; cursor: pointer; line-height: 1; padding: 0 5px; }
.close-btn:hover { color: #fff; }
.modal-body { padding: 20px; overflow-y: auto; }

.rank-tabs { margin-bottom: 15px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rank-tabs button { background: #444; border: none; color: #ccc; padding: 6px 12px; border-radius: 15px; font-size: 12px; }
.rank-tabs button:hover, .rank-tabs button.active { background: var(--accent); color: #fff; }
.modal-body table { width: 100%; border-collapse: collapse; font-size: 12px; }
.modal-body th, .modal-body td { border-bottom: 1px solid #444; padding: 8px; text-align: left; }
.modal-body th { background-color: #2a2a2a; color: #aaa; }
.modal-body .loading { text-align: center; padding: 20px; font-style: italic; }

@media (min-width: 768px) { .nav-bar { height: 65px; } .nav-item { font-size: 16px; } }

/* ==================== 核心修改开始 ==================== */
/* 洞府制造次数的样式 */
.craft-count {
    text-align: right;
    font-size: 11px;
    color: #888;
    margin-bottom: 5px !important;
}
/* ==================== 核心修改结束 ==================== */
