/* 全局重置 & 移动端适配基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f7f9fc 0%, #eef2ff 50%, #e0e7ff 100%);
    color: #1e293b;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 20px;
    min-height: 100vh;
}

/* 页面容器 路由切换控制 */
.page-wrap {
    display: none;
    width: 100%;
}

.page-wrap.active {
    display: block;
}

/* 头部标题 */
.page-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.page-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    text-align: center;
}

.page-tips {
    font-size: 16px;
    color: #fd5d01;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* 通用卡片样式 */
.card {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 30px 24px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

/* 输入框外层容器（用于放置图标） */
.input-box {
    position: relative;
}

.input-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #94a3b8;
}

/* 输入框样式 */
.input-wrap {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 14px;
    color: #475569;
    margin-bottom: 10px;
}

.code-input {
    width: 100%;
    height: 52px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 16px 0 46px;
    color: #1e293b;
    font-size: 16px;
    letter-spacing: 2px;
    outline: none;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.code-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* 通用按钮样式 */
.btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.btn:active {
    opacity: 0.85;
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.btn-success {
    background: linear-gradient(90deg, #10b981, #059669);
}

.btn-danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
}

/* 成功页面 顶部大图标 */
.status-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
}

.icon-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.icon-error {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* 业务信息列表项 */
.info-item {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    flex-shrink: 0;
}

.info-left {
    flex: 1;
}

.info-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.info-value {
    font-size: 15px;
    color: #1e293b;
    font-weight: 500;
}

/* 底部提示文字 */
.tips-text {
    margin-top: 30px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
}

/* 按钮间距 */
.btn-gap {
    margin-top: 16px;
}

.business-logo {
    width: 96px;
    height: 96px;
    display: block;
    margin: 0 auto 16px;
    border-radius: 12px;
    object-fit: contain;
}


/* ========== 扫码登录卡片样式 ========== */
.login-card {
    padding: 14px 20px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

/* 固定尺寸 220*220，相对定位作为参照物 */
.qrcode-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 24px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

/* 二维码图片 绝对居中 */
.qrcode-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    display: none;
}

.qrcode-img.show {
    display: block;
}

/* 占位图标 绝对居中，和图片同一中心点 */
.qrcode-placeholder {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
    width: 100%;
}

.qrcode-placeholder i {
    font-size: 64px;
    margin-bottom: 10px;
    display: block;
}

.qrcode-placeholder p {
    font-size: 14px;
    margin: 0;
}

.btn-group {
    display: flex;
    gap: 14px;
}

.btn-group .btn {
    flex: 1;
    height: 46px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.btn-wechat {
    background-color: #07c160;
    color: #fff;
}

.btn-qq {
    background-color: #12b7f5;
    color: #fff;
}

/* ============账号确认卡片============= */
.account-select-box {
    display: none;
}

.account-select-box.show {
    display: block;
}

.account-item {
    display: flex;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.account-item:hover {
    background-color: #f8fafc;
}

/* 选中高亮样式 */
.account-item.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

.acc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.acc-info {
    flex: 1;
}

.acc-name {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
}

.acc-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

/* Layui单选居中修复 */
.layui-form-radio {
    margin: 0 !important;
    vertical-align: middle;
}

/* 选中标签 */
.acc-selected-tag {
    color: #6366f1;
    font-size: 13px;
    font-weight: 500;
    display: none;
    flex-shrink: 0;
}

.account-item.active .acc-selected-tag {
    display: block;
}

/* ========== 充值结果卡片样式 ========== */
.recharge-result-box {
    display: none;
}

.recharge-result-box.show {
    display: block;
}

.result-info-wrap {
    margin: 20px 0 1px;
}

/* 改造数据行：左标题 右数值 */
.info-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    flex-shrink: 0;
}

.info-left {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.info-label {
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
}

.info-value {
    font-size: 15px;
    color: #1e293b;
    font-weight: 500;
    text-align: right;
    max-width: 75%;
    word-break: break-all;
}

/* 状态标签样式 */
.status-tag {
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* 充值中 - 橙色 */
.status-pending {
    background: rgba(249, 115, 22, 0.13);
    color: #f97316;
}

/* 充值成功 - 绿色 */
.status-success {
    background: rgba(16, 185, 129, 0.13);
    color: #10b981;
}

/* 充值失败 - 红色 */
.status-fail {
    background: rgba(239, 68, 68, 0.13);
    color: #ef4444;
}


#resultStatusIcon {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #6366f1, #22d3ee);
    background-size: 300% 300%;
    animation: flowBorder 4s ease infinite;
}

@keyframes flowBorder {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#resultAvatarImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background-color: #ffffff;
}

#resultAvatarImg:not([src]),
#resultAvatarImg[src=""] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 448 512'%3E%3Cpath d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z'/%3E%3C/svg%3E");
}

/* ===== 手机号短信登录表单新增样式 ===== */
.sms-row-wrap {
    display: flex;
    gap: 10px;
}

.sms-input-cell {
    flex: 1;
    position: relative;
    height: 52px;
}

.btn-sms-get {
    width: 120px;
    height: 52px;
    flex-shrink: 0;
}

/* 修复图标视觉偏移：专门处理input-box内fa图标 */
.input-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 18px;
    color: #94a3b8;
    line-height: 1;
}
