/* ==================== 钱包页面样式 - 现代化设计 ==================== */

/* 页面整体背景 */
#wallet-page {
    background: linear-gradient(180deg, #f0f9ff 0%, #fafbfc 50%, #ffffff 100%);
}

/* ==================== 顶部导航栏 ==================== */
#wallet-page .wallet-header {
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    backdrop-filter: blur(10px);
}

#wallet-page .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

#wallet-page .title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#wallet-page .header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

#wallet-page .wallet-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 7px 15px 7px 11px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#wallet-page .wallet-back-btn:hover {
    background: transparent;
    transform: translateX(-3px);
}

#wallet-page .wallet-back-btn:active {
    transform: translateX(-1px) scale(0.98);
}

#wallet-page .wallet-back-btn i {
    font-size: 14px;
}

#wallet-page .setting-btn {
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
}

#wallet-page .setting-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}


/* ==================== 内容容器 ==================== */
#wallet-page .content-container {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 16px 30px;
    background: linear-gradient(180deg, #f0f9ff 0%, #fafbfc 50%, #ffffff 100%);
    -webkit-overflow-scrolling: touch;
}

/* 确保内容区域填充整个可视区域 */
#wallet-page .content-container::after {
    content: "";
    display: block;
    height: 1px;
    width: 100%;
}

/* ==================== 资产卡片 - 高级渐变设计 ==================== */
#wallet-page .asset-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

/* 装饰性背景元素 */
#wallet-page .asset-card::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

#wallet-page .asset-card::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10px, -10px) scale(1.05); }
}

#wallet-page .asset-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

#wallet-page .amount-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.5px;
}

#wallet-page .amount-text strong {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin-left: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

#wallet-page .eye-btn {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

#wallet-page .eye-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#wallet-page .asset-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    letter-spacing: 0.3px;
}

#wallet-page .asset-btns {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

#wallet-page .btn {
    flex: 1;
    height: 42px;
    border-radius: 21px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

#wallet-page .recharge-btn {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

#wallet-page .recharge-btn:hover {
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

#wallet-page .recharge-btn:active {
    transform: translateY(0);
}

#wallet-page .trade-record-btn {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

#wallet-page .trade-record-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

#wallet-page .trade-record-btn:active {
    transform: translateY(0);
}

/* ==================== 功能网格 - 卡片式设计 ==================== */
#wallet-page .function-grid {
    background: #fff;
    border-radius: 20px;
    padding: 20px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

#wallet-page .grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

#wallet-page .grid-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#wallet-page .grid-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

#wallet-page .grid-item:hover::before {
    opacity: 1;
}

#wallet-page .grid-item:active {
    transform: translateY(-2px) scale(1);
}

#wallet-page .grid-item .func-name-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

#wallet-page .grid-item i {
    font-size: 26px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    width: auto;
    text-align: center;
    transition: transform 0.3s ease;
}

#wallet-page .grid-item:hover i {
    transform: scale(1.15) rotate(5deg);
}

#wallet-page .grid-item .func-name {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

#wallet-page .grid-item .func-cost {
    font-size: 10px;
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 4px 10px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ==================== 交易记录模态框 - 现代化设计 ==================== */
#wallet-page .trade-record-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#wallet-page .modal-content {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 75vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#wallet-page .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    flex-shrink: 0;
}

#wallet-page .modal-title {
    font-size: 18px;
    color: #333;
    font-weight: 700;
    letter-spacing: 0.5px;
}

#wallet-page .close-modal {
    font-size: 22px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#wallet-page .close-modal:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: rotate(90deg);
}

#wallet-page .record-list {
    padding: 16px 24px 24px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

#wallet-page .record-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

#wallet-page .record-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

#wallet-page .record-item:last-child {
    margin-bottom: 0;
}

#wallet-page .record-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#wallet-page .record-icon i {
    color: #fff;
    font-size: 18px;
}

#wallet-page .record-info {
    flex: 1;
    min-width: 0;
}

#wallet-page .record-title {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

#wallet-page .record-time {
    font-size: 12px;
    color: #999;
    letter-spacing: 0.2px;
}

#wallet-page .record-amount {
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 12px;
}

#wallet-page .amount-in {
    color: #52c41a;
}

#wallet-page .amount-out {
    color: #ff4d4f;
}

/* ==================== 钱包自定义弹窗 - 现代化紫色主题 ==================== */
.wallet-custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wallet-custom-modal.show {
    opacity: 1;
    visibility: visible;
}

.wallet-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.wallet-modal-box {
    position: relative;
    background-color: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-custom-modal.show .wallet-modal-box {
    transform: scale(1) translateY(0);
}

.wallet-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.wallet-modal-header::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.wallet-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.wallet-modal-body {
    padding: 28px 24px;
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}

.wallet-input-group {
    margin-bottom: 20px;
}

.wallet-input-label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.wallet-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wallet-input:focus {
    outline: none;
    border-color: #667eea;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.wallet-input::placeholder {
    color: #bbb;
}

.wallet-input-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.wallet-confirm-message {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    text-align: center;
    padding: 10px 0;
}

.wallet-modal-footer {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafbff;
}

.wallet-modal-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.wallet-btn-cancel {
    background-color: #f5f5f5;
    color: #666;
    border: 2px solid #e8e8e8;
}

.wallet-btn-cancel:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
    transform: translateY(-2px);
}

.wallet-btn-cancel:active {
    transform: translateY(0);
}

.wallet-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.wallet-btn-confirm:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.wallet-btn-confirm:active {
    transform: translateY(0);
}

/* ==================== 移动端优化 ==================== */
@media (max-width: 768px) {
    #wallet-page .content-container {
        padding: 16px 12px 40px;
    }
    
    #wallet-page .asset-card {
        padding: 24px 20px;
        margin-bottom: 20px;
        min-height: 170px;
    }
    
    #wallet-page .amount-text strong {
        font-size: 32px;
    }
    
    #wallet-page .function-grid {
        padding: 16px 12px;
        gap: 10px;
        margin-bottom: 30px;
    }
    
    #wallet-page .grid-item {
        padding: 14px 6px;
        min-height: 95px;
    }
    
    #wallet-page .grid-item i {
        font-size: 24px;
    }
    
    #wallet-page .grid-item .func-name {
        font-size: 11px;
    }
    
    #wallet-page .modal-content {
        max-height: 80vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }
    
    #wallet-page .record-list {
        padding: 12px 16px 20px;
    }
    
    #wallet-page .record-item {
        padding: 14px;
    }
    
    .wallet-modal-box {
        width: 92%;
        max-width: 380px;
    }
    
    .wallet-modal-header {
        padding: 20px;
    }
    
    .wallet-modal-body {
        padding: 24px 20px;
    }
    
    .wallet-modal-footer {
        padding: 16px 20px;
    }
}

/* 小屏幕优化 */
@media (max-width: 375px) {
    #wallet-page .function-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    #wallet-page .grid-item {
        padding: 12px 4px;
        min-height: 90px;
    }
    
    #wallet-page .grid-item i {
        font-size: 22px;
    }
    
    #wallet-page .grid-item .func-name {
        font-size: 10px;
    }
    
    #wallet-page .grid-item .func-cost {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    .wallet-modal-box {
        width: 95%;
    }
    
    .wallet-modal-header h3 {
        font-size: 18px;
    }
    
    .wallet-modal-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}