/* ============================================================
   全局样式
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #0a0520;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================================
   背景
   ============================================================ */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0520 0%, #1a0b3d 50%, #2d1055 100%);
    z-index: -2;
}

.bg-stars {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(168, 85, 247, 0.4), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(217, 70, 239, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(139, 92, 246, 0.2), transparent);
    background-size: 200% 200%;
    animation: twinkle 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================================
   顶部导航
   ============================================================ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(26, 11, 61, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    filter: drop-shadow(0 2px 8px rgba(251, 146, 60, 0.3));
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #fb923c 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh {
    padding: 6px 10px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: #a855f7;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-refresh:active {
    transform: scale(0.95);
}

.refresh-icon.spinning {
    animation: spin 0.5s linear;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wallet-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(217, 70, 239, 0.2) 100%);
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 10px;
    color: #a855f7;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.wallet-btn:active {
    transform: scale(0.95);
}

.wallet-btn.connected {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.1);
}

/* ============================================================
   主容器
   ============================================================ */
.container {
    padding: 20px;
    padding-bottom: 100px;
    max-width: 480px;
    margin: 0 auto;
}

/* ============================================================
   英雄卡片
   ============================================================ */
.hero-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(217, 70, 239, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ---- 余额 ---- */
.balance-section {
    margin-bottom: 16px;
}

.balance-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-amount {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}

.balance-amount .num-integer {
    font-size: 36px;
    font-weight: 800;
}

.balance-amount .num-decimal {
    font-size: 26px;
    font-weight: 500;
}

/* ============================================================
   生息区域 - 优化后（内边距减小，按钮精简）
   ============================================================ */
.interest-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 90px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    transition: all 0.3s;
}

.interest-section.inactive {
    opacity: 0.7;
}

.interest-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.interest-label {
    font-size: 12px;
    color: rgba(251, 191, 36, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.interest-value {
    font-size: 22px;
    font-weight: 700;
    color: #fbbf24;
    font-family: 'Courier New', monospace;
    line-height: 1.2;
    min-height: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
    transition: all 0.3s ease-out;
    display: inline-flex;
    align-items: flex-end;
}

.interest-section.inactive .interest-value {
    color: rgba(255, 255, 255, 0.4);
    text-shadow: none;
}

/* DigitRoller 样式 */
.interest-value .plus-sign {
    font-size: 22px;
    font-weight: 700;
    color: #fbbf24;
    line-height: 28px;
    margin-right: 2px;
}

.interest-value .integer-part {
    font-size: 22px;
    font-weight: 700;
    color: #fbbf24;
    line-height: 28px;
}

.interest-value .dot-part {
    font-size: 22px;
    font-weight: 700;
    color: #fbbf24;
    line-height: 28px;
}

.interest-value .digit-roller {
    display: inline-block;
    height: 28px;
    overflow: hidden;
    vertical-align: bottom;
    width: 14px;
    text-align: center;
}

.interest-value .digit-roller .digit-track {
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 22px;
    font-weight: 700;
    line-height: 28px;
}

.interest-value .digit-roller .digit-track .digit-item {
    height: 28px;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.interest-value .digit-roller .digit-track .digit-item.highlight {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

.interest-countdown {
    font-size: 12px;
    color: rgba(251, 191, 36, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 18px;
    line-height: 1.3;
}

/* ============================================================
   按钮 - 保持内边距不变，精简文字
   ============================================================ */
.interest-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    min-width: 70px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.interest-btn:active {
    transform: scale(0.95);
}

/* 开启生息 - 高亮金色 + 脉冲 */
.interest-btn.activate {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a0b3d;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.5);
    animation: btnPulse 1.5s ease-in-out infinite;
}

/* 领取利息 - 金色 */
.interest-btn.claim {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a0b3d;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

/* 禁用状态 */
.interest-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none !important;
    transform: none !important;
}

/* 脉冲动画 */
@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 35px rgba(251, 191, 36, 0.7);
        transform: scale(1.02);
    }
}

/* ============================================================
   绑定入口
   ============================================================ */
.bind-entry {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    animation: bindPulse 2s ease-in-out infinite;
}

@keyframes bindPulse {
    0%, 100% { border-color: rgba(251, 191, 36, 0.4); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.1); }
    50% { border-color: rgba(251, 191, 36, 0.8); box-shadow: 0 0 20px rgba(251, 191, 36, 0.15); }
}

.bind-entry-text {
    font-size: 14px;
    font-weight: 600;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bind-entry-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 10px;
    color: #1a0b3d;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.bind-entry-btn:active {
    transform: scale(0.95);
}

/* ============================================================
   功能卡片
   ============================================================ */
.section-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- 状态徽章 ---- */
.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 10px;
}

.status-badge.on {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.off {
    background: rgba(251, 191, 36, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.none {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- 社区卡片 ---- */
.community-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.community-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.community-value {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.community-value.gold {
    color: #fbbf24;
}

.community-value.purple {
    color: #a855f7;
}

.community-value.green {
    color: #10b981;
}

/* ---- 汇率 ---- */
.exchange-rate {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.exchange-rate .rate-number {
    font-weight: 700;
    color: #a855f7;
}

/* ---- Tab ---- */
.tab-group {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 18px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(217, 70, 239, 0.3) 100%);
    color: #fff;
    border: 1px solid rgba(168, 85, 247, 0.5);
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.3);
}

/* ---- 输入框 ---- */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-label .balance-display {
    font-weight: 700;
    color: #fff;
}

.input-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    flex-wrap: nowrap;
    overflow: hidden;
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.input-wrapper.error {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    outline: none;
    min-width: 0;
    width: 0;
    flex: 1 1 auto;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-wrapper input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.max-btn {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(217, 70, 239, 0.2) 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #a855f7;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 50px;
    text-align: center;
    line-height: 1.2;
}

.max-btn:active {
    transform: scale(0.95);
}

.max-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---- "将获得" ---- */
.will-receive-row {
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.will-receive-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.will-receive-value {
    font-size: 18px;
    font-weight: 800;
    color: #fbbf24;
    line-height: 1.6;
    word-wrap: break-word;
    flex: 1;
}

/* ---- 主按钮 ---- */
.primary-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.primary-btn:active::before {
    left: 100%;
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   底部导航
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 12px 0 20px;
    background: rgba(26, 11, 61, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 480px;
    margin: 0 auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    min-width: 56px;
}

.nav-item.active {
    background: rgba(168, 85, 247, 0.15);
}

.nav-icon {
    font-size: 24px;
    transition: all 0.3s;
}

.nav-item.active .nav-icon {
    color: #a855f7;
    transform: scale(1.1);
}

.nav-item:not(.active) .nav-icon {
    color: rgba(255, 255, 255, 0.6);
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-item.active .nav-label {
    color: #a855f7;
}

.nav-item:not(.active) .nav-label {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   键盘处理 - 底部导航隐藏
   ============================================================ */
body.keyboard-open .bottom-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateY(100%) !important;
    pointer-events: none !important;
    position: fixed !important;
    bottom: -100px !important;
}

body.keyboard-open .container {
    padding-bottom: 30px !important;
}

/* iOS 额外修复 */
@supports (-webkit-touch-callout: none) {
    body.keyboard-open .bottom-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: translateY(150%) !important;
        position: fixed !important;
        bottom: -200px !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }
}

/* ============================================================
   弹窗
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

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

.modal {
    background: linear-gradient(135deg, rgba(26, 11, 61, 0.95) 0%, rgba(45, 16, 85, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 24px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.default-addr-btn {
    padding: 6px 12px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    color: #a855f7;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.default-addr-btn:active {
    transform: scale(0.95);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-input-group {
    position: relative;
    margin-bottom: 16px;
}

.modal-input-group textarea {
    width: 100%;
    padding: 14px 80px 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: all 0.3s;
    resize: none;
    overflow-y: auto;
    max-height: 56px;
    line-height: 1.4;
    word-break: break-all;
}

.modal-input-group textarea:focus {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.modal-input-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-action-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    color: #a855f7;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.input-action-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.error-msg {
    color: #ef4444;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

.error-msg.show {
    display: block;
}

.fee-info {
    padding: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(251, 191, 36, 0.9);
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.modal-btn:active {
    transform: scale(0.95);
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
}

.toast {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    animation: toastSlideIn 0.3s ease;
    backdrop-filter: blur(20px);
    text-align: center;
}

.toast-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #10b981;
}

.toast-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.toast-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.toast-warning {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #f59e0b;
}

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

/* ============================================================
   加载遮罩
   ============================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay .loading-content {
    background: linear-gradient(135deg, #1a0b3d 0%, #2d1055 100%);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.loading-overlay .spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #a855f7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-overlay .loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 480px) {
    .container { padding: 14px; padding-bottom: 100px; }
    .hero-card { padding: 18px; border-radius: 20px; }
    .balance-amount { font-size: 30px; }
    .balance-amount .num-integer { font-size: 30px; }
    .balance-amount .num-decimal { font-size: 22px; }
    .interest-value { font-size: 18px; }
    .interest-btn { padding: 10px 16px; font-size: 13px; min-width: 60px; }
    .section-card { padding: 16px; border-radius: 16px; }
    .input-wrapper input { font-size: 18px; }
    .max-btn { padding: 6px 12px; font-size: 12px; min-width: 45px; }
    .will-receive-value { font-size: 16px; }
    .primary-btn { padding: 14px; font-size: 15px; }
    .bottom-nav { padding: 10px 0 16px; }
    .nav-item { padding: 6px 12px; min-width: 48px; }
    .nav-icon { font-size: 20px; }
    .nav-label { font-size: 10px; }
    .logo-text { font-size: 16px; }
    .logo-img { width: 30px; height: 30px; }
    .bind-entry { flex-direction: column; text-align: center; }
    .bind-entry-btn { width: 100%; }
}

@media (max-width: 375px) {
    .balance-amount { font-size: 26px; }
    .balance-amount .num-integer { font-size: 26px; }
    .balance-amount .num-decimal { font-size: 18px; }
    .interest-value { font-size: 15px; }
    .interest-btn { padding: 8px 12px; font-size: 12px; min-width: 50px; }
    .input-wrapper input { font-size: 16px; }
    .top-bar { padding: 10px 14px; }
    .wallet-btn { padding: 6px 12px; font-size: 12px; }
}

/* iOS 修复 */
@supports (-webkit-touch-callout: none) {
    .section-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(26, 11, 61, 0.8) !important; border: 1px solid rgba(168, 85, 247, 0.4) !important; }
    .hero-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .input-wrapper { background: rgba(255, 255, 255, 0.08) !important; }
}