* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    max-width: 414px;
    margin: 0 auto;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.status-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background: #ff6b35;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.header-title {
    font-size: 18px;
    font-weight: 500;
}

.header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.message-icon {
    position: relative;
    font-size: 20px;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

/* 账户选择器 */
.account-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f8f8;
    font-size: 14px;
}

.account-icon {
    width: 20px;
    height: 20px;
    background: #4a90e2;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.account-name {
    flex: 1;
}

.dropdown-icon {
    font-size: 10px;
    color: #999;
}

/* 主导航标签 */
.main-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
}

.main-tabs .tab {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.main-tabs .tab.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    font-weight: 500;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.main-tabs .tab {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 总资产区域 */
.total-assets-section {
    padding: 20px 16px;
    background: #fff;
    border-bottom: 8px solid #f5f5f5;
}

.total-assets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.eye-icon {
    font-size: 18px;
    cursor: pointer;
}

.total-assets-value {
    font-size: 36px;
    font-weight: 500;
    color: #333;
    margin: 8px 0;
    cursor: pointer;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    letter-spacing: -0.5px;
}

.profit-analysis {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.mini-chart {
    width: 60px;
    height: 30px;
    background: #f5f5f5;
    border-radius: 4px;
}

.analysis-link {
    font-size: 14px;
    color: #666;
}

/* 快捷操作 */
.quick-actions {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: #fff;
    border-bottom: 8px solid #f5f5f5;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.action-icon.blue {
    background: #e3f2fd;
}

.action-icon.purple {
    background: #f3e5f5;
}

.action-icon.orange {
    background: #fff3e0;
}

.action-icon.gray {
    background: #f5f5f5;
}

.action-text {
    font-size: 12px;
    color: #666;
}

/* 投资类型标签 */
.investment-tabs {
    display: flex;
    background: #fff;
    padding: 0 16px;
    border-bottom: 1px solid #eee;
}

.inv-tab {
    padding: 12px 16px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.inv-tab.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    font-weight: 500;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.inv-tab {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 资产净值 */
.asset-net-value {
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.net-value-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.net-value-amount {
    font-size: 26px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    letter-spacing: -0.3px;
}

/* 详细指标 */
.metrics-section {
    display: flex;
    padding: 16px;
    background: #fff;
    border-bottom: 8px solid #f5f5f5;
    gap: 16px;
}

.metrics-left,
.metrics-right {
    flex: 1;
}

.metrics-far-right {
    flex: 1.2;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
}

.metric-label {
    color: #666;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.metric-value {
    font-weight: 400;
    color: #333;
    cursor: pointer;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.metric-value.profit-loss.positive {
    color: #ff3b30;
    font-weight: 500;
}

.metric-value.profit-loss.negative {
    color: #34c759;
    font-weight: 500;
}

.metric-value.profit-loss.debt {
    color: #ff9500;
    font-weight: 500;
}

.currency-value.debt {
    color: #ff3b30;
    font-weight: 500;
}

.currency-value:not(.debt) {
    color: #333;
    font-weight: 500;
}

.status-safe {
    color: #34c759;
    font-weight: 500;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 币种/现金 */
.currency-section {
    padding: 16px;
    background: #fff;
    border-bottom: 8px solid #f5f5f5;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333;
}

.currency-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.currency-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.currency-row.header-row {
    font-size: 12px;
    color: #999;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
}

.currency-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.flag-icon {
    font-size: 18px;
}

.currency-value {
    font-weight: 500;
    cursor: pointer;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 底部导航 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    background: #fff;
    border-top: 1px solid #eee;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
}

.nav-icon {
    font-size: 20px;
}

.account-nav-icon {
    width: 24px;
    height: 24px;
    background: #ff6b35;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.nav-item.active .nav-icon {
    color: #ff6b35;
}

.nav-item.active .nav-text {
    color: #ff6b35;
}

.nav-text {
    font-size: 11px;
    color: #666;
}

/* 可编辑数字样式 */
.editable-number {
    position: relative;
    transition: all 0.2s;
}

.editable-number:hover {
    background: #f0f7ff;
    border-radius: 4px;
    padding: 2px 4px;
}

.editable-number::after {
    content: '✏️';
    opacity: 0;
    margin-left: 4px;
    font-size: 12px;
    transition: opacity 0.2s;
}

.editable-number:hover::after {
    opacity: 0.5;
}

/* 编辑模态框 */
.edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.edit-modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: 500;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-body {
    padding: 20px 16px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
}

.modal-input:focus {
    border-color: #ff6b35;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #eee;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.btn-cancel {
    background: #f5f5f5;
    color: #333;
}

.btn-confirm {
    background: #ff6b35;
    color: #fff;
}

.btn-confirm:hover {
    background: #ff5722;
}

