/* Color variables */
:root {
    --primary-color: #00e1b0;
    --secondary-color: #8932eb;
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --positive-color: #00e1b0;
    --negative-color: #ff5252;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background-image: url('images/log-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Add an overlay for better text readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 18, 0.7);
    z-index: -1;
}

.container {
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: transparent;
    position: relative;
    padding-bottom: 70px;
}

/* 移动端状态栏 */
.mobile-status-bar {
    background: var(--card-bg);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.status-bar-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

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

/* 价值卡片 */
.value-card {
    padding: 24px 20px;
    background: var(--dark-bg);
}

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

.value-label {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-icon {
    color: var(--text-secondary);
    opacity: 0.6;
}

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

.icon {
    color: #6b7280;
    cursor: pointer;
    transition: color 0.3s ease;
}

.icon:hover {
    color: var(--text-primary);
}

.total-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.currency {
    font-size: 20px;
    font-weight: 700;
    color: #9ca3af;
    margin-left: 8px;
}

.equivalent-value {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.pnl {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 24px;
}

.pnl-positive {
    color: var(--positive-color);
    font-weight: 500;
    margin-left: 4px;
}

.pnl-negative {
    color: var(--negative-color);
    font-weight: 500;
    margin-left: 4px;
}

.arrow {
    margin-left: 4px;
    color: #6b7280;
}

/* 操作按钮 */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn {
    padding: 14px 20px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: #10b981;
    color: #ffffff;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: #2d3348;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: #373d56;
    transform: translateY(-1px);
}

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

/* 账户标签 */
.account-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.tabs-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.transaction-count {
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
    margin-left: 8px;
}

.tab {
    color: #6b7280;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab.active {
    color: var(--text-primary);
    border-bottom-color: #3b82f6;
}

.settings-icon {
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-icon:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* 展开按钮 */
.expand-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-btn:hover {
    color: var(--text-primary);
}

.expand-btn i {
    transition: transform 0.3s ease;
}

.expand-btn.expanded i {
    transform: rotate(180deg);
}

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

/* 账户列表 */
.account-list {
    padding: 8px 20px 20px;
}

.account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.account-item:hover {
    background: rgba(255, 255, 255, 0.02);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.account-item:last-child {
    border-bottom: none;
}

.account-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.account-balance-wrapper {
    text-align: right;
}

.account-balance {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.account-balance-sub {
    font-size: 13px;
    color: #6b7280;
}

/* 底部导航 */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--card-bg);
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.mobile-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}

.mobile-nav .nav-item {
    text-align: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    padding: 8px 4px;
}

.mobile-nav .nav-item.active {
    color: var(--primary-color);
}

.mobile-nav .nav-item:hover {
    color: var(--primary-color);
}

.mobile-nav .nav-item i {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .total-value {
        font-size: 38px;
    }
    
    .action-buttons {
        gap: 8px;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    .total-value {
        font-size: 36px;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-item {
    animation: fadeIn 0.3s ease forwards;
}

.account-item:nth-child(1) { animation-delay: 0.05s; }
.account-item:nth-child(2) { animation-delay: 0.1s; }
.account-item:nth-child(3) { animation-delay: 0.15s; }
.account-item:nth-child(4) { animation-delay: 0.2s; }

/* Custom notification styles */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-success {
    background: linear-gradient(45deg, var(--primary-color), #20c997);
}

.notification-error {
    background: linear-gradient(45deg, var(--negative-color), #c82333);
}

.notification-warning {
    background: linear-gradient(45deg, #ffc107, #ff9800);
}

.notification-show {
    opacity: 1;
    transform: translateY(0);
}

.notification-icon {
    font-size: 20px;
}

/* Mobile notification adjustment */
@media (max-width: 768px) {
    .custom-notification {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100% - 20px);
    }
}

/* Badge styles for transaction status */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 12px;
    margin-left: 8px;
}

.bg-success {
    background-color: var(--positive-color) !important;
    color: #fff;
}

.bg-warning {
    background-color: #f59e0b !important;
    color: #fff;
}

.bg-danger {
    background-color: var(--negative-color) !important;
    color: #fff;
}

.bg-info {
    background-color: #3b82f6 !important;
    color: #fff;
}

.bg-secondary {
    background-color: #6b7280 !important;
    color: #fff;
}
