/* ==================== 5E跑跑 余额充值 — vue2-5epp 风格（白底+红字） ==================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --red: #C41230;
    --red-dark: #9B0012;
    --red-light: #FFF0F0;
    --bg: #F4F5F7;
    --white: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #6B6B6B;
    --text-tertiary: #999999;
    --border: #EBEDF0;
    --radius: 10px;
    --radius-sm: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 14px;
}

/* 顶部导航（白底+红字，参考 vue2-5epp 顶部条） */
.top-bar {
    background: var(--white);
    padding: 14px 20px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.top-bar .logo { font-size: 16px; font-weight: 700; color: var(--red); letter-spacing: .5px; }
.top-bar .logo-en { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

.container { max-width: 480px; margin: 0 auto; padding: 14px; }

/* 充值活动 banner（参考 vue2-5epp banner 风格） */
.activity-banner {
    background: linear-gradient(135deg, #FFF1F0, #FFE6E6);
    border: 1px solid #FFCCC7;
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 10px;
}
.activity-banner .ab-icon {
    width: 36px; height: 36px; border-radius: 18px;
    background: var(--red); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.activity-banner .ab-body { flex: 1; min-width: 0; }
.activity-banner .ab-title { font-size: 14px; font-weight: 600; color: var(--red-dark); }
.activity-banner .ab-desc  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }

/* 搜索栏 */
.search-bar {
    display: flex; gap: 8px;
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.search-bar input {
    flex: 1; height: 40px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 0 12px; font-size: 14px; outline: none;
    transition: border-color .2s; background: #FAFAFA;
}
.search-bar input:focus { border-color: var(--red); }
.search-bar button {
    height: 40px; padding: 0 18px;
    background: var(--red); color: #fff; border: none;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
    cursor: pointer; white-space: nowrap; transition: background .2s;
}
.search-bar button:active { background: var(--red-dark); }
.search-bar button:disabled { opacity: .6; }

.hint { font-size: 12px; color: var(--text-tertiary); padding: 4px 4px 10px; }

/* 余额卡片（白底+红字，参考 vue2-5epp 卡片） */
.balance-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.balance-card .balance-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.balance-card .balance-row { display: flex; align-items: baseline; }
.balance-card .balance-symbol { font-size: 18px; font-weight: 400; color: var(--red); margin-right: 2px; }
.balance-card .balance-value { font-size: 36px; font-weight: 700; color: var(--red); line-height: 1.1; }
.balance-card .balance-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-top: 10px; }
.uid-tag { background: #F4F5F7; color: var(--text-secondary); padding: 3px 10px; border-radius: 12px; }
.first-tag { padding: 3px 10px; border-radius: 12px; font-weight: 500; }
.first-tag.first { background: #FFF1B0; color: #8B6914; }
.first-tag.regular { background: #E8F5E9; color: #2E7D32; }

/* 用户信息行（三列白卡） */
.info-row { display: flex; gap: 8px; margin-bottom: 12px; }
.info-item {
    flex: 1; background: var(--white); border-radius: var(--radius);
    padding: 12px; text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.info-item .label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 2px; }
.info-item .value { font-size: 13px; font-weight: 500; color: var(--text); word-break: break-all; }

/* 区块标题 */
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 4px 8px; }
.section-title { font-size: 14px; font-weight: 600; }
.section-desc  { font-size: 11px; color: var(--text-tertiary); }

/* 充值区 */
.recharge-box { background: var(--white); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.input-row { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: #FAFAFA; }
.input-prefix { font-size: 16px; color: var(--text-secondary); margin-right: 4px; }
.input-row input { flex: 1; height: 40px; border: none; background: transparent; font-size: 15px; outline: none; }
.recharge-preview { margin: 10px 0; padding: 10px 12px; background: var(--red-light); border-radius: var(--radius-sm); font-size: 12px; color: var(--red-dark); }

/* 按钮 — 弹窗内 .btn-primary/.btn-ghost 改用 flex:1 平分；外层全宽按钮另写 */
.btn-primary {
    flex: 1; height: 40px; line-height: 40px;
    background: var(--red); color: #fff; border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; cursor: pointer; text-align: center;
    transition: background .2s;
}
.btn-primary:active { background: var(--red-dark); }
.btn-primary:disabled { opacity: .55; }
/* 充值区主按钮：单独占据整宽（不被 flex:1 约束） */
.recharge-box .btn-primary { width: 100%; margin-top: 10px; }
.btn-ghost {
    flex: 1; height: 40px; line-height: 40px;
    background: #F4F5F7; color: var(--text-secondary); border: none;
    border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; text-align: center;
}

/* 弹窗 */
.overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 100; align-items: center; justify-content: center; padding: 20px;
}
.overlay.show { display: flex; }
.dialog {
    background: #fff; border-radius: 14px; width: 100%; max-width: 320px;
    overflow: hidden; animation: dialogIn .2s ease;
}
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dialog-title { padding: 18px 18px 6px; font-size: 16px; font-weight: 600; text-align: center; }
.dialog-body  { padding: 6px 18px 12px; font-size: 13px; color: var(--text-secondary); line-height: 1.7; text-align: center; }
.dialog-body p { margin: 2px 0; }

/* 弹窗内的密钥输入框（专用样式） */
.secret-input-row {
    display: flex; align-items: center;
    margin: 12px 16px 0;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 0 10px; background: #FAFAFA;
}
.secret-input-row .secret-icon { font-size: 14px; color: var(--text-secondary); margin-right: 6px; }
.secret-input-row input {
    flex: 1; height: 36px; border: none; background: transparent;
    font-size: 13px; outline: none; letter-spacing: 1px;
}
.secret-input-row input::placeholder { color: var(--text-tertiary); letter-spacing: 0; }

/* 确认弹窗内联错误提示（密钥错误/网络错误等，不关闭弹窗） */
.confirm-error {
    display: none;
    margin: 10px 16px 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #C41230;
    background: #FFF1F0;
    border: 1px solid #FFCCC7;
    border-radius: var(--radius-sm);
}

.dialog-actions { display: flex; gap: 8px; padding: 14px 16px 16px; }

/* 底部 */
.footer { text-align: center; font-size: 11px; color: #BBB; padding: 20px 0 12px; }

/* 加载动画 */
.spinner {
    width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .6s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
