:root {
    --primary-color: #007FE9;          /* 主色（亮蓝）*/
    --primary-color-dark: #0061B1;     /* 深色（悬停/按下）*/
    --primary-glow-50: rgba(0,127,233,0.5);
    --primary-glow-30: rgba(0,127,233,0.3);
    --primary-glow-20: rgba(0,127,233,0.2);
    --btn-border-color: #707A8A;
    --bg-image: url("/apps/img/bj.png");
}

body {
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #0f172a;
    color: #e2e8f2;
    font-family: 'Arial', sans-serif;
}

.main-wrapper {
    max-width: 425px;
    width: 100%;
    margin: 0 auto; /* 水平居中 */
    padding: 16px;
    box-sizing: border-box;
}

.gradient-border {
    position: relative;
    border-radius: 10px;
    padding: 1px;
    background: var(--bg-image) center center / cover;
    box-shadow: 0 0 3px var(--primary-glow-50), 0 0 6px var(--primary-glow-30), 0 0 9px var(--primary-glow-20);
}

.gradient-border::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: inherit;
    background: var(--primary-glow-50);
    z-index: -1;
    filter: blur(10px);
}

input[type="text"], input[type="number"] {
    background-color: #142546;
    color: white;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-glow-50);
}

.purchase-btn {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid var(--btn-border-color); /* 和 language-toggle 相同的灰色边框 */
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.purchase-btn:hover {
    background-color: #374151;
    color: white;
}

.selected-btn {
    background-color: #374151 !important;
    color: white !important;
}

.purchase-energy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 12px 24px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.purchase-energy-btn:hover {
    background-color: var(--primary-color-dark);
}

.custom-wallet-icon {
    width: 1.5em; /* 调整图标大小 */
    height: 1.5em;
    background-image: url('/apps/img/wallet-s3.svg'); /* 替换为你的SVG图标路径 */
    background-size: contain; /* 确保图标按比例缩放 */
    background-repeat: no-repeat;
    display: inline-block;
    vertical-align: middle;
}

/* 背景滑动效果 */
.slider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease;
}

.text-orange {
    color: #FFA500; /* 橙色 */
}

/* 内联 SVG 的填色统一替换为主色（已对 # 转义为 %23）*/
.i-local\:tron-wallet-s3 {
    background: transparent url("data:image/svg+xml;utf8,%3Csvg display='inline-block' flex='none' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23'%3E%3Cg%3E%3Cpath d='M54.433,81.108,49.821,83.77H47.5l6.686-3.86a.773.773,0,0,1,1.056.283l2.065,3.577h1.585a.773.773,0,0,1,.773.773V94.589a.773.773,0,0,1-.773.773H43.439a.773.773,0,0,1-.773-.773V84.544a.773.773,0,0,1,.773-.773H55.97l-1.537-2.663Z' fill='%237C3AED'/%3E%3C/g%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    display: inline-block;
    flex: none;
    height: 1em;
    vertical-align: middle;
    width: 1em;
}

.i-local\:bandwidth-s2 {
    background: transparent url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='25' height='25' fill='%237C3AED'%3E%3Cpath d='M512 457.088A55.04 55.04 0 0 1 566.912 512 ...'/%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    display: inline-block;
    flex: none;
    height: 1em;
    vertical-align: middle;
    width: 1em;
}

.i-local\:energy-s2 {
    background: transparent url("data:image/svg+xml;utf8,%3Csvg display='inline-block' flex='none' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 23 23'%3E%3Cg%3E%3Cpath d='M326.24,217.425a.538.538,0,0,1-.193-.039...' fill='%237C3AED'/%3E%3C/g%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    display: inline-block;
    flex: none;
    height: 1em;
    vertical-align: middle;
    width: 1em;
}

.i-local\:reverse-currency\?mask {
    --un-icon: url("data:image/svg+xml;utf8,%3Csvg display='inline-block' flex='none' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' width='45' height='45' viewBox='0 0 31 31'%3E%3Cg id='页面-1' transform='translate(0)'%3E%3Cg id='画板备份-2' transform='translate(0)'%3E%3Cg id='转换icon'%3E%3Cpath id='形状' d='M19.1,14.689a.978.978,0,0,1,.554.171l10.266,7.053a.917.917,0,0,1,.23,1.3.945.945,0,0,1-.213.212L19.667,30.817a.978.978,0,0,1-1.342-.195.916.916,0,0,1-.188-.555V25.312H9.744Q.772,25.361,0,16.688c.52.529,2.791,3.652,9.744,3.652q6.952,0,8.393-.155V15.623A.947.947,0,0,1,19.1,14.689ZM12.675.378a.916.916,0,0,1,.188.555V5.688h8.393q8.972-.05,9.744,8.624c-.52-.529-2.791-3.652-9.744-3.652q-6.953,0-8.393.155v4.561a.947.947,0,0,1-.96.933.978.978,0,0,1-.554-.171L1.084,9.087a.917.917,0,0,1-.23-1.3.945.945,0,0,1,.213-.212L11.333.183a.978.978,0,0,1,1.342.195Z' transform='translate(31) rotate(90)' fill='%232a47ab'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-color: currentColor;
    color: var(--primary-color);
    display: inline-block;
    flex: none;
    height: 1em;
    -webkit-mask: var(--un-icon) no-repeat;
    mask: var(--un-icon) no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    vertical-align: middle;
    width: 1em;
}

.i-local\:tg-s4 {
    background: transparent url("data:image/svg+xml;utf8,%3Csvg display='inline-block' flex='none' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cg id='组_58' data-name='组 58' transform='translate(-1448 -23)'%3E%3Ccircle id='椭圆_1' data-name='椭圆 1' cx='15' cy='15' r='15' transform='translate(1448 23)' fill='%23266ef1'/%3E%3Cpath id='路径_2' data-name='路径 2' d='M332.045,240.734l4.361,1.8,2.612-15.137-16.278,8.963,4.31,2.307,8.773-7.872-7.049,8.672-.025,4.082Z' transform='translate(1131.261 -197.397)' fill='%23e2e8f2'/%3E%3C/g%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    display: inline-block;
    flex: none;
    height: 1em;
    vertical-align: middle;
    width: 1em;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

#walletContent {
    animation-duration: 0.35s;
    animation-fill-mode: both;
    transition: none;
}

.wallet-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: 500px;
    transform: translate(-50%, -50%);
    z-index: 60;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
}

.wallet-modal-content {
    margin: 0 auto;
    width: 100%;
    border-radius: 10px;
    padding: 24px 16px;
    background: #0c1530;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.wallet-slide-in {
    animation-name: slideInFromRight;
}

.wallet-slide-out {
    animation-name: slideOutToRight;
}

.wallet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 6px;
    width: calc(50% - 6px);
    background: #1f2a48;
    padding: 6px 8px;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wallet-item:hover {
    background: #273654;
}

.wallet-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.wallet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 59;
}

.wallet-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #aaa;
    cursor: pointer;
    font-weight: bold;
}

.wallet-close-btn:hover {
    color: white;
}

/* confirmModal 外层控制 */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 59;
}

/* 隐藏用 */
.confirm-modal.hidden {
    display: none;
}

/* 背景模糊层 */
.confirm-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 59;
}

/* 弹窗定位 */
.confirm-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 60;
    min-width: 300px;
}

/* 渐变发光边框 */
.confirm-gradient-border {
    position: absolute;
    border-radius: 16px;
    padding: 2px; /* 边框厚度 */
    background: var(--bg-image) center center / cover;
    box-shadow: 0 0 3px var(--primary-glow-50),
    0 0 6px var(--primary-glow-30),
    0 0 9px var(--primary-glow-20);
}

.confirm-gradient-border::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: inherit;
    background: var(--primary-glow-50);
    z-index: -1;
    filter: blur(12px);
}

/* 弹窗内容样式 */
.confirm-modal-content {
    background: #0c1530;
    border-radius: 12px;
    padding: 20px;
    color: white;
    font-family: sans-serif;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* 更柔和的内容投影 */
    width: auto; /* 宽度自动调整，依内容自适应 */
    max-width: none; /* 去除最大宽度限制 */
    white-space: nowrap; /* 不允许换行 */
    overflow-x: auto; /* 如果内容超出，允许水平滚动 */
}

/* p 内容样式 */
.confirm-modal-content p {
    background-color: #142546;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    white-space: nowrap; /* 不允许换行 */
    overflow-x: auto; /* 超出时允许水平滚动 */
    text-overflow: ellipsis; /* 如果文本超出显示... */
}

/* 按钮样式 */
.confirm-btn {
    margin-top: 24px;
    margin-left: 6px; /* 添加左间隔 */
    margin-right: 6px; /* 添加右间隔 */
    background: #1f2a48;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 48%; /* 确保按钮宽度适中，不至于填满整个容器 */
}

/* 信息框滑动显示的动画 */
@keyframes slideIn {
    0% {
        top: 0;
        opacity: 0;
    }
    100% {
        top: 20px;
        opacity: 1;
    }
}

/* 错误提示样式 */
.message-error {
    background-color: #f44336;
}

/* 成功提示样式 */
.message-success {
    background-color: #4caf50;
}

/* 警告提示样式 */
.message-warning {
    background-color: #ff9800;
}

/* 图标样式 */
.anticon {
    font-size: 20px;
    margin-right: 8px;
    color: #fff;
}

.message-content span {
    font-size: 14px;
    color: #fff;
}

/* 自动隐藏动画效果 */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        top: -50px;
    }
}

/* 用于消失的过渡动画 */
.message-box.hide {
    animation: fadeOut 0.5s ease-in forwards;
}

.partner-logo {
    width: 50px;
    height: 50px;
    margin-right: 1rem;
    object-fit: contain;
    border-radius: 50%;
    transition: opacity 0.3s ease-in-out;
}

.partner-logo:hover {
    opacity: 1;
}

.partners-track {
    display: flex;
    animation: seamless-scroll 25s linear infinite;
}

@keyframes seamless-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.partners-container {
    max-width: 100%;
}

.light-sweep-blue {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            rgba(124,58,237,0) 0%,
            rgba(124,58,237,0.3) 50%,
            rgba(124,58,237,0) 100%
    );
    animation: sweep 4s linear infinite;
    z-index: 1;
}

@keyframes sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

#language-select {
    background-color: #1f2937; /* 深灰色背景 */
    color: white; /* 白色字体 */
    border: 1px solid #4b5563; /* 边框颜色 */
    padding: 6px 12px;
    border-radius: 6px;
    appearance: none;
}

.relative.z-10 {
    position: relative;
    z-index: 10;
}

.additional-text {
    white-space: pre-wrap;
    word-wrap: break-word; /* 强制在长单词或 URL 处换行 */
    word-break: break-word; /* 确保长字符串能够断开 */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.waitLoader {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    border: 3px solid #ccc;
    border-top-color: #fff;
    border-radius: 50%;
    animation: waitLoader-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes waitLoader-spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-container {
    width: 160px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    animation: progress-fill 20s linear forwards;
    border-radius: 3px;
}

@keyframes progress-fill {
    to {
        width: 100%;
    }
}

.warning-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEgMjFIMjNMMTIgMiAxIDIxWiIgZmlsbD0iI0ZCQkYyNCIgc3Ryb2tlPSIjRjU5RTBCIiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0iTTEyIDhWMTMiIHN0cm9rZT0iIzkyNDAwRSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPGNpcmNsZSBjeD0iMTIiIGN5PSIxNyIgcj0iMS41IiBmaWxsPSIjOTI0MDBFIi8+Cjwvc3ZnPg==");
    background-repeat: no-repeat;
    background-size: contain;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.waiting-text {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
}

.faq-arrow,
.i-local\:faq-arrow {
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24"><path d="M6 7l6 6 6-6"/><path d="M6 15l6 6 6-6"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24"><path d="M6 7l6 6 6-6"/><path d="M6 15l6 6 6-6"/></svg>');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
    transition: transform 0.25s ease-in-out;
}

.faq-arrow.rotate-180 {
    transform: rotate(180deg);
}

#messageBox {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 90%;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-family: sans-serif;
    color: #fff;
    z-index: 3000;
    display: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: all 0.4s ease;
    opacity: 0;
}
