/* ===== 全局重置 · 超小间隔/字体 · 纯白黑 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #0a0a0c;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;               /* 整体上下间距再压缩 */
    position: relative;
    overflow-x: hidden;
    font-size: 10px;                /* 基础字体调小 */
    width: 100%;
}

/* ----- 动态线条背景 · 更淡更细 (保持原样，不动) ----- */
.line-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.25;
}

.line-svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.dynamic-path {
    stroke: #b8b8c0;
    stroke-width: 0.5;
    fill: none;
    stroke-linecap: round;
    animation: flowMove 24s linear infinite;
}

.dynamic-path-reverse {
    stroke: #c8c8d0;
    stroke-width: 0.45;
    fill: none;
    stroke-linecap: round;
    animation: flowMoveReverse 28s linear infinite;
}

@keyframes flowMove {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 100; }
}
@keyframes flowMoveReverse {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

/* ----- 内容容器 · 全宽，移除最大宽度限制，左右内边距再减 ----- */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;                       /* 之前8px → 6px */
    padding: 0 8px;                  /* 之前10px → 8px */
    max-width: none;
}

/* ===== 顶栏 · 无菜单按键，只剩LOGO，更紧凑 (间距再缩) ===== */
.top-bar {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 4px 8px 2px;            /* 上下左右更小 */
    border-bottom: 0.5px solid #ececee;
    margin-bottom: 2px;
    max-width: none;
}

.xmod-logo {
    display: flex;
    align-items: center;
    gap: 4px;                        /* 之前5px → 4px */
}

.logo-icon {
    font-size: 11px;                  /* 之前12px */
    font-weight: 520;
    color: #0a0a0c;
    background: #f5f5f7;
    padding: 2px 6px;                 /* 之前3px8px → 更小 */
    border-radius: 12px;
    border: 0.3px solid #dddddd;
    letter-spacing: 0.4px;
}

.logo-text {
    font-size: 10px;                  /* 之前11px */
    font-weight: 440;
    color: #1c1c1e;
    text-transform: uppercase;
}

/* ===== 余额卡片 · 全宽，内边距缩小 ===== */
.balance-card {
    background: #ffffff;
    border: 0.5px solid #e4e4e9;
    border-radius: 18px;                /* 之前20px */
    padding: 14px 14px;                  /* 之前18px16px → 压缩 */
    box-shadow: 0 3px 10px rgba(0,0,0,0.01);
    backdrop-filter: blur(1px);
    width: 100%;
    border-top: 3px solid #0a0a0c;
    transition: transform 0.1s ease;
    max-width: 100%;
}

.balance-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.02);
}

.balance-label {
    font-size: 9px;                     /* 之前10px */
    color: #6c6c70;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 3px;                  /* 之前5px */
}

.balance-amount {
    font-size: 28px;                     /* 之前32px */
    font-weight: 500;
    color: #0a0a0c;
    display: flex;
    align-items: baseline;
    line-height: 1;
    margin-bottom: 2px;                   /* 之前4px */
}

.balance-amount::before {
    content: '¥';
    font-size: 20px;                      /* 之前22px */
    font-weight: 450;
    margin-right: 2px;
    color: #0a0a0c;
}

.exchange-hint {
    color: #8e8e93;
    font-size: 8px;                       /* 之前9px */
    margin-top: 4px;                       /* 之前8px */
    border-top: 0.5px solid #f2f2f5;
    padding-top: 4px;                      /* 之前8px */
    letter-spacing: 0.1px;
}

/* ===== 充值选项区域 (网格间距缩小) ===== */
.recharge-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;                              /* 之前6px → 4px */
    margin-top: 0px;
    width: 100%;
}

.recharge-card {
    background: #ffffff;
    border: 0.5px solid #e2e2e8;
    border-radius: 12px;                    /* 之前14px */
    padding: 8px 2px;                       /* 之前10px4px → 上下缩小 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #0a0a0c;
    transition: all 0.1s ease;
    position: relative;
    overflow: hidden;
    border-top: 2.5px solid #f0f0f0;
    min-height: 62px;                       /* 之前68px → 减小 */
    width: 100%;
}

.recharge-card:hover {
    border-color: #0a0a0c;
    border-top-color: #0a0a0c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.01);
}

.recharge-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(10,10,12,0.02), transparent);
    transition: left 0.3s ease;
}

.recharge-card:hover::after {
    left: 100%;
}

.cloud-amount {
    font-size: 13px;                         /* 之前14px */
    font-weight: 540;
    color: #0a0a0c;
    margin-bottom: 2px;                       /* 之前3px */
}

.price {
    font-size: 9px;                           /* 之前10px */
    color: #5e5e64;
    font-weight: 380;
}

/* 最后一张998金币独占一行 */
.recharge-card:last-child {
    grid-column: span 3;
}

/* ===== 自定义充值卡片 (内边距缩小) ===== */
.custom-recharge {
    background: #ffffff;
    border: 0.5px solid #e4e4e9;
    border-radius: 18px;                        /* 之前20px */
    padding: 12px 14px;                          /* 之前16px16px → 压缩 */
    box-shadow: 0 3px 10px rgba(0,0,0,0.01);
    margin-top: 2px;                              /* 之前4px */
    border-top: 3px solid #e2e2e6;
    width: 100%;
    max-width: 100%;
}

.custom-recharge h2 {
    font-size: 11px;                              /* 之前12px */
    font-weight: 530;
    color: #0a0a0c;
    margin-bottom: 8px;                            /* 之前12px */
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.input-group {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 10px;                           /* 之前14px */
}

.currency-symbol {
    position: absolute;
    left: 10px;                                     /* 之前12px */
    font-size: 13px;                                /* 之前14px */
    color: #0a0a0c;
    z-index: 2;
    font-weight: 400;
}

.amount-input {
    width: 100%;
    padding: 8px 12px 8px 30px;                     /* 上下10→8，左34→30 */
    background: #ffffff;
    border: 0.5px solid #d8d8df;
    border-radius: 28px;                             /* 之前30px */
    color: #0a0a0c;
    font-size: 11px;                                 /* 之前12px */
    transition: all 0.1s ease;
}

.amount-input:focus {
    outline: none;
    border-color: #0a0a0c;
    background: #ffffff;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.02);
}

.recharge-btn {
    width: 100%;
    padding: 8px 12px;                               /* 之前10px14px → 缩小 */
    background: #0a0a0c;
    border: none;
    border-radius: 28px;                              /* 之前30px */
    color: white;
    font-size: 12px;                                  /* 之前13px */
    font-weight: 460;
    letter-spacing: 1.2px;                            /* 之前1.5px */
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    border: 0.5px solid #2c2c2e;
    position: relative;
    overflow: hidden;
}

.recharge-btn:hover {
    background: #1c1c1e;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.recharge-btn:active {
    transform: translateY(0);
}

.recharge-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
}

.recharge-btn:hover::after {
    transform: translateX(100%);
    transition: transform 0.4s ease;
}

/* 响应式 (微调) */
@media (max-width: 768px) {
    body {
        padding: 6px 0;
    }
    .container {
        padding: 0 6px;                     /* 再小一点 */
    }
    .top-bar {
        padding: 4px 6px 2px;
    }
    .recharge-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    .recharge-card:last-child {
        grid-column: span 2;
    }
    .balance-amount {
        font-size: 26px;                    /* 之前30px */
    }
}

@media (max-width: 480px) {
    .recharge-options {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .recharge-card:last-child {
        grid-column: span 1;
    }
    .logo-text {
        display: none;
    }
}

/* 淡入动画不变 */
.balance-card, .recharge-card, .custom-recharge {
    animation: fadeIn 0.25s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0.8; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

a, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
}

.xmod-footer {
    margin-top: 10px;                               /* 之前14px */
    font-size: 6px;                                 /* 之前7px */
    color: #a1a1ab;
    text-align: center;
    border-top: 0.5px solid #efefef;
    padding-top: 6px;                               /* 之前10px */
    letter-spacing: 0.6px;
    width: 100%;
}

/* 移除所有最大宽度限制 */
body, .container, .top-bar, .balance-card, .custom-recharge {
    max-width: none !important;
}