/* ============================================================
   MT5 充值验证系统 — 全局样式
   设计方向：深色科技感 + 毛玻璃 + 渐变光效
   ============================================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #0d1025 30%, #0d1b3e 60%, #0a0a1a 100%);
    background-attachment: fixed;
    color: #e0e6f0;
    overflow-x: hidden;
}

/* ---------- Canvas 粒子背景 ---------- */
#particlesBg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   公共卡片样式
   ============================================================ */
.form-card,
.confirm-card {
    position: relative;
    z-index: 1;
    width: 440px;
    max-width: 92vw;
    padding: 44px 38px 38px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(102, 126, 234, 0.08) inset;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 卡片顶部光条 */
.form-card::before,
.confirm-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 30px;
    right: 30px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(102, 126, 234, 0.4),
        rgba(0, 212, 255, 0.4),
        rgba(102, 126, 234, 0.4),
        transparent
    );
    border-radius: 1px;
}

/* ============================================================
   表单页卡片头
   ============================================================ */
.card-header {
    text-align: center;
    margin-bottom: 36px;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(0, 212, 255, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.25);
    color: #8899ff;
    animation: iconFloat 3s ease-in-out infinite;
}

.card-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #c0caf0 0%, #8899ff 50%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.card-subtitle {
    font-size: 13px;
    color: rgba(180, 190, 220, 0.6);
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* ============================================================
   输入组
   ============================================================ */
.input-group {
    margin-bottom: 22px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #8899bb;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.label-icon {
    opacity: 0.6;
    flex-shrink: 0;
}

.input-wrapper {
    position: relative;
}

.input-field {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #e0e6f0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.input-field::placeholder {
    color: rgba(180, 195, 220, 0.35);
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow:
        0 0 0 3px rgba(102, 126, 234, 0.08),
        0 0 20px rgba(102, 126, 234, 0.1);
}

/* 输入框底部光条 */
.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #667eea, #00d4ff);
    transition: width 0.35s ease;
    border-radius: 1px;
}

.input-field:focus ~ .input-border {
    width: 80%;
}

/* 错误状态 */
.input-field.input-error {
    border-color: rgba(255, 80, 80, 0.5) !important;
    box-shadow: 0 0 12px rgba(255, 80, 80, 0.15) !important;
    animation: shake 0.45s ease-in-out;
}

/* ============================================================
   错误消息
   ============================================================ */
.error-msg {
    min-height: 22px;
    font-size: 13px;
    color: #ff5c5c;
    text-align: center;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.error-msg.error-msg--visible {
    opacity: 1;
}

/* ============================================================
   提交按钮
   ============================================================ */
.submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.35s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.submit-btn:hover::after {
    opacity: 1;
}

.submit-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 禁用状态 */
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.submit-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Loading 动画 */
.btn-loader {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.btn-loader svg {
    animation: spin 0.8s linear infinite;
}

.submit-btn.is-loading .btn-text {
    visibility: hidden;
}

.submit-btn.is-loading .btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   确认页卡片
   ============================================================ */
.confirm-card {
    text-align: center;
    animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* 成功图标 */
.confirm-icon {
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}

.success-icon {
    color: #4ade80;
}

.icon-circle {
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: drawCircle 0.8s 0.3s ease forwards;
}

.icon-check {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.5s 0.8s ease forwards;
}

/* 错误图标样式 */
.error-icon {
    color: #ff5c5c;
}

.confirm-title {
    font-size: 24px;
    font-weight: 700;
    color: #e0e6f0;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.confirm-title--error {
    color: #ff5c5c;
}

.confirm-desc {
    font-size: 14px;
    color: #8899bb;
    margin-bottom: 32px;
}

/* 信息列表 */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8899bb;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: #c0caf0;
    word-break: break-all;
}

.info-value--highlight {
    font-size: 22px;
    color: #f0c040;
    text-shadow: 0 0 20px rgba(240, 192, 64, 0.3);
    animation: goldPulse 2s ease-in-out infinite;
}

/* 返回按钮 */
.back-btn {
    display: inline-block;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #8899cc;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #fff;
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.15);
}

/* 确认页异常状态 */
.confirm-card--error {
    border-color: rgba(255, 92, 92, 0.2);
}

/* ============================================================
   提币确认页 — 银行卡信息区域
   ============================================================ */
.withdraw-extra-section {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.withdraw-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #8899bb;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 支付错误提示 */
.pay-error {
    font-size: 13px;
    color: #ff5c5c;
    text-align: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(255, 92, 92, 0.08);
    border: 1px solid rgba(255, 92, 92, 0.2);
    border-radius: 8px;
    animation: shake 0.45s ease-in-out;
}

/* 输入框错误状态 */
.input-error {
    border-color: rgba(255, 92, 92, 0.5) !important;
    box-shadow: 0 0 8px rgba(255, 92, 92, 0.15) !important;
}

/* ============================================================
   提示弹窗
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 8, 20, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.modal-overlay--visible {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    width: 340px;
    max-width: 86vw;
    padding: 34px 30px 28px;
    text-align: center;
    background: linear-gradient(160deg, rgba(22, 28, 52, 0.98), rgba(12, 16, 32, 0.98));
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(102, 126, 234, 0.1) inset;
    transform: translateY(16px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay--visible .modal-box {
    transform: translateY(0) scale(1);
}

.modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 50%;
    color: #ff5c5c;
    background: rgba(255, 92, 92, 0.12);
    border: 1px solid rgba(255, 92, 92, 0.3);
    animation: iconFloat 2.4s ease-in-out infinite;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e0e6f0;
    margin-bottom: 10px;
}

.modal-text {
    font-size: 14px;
    line-height: 1.7;
    color: #8899bb;
    word-break: break-all;
    margin-bottom: 24px;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 4px;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 18px rgba(102, 126, 234, 0.35);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.5);
}

.modal-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 进行中状态文字（提交中/验证中） */
.error-msg.error-msg--status {
    color: #8899bb;
}

/* ============================================================
   动画关键帧
   ============================================================ */

/* 卡片淡入上升 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片缩放弹入 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 图标浮动 */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* 抖动 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-6px); }
    20% { transform: translateX(6px); }
    30% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    50% { transform: translateX(-3px); }
    60% { transform: translateX(3px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
    90% { transform: translateX(-1px); }
}

/* 旋转 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* 绘制圆（对勾外圈） */
@keyframes drawCircle {
    to { stroke-dashoffset: 0; }
}

/* 绘制对勾 */
@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

/* 金额金色脉冲 */
@keyframes goldPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(240, 192, 64, 0.2); }
    50%      { text-shadow: 0 0 24px rgba(240, 192, 64, 0.45); }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 480px) {
    .form-card,
    .confirm-card {
        width: 94vw;
        padding: 32px 22px 28px;
    }

    .card-title {
        font-size: 22px;
    }

    .info-value--highlight {
        font-size: 18px;
    }

    .submit-btn {
        font-size: 14px;
        letter-spacing: 2px;
    }
}
