/* ===== 99联储 · 组件样式 ===== */

/* 玻璃卡片 */
.glass {
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .06);
}

.gold-border {
    border: 1px solid rgba(245, 197, 66, .2);
}

/* 闪光动效 */
.shine {
    position: relative;
    overflow: hidden;
}

.shine::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* 扫描线 */
.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: .5;
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* 自定义按钮 */
.btn-gold {
    background: linear-gradient(135deg, #fde68a, #f5c542 40%, #d4a017);
    color: #1a0f00;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(245, 197, 66, .3), 0 0 0 1px rgba(255, 255, 255, .2) inset;
}

.btn-ghost {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
}

/* 不可逆操作（删除、拒绝）的确认按钮 */
.btn-danger {
    background: linear-gradient(135deg, #fda4af, #f43f5e 40%, #be123c);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(244, 63, 94, .3), 0 0 0 1px rgba(255, 255, 255, .18) inset;
}

/* 品牌标记：细描边金圈里一个粗体 B（B99 首字母），圈内不填充。
   三处尺寸：登录页 80 / 注册页 64 / 首页 header 36，样式放这里免得三个页面各写一遍。 */
.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid rgba(245, 197, 66, .5);
    color: var(--gold);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    line-height: 1;
    /* 行盒带了下伸部空间，大写字母单靠 flex 居中会显得偏下，压一点底部扶正 */
    padding-bottom: .04em;
}

.logo-mark-lg {
    width: 80px;
    height: 80px;
    border-width: 2px;
    font-size: 38px;
    animation: logoPulse 3s ease-in-out infinite;
}

.logo-mark-md {
    width: 64px;
    height: 64px;
    font-size: 30px;
}

.logo-mark-sm {
    width: 36px;
    height: 36px;
    font-size: 17px;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 197, 66, .1); }
    50% { box-shadow: 0 0 40px rgba(245, 197, 66, .25); }
}

/* 进度条 */
.progress-bar {
    transition: width 1s ease-in-out;
}

/* 表单输入 */
.input-dark {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    width: 100%;
    transition: border-color .2s;
}

.input-dark:focus {
    border-color: rgba(245, 197, 66, .4);
}

.input-dark::placeholder {
    color: rgba(255, 255, 255, .25);
}

/* 选择器 */
.select-dark {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

/* 用按钮触发自绘选择层时复用 .select-dark 的外观。
   不用原生 select：老 Android WebView 里点 select 不弹下拉，用户看到的就是
   「点了没反应」（宿主 App 的弹层问题，前端改 CSS 修不了）。 */
button.select-dark {
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

/* 金额输入框右侧的币种选择：定宽，切换币种时整行不跟着抖。
   它是一个触发自绘选择层的按钮，不是原生 select——老 Android WebView 的
   fixed 弹窗里原生下拉弹不出来（见 app.js openStakeCurrencyPicker 的说明）。 */
.select-dark.select-unit {
    width: 84px;
    padding: 0 24px 0 0;
    font-size: 12px;
    font-family: inherit;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-position: right 10px center;
}

/* 弹窗遮罩 */
.modal-overlay {
    position: fixed;
    /* 四个方向分开写，不用 inset 简写：老 Android WebView（含微信 X5 内核，
       Chromium < 87）不支持 inset，忽略后退回静态位置，弹窗会被排到页面末尾
       （通常整块在屏幕下方），用户看到的就是「点了没反应」。 */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--bg2);
    border: 1px solid rgba(245, 197, 66, .15);
    border-radius: 20px;
    padding: 24px;
    width: calc(100% - 40px);
    max-width: 380px;
    animation: modalUp .3s ease;
}

@keyframes modalUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 3000;
    animation: toastFade 2s ease;
}

@keyframes toastFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.9); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(.9); }
}

/* 通用列表项 */
.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.list-row:last-child {
    border-bottom: none;
}
