/**
 * Bank & Wallet - Premium Liquid Glass Theme
 * Designed for Right Right & Zero's Home
 * 
 * 风格：黑金/白金、全息光感、3D 视差
 */

/* ========== 覆盖变量与重置 ========== */
#wallet-screen {
    /* 深邃背景：午夜黑金 */
    background: radial-gradient(circle at 50% 30%, #1a1a1a, #000000);
    color: #fff;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}

/* 背景动态光效 */
#wallet-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(100, 100, 255, 0.05) 0%, transparent 40%);
    animation: goldShimmer 15s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes goldShimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 头部 ========== */
#wallet-screen .bank-header {
    background: transparent; /* 去掉原来的背景 */
    backdrop-filter: none;
    border: none;
    padding-top: calc(env(safe-area-inset-top) + 20px);
    position: relative;
    z-index: 10;
}

#wallet-screen .bank-header h2 {
    font-family: 'Playfair Display', serif; /* 优雅衬线体 */
    font-style: italic;
    font-weight: 700;
    font-size: 24px;
    background: linear-gradient(135deg, #fff 0%, #d4af37 100%); /* 金色渐变字 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

#wallet-screen .back-btn, 
#wallet-screen #wallet-refresh-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #d4af37; /* 金色图标 */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#wallet-screen .back-btn:active, 
#wallet-screen #wallet-refresh-btn:active {
    transform: scale(0.9);
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* ========== 内容区域 ========== */
#wallet-screen .bank-content {
    padding: 20px 24px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    padding-bottom: calc(env(safe-area-inset-bottom) + 80px);
}

/* 隐藏滚动条 */
#wallet-screen .bank-content::-webkit-scrollbar { display: none; }

/* ========== 总资产卡片 (My Account) ========== */
#bank-my-account {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

/* 资产数字 */
#bank-my-account .balance-amount {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    margin: 10px 0;
    font-family: 'SF Pro Display', sans-serif;
}

#bank-my-account .balance-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
}

/* ========== 银行卡列表 (Cards List) ========== */
#bank-cards-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    perspective: 1000px; /* 3D 透视 */
}

/* 通用卡片样式 */
.bank-card {
    position: relative;
    height: 200px;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.bank-card:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.bank-card:active {
    transform: scale(0.98);
}

/* 卡片光泽 */
.bank-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 45%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.05) 55%,
        transparent 100%
    );
    transform: rotate(30deg);
    pointer-events: none;
    background-size: 200% 200%;
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { background-position: 200% 200%; }
    100% { background-position: -200% -200%; }
}

/* --- 卡片类型：黑金 (Premium Black) --- */
.bank-card.card-type-black {
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    border: 1px solid rgba(212, 175, 55, 0.3); /* 金边 */
}
.bank-card.card-type-black .card-chip {
    background: linear-gradient(135deg, #d4af37 0%, #f7ef8a 50%, #d4af37 100%);
}
.bank-card.card-type-black .card-number {
    color: #d4af37;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --- 卡片类型：白金 (Platinum White) --- */
.bank-card.card-type-white {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.8);
}
.bank-card.card-type-white .card-balance-label,
.bank-card.card-type-white .card-holder-label {
    color: rgba(0, 0, 0, 0.4);
}
.bank-card.card-type-white .card-chip {
    background: linear-gradient(135deg, #c0c0c0 0%, #e6e6e6 50%, #c0c0c0 100%);
}

/* --- 卡片类型：全息 (Holographic) --- */
.bank-card.card-type-holo {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.bank-card.card-type-holo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255,0,0,0.1), rgba(0,255,0,0.1), rgba(0,0,255,0.1));
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* 卡片内部元素 */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-chip {
    width: 40px;
    height: 30px;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.2);
    position: relative;
}
.card-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.2);
}
.card-chip::after {
    content: '';
    position: absolute;
    left: 30%;
    right: 30%;
    top: 0;
    bottom: 0;
    border-left: 1px solid rgba(0,0,0,0.2);
    border-right: 1px solid rgba(0,0,0,0.2);
}

.card-logo {
    font-weight: 800;
    font-style: italic;
    opacity: 0.8;
    font-size: 18px;
}

.card-number {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    letter-spacing: 2px;
    margin-top: 20px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.5;
    letter-spacing: 1px;
}

.card-value {
    font-size: 14px;
    font-weight: 600;
}

.card-balance {
    font-size: 18px;
    font-weight: 700;
}

/* ========== 交易记录 (Transaction List) ========== */
.transaction-list {
    margin-top: 30px;
}

.transaction-header {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
    padding-left: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s;
}

.transaction-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08);
}

.t-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.t-info {
    flex: 1;
}

.t-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.t-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.t-amount {
    font-size: 16px;
    font-weight: 700;
}

.t-amount.expense { color: #fff; }
.t-amount.income { color: #34d399; } /* 绿色收入 */