/* （仁杰提醒你投资有风险理财需谨慎，估值仅供参考，实际净值以基金公司公布为准。） */

:root {
    --primary-color: #165DFF;
    --primary-hover: #0E48D9;
    --primary-light: rgba(22, 93, 255, 0.1);
    
    --profit-color: #F53F3F;
    --loss-color: #00B42A;
    
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #f3f4f6;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(22, 93, 255, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    
    --font-size-xs: 10px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
    --font-size-4xl: 28px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --nav-height: 72px;
    --header-height: 56px;
}

[data-theme="dark"] {
    --primary-color: #4080ff;
    --primary-hover: #5a94ff;
    --primary-light: rgba(64, 128, 255, 0.15);
    
    --profit-color: #ff6b6b;
    --loss-color: #51cf66;
    
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    
    --border-color: #374151;
    --border-light: #4b5563;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 20px rgba(64, 128, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #4080ff;
        --primary-hover: #5a94ff;
        --primary-light: rgba(64, 128, 255, 0.15);
        
        --profit-color: #ff6b6b;
        --loss-color: #51cf66;
        
        --text-primary: #f3f4f6;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --text-light: #6b7280;
        
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-tertiary: #374151;
        
        --border-color: #374151;
        --border-light: #4b5563;
        
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 4px 20px rgba(64, 128, 255, 0.2);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    background: var(--bg-secondary);
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    line-height: 1.5;
}

@media screen and (min-width: 2560px) {
    body {
        max-width: 1600px;
    }
}

@media screen and (min-width: 1920px) and (max-width: 2559px) {
    body {
        max-width: 1400px;
    }
}

@media screen and (min-width: 1440px) and (max-width: 1919px) {
    body {
        max-width: 1200px;
    }
}

@media screen and (min-width: 1200px) and (max-width: 1439px) {
    body {
        max-width: 1000px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
    body {
        max-width: 800px;
    }
}

@media screen and (max-width: 767px) {
    body {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .container {
        padding: 15px 10px;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1 1 auto;
        min-width: 60px;
        padding: 12px 8px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        margin-bottom: 10px;
    }
    
    h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .card-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .form-input {
        font-size: 16px;
        padding: 12px;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .btn {
        min-height: 44px;
        font-size: 15px;
        padding: 12px 20px;
    }
    
    .card-btn {
        min-height: 44px;
        font-size: 14px;
        padding: 10px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 85vh;
        margin: 5vh auto;
    }
    
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .fund-list {
        font-size: 14px;
    }
    
    .list-header {
        display: none !important;
    }
    
    .settings-item {
        padding: 12px;
    }
    
    .settings-label {
        font-size: 14px;
    }
    
    .search-box {
        flex-wrap: wrap;
    }
    
    .search-box input,
    .search-box select,
    .search-box button {
        min-width: 0;
    }
    
    #fundCode {
        flex: 1 1 100%;
        order: 1;
    }
    
    #searchDataSource {
        flex: 1;
        order: 2;
        margin-right: 0 !important;
    }
    
    #searchBtn {
        flex: 0 0 auto;
        order: 3;
        padding: 0 12px;
    }
}

@media screen and (max-width: 480px) {
    .tab {
        min-width: 50px;
        padding: 10px 6px;
        font-size: 13px;
    }
    
    .card-btn {
        font-size: 13px;
        padding: 8px;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .form-input {
        font-size: 16px;
    }
    
    h1 {
        font-size: 18px;
    }
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    .modal-content {
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    .modal-body {
        max-height: 70vh;
    }
    
    h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .tabs {
        margin-bottom: 8px;
        padding: 3px;
    }
    
    .tab {
        padding: 8px 6px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .container {
        padding: 15px 10px;
    }
}

@media screen and (min-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

/* 虚拟键盘适配 */
@media screen and (max-width: 767px) {
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        overflow: hidden;
    }
    
    .modal-content {
        max-height: 80vh;
        max-width: 95%;
        margin: 10vh auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .form-input:focus,
    .settings-input:focus,
    .settings-textarea:focus {
        position: relative;
        z-index: 1002;
    }
}

/* 触摸滚动优化 */
.fund-list,
.batch-list,
.batch-update-list,
.modal-body,
.settings-section {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 防止iOS橡皮筋效果 */
body {
    overscroll-behavior-y: contain;
}

/* 移动端安全区域适配 */
@supports (padding: max(0px)) {
    @media screen and (max-width: 767px) {
        .container {
            padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right));
            padding-bottom: max(10px, env(safe-area-inset-bottom));
        }
        
        .modal-content {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }
    }
}

/* 移动端输入框字体大小防止自动缩放 */
@media screen and (max-width: 767px) {
    input[type="text"],
    input[type="number"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* 移动端长按选择优化 */
@media screen and (max-width: 767px) {
    .batch-item,
    .batch-update-item,
    .settings-item,
    .strategy-item,
    .account-item {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}

.container {
    background: var(--bg-primary);
    padding: 20px 15px;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
}

h1 {
    text-align: center;
    color: #165DFF;
    margin-bottom: 20px;
}

/* 选项卡 */
.tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 4px;
}

.tab {
    flex: 1;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.tab:active {
    transform: scale(0.98);
    background: rgba(22, 93, 255, 0.05);
}

.tab.active {
    background: var(--bg-primary);
    color: #165DFF;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.1);
}

/* 分组选项卡 */
.group-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 6px;
    padding: 5px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.group-tabs::-webkit-scrollbar {
    display: none;
}

.group-tab {
    padding: 10px 15px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    flex-shrink: 0;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.group-tab:active {
    transform: scale(0.98);
    background: rgba(22, 93, 255, 0.05);
}

.group-tab.active {
    background: var(--bg-primary);
    color: #165DFF;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.1);
}

.add-group-tab {
    background: transparent;
    color: #165DFF;
    padding: 0;
    border-radius: 6px;
    min-width: 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
    margin-top: 8px;
}

.add-group-tab:hover {
    background: rgba(22, 93, 255, 0.05);
    transform: scale(1.05);
}

.add-group-tab i {
    font-size: 18px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

#fundCode {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

#searchBtn {
    padding: 0 16px;
    background: #165DFF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
}

#searchBtn:hover {
    background: #0E48D9;
}

/* 功能按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.action-btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-xs);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--primary-color);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.action-btn.remove {
    border-color: var(--profit-color);
    color: var(--profit-color);
}

.action-btn.remove:hover {
    background: var(--profit-color);
    color: white;
}

/* 查询结果 */
.result {
    display: none;
    margin-top: 20px;
}

.fund-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.data-item {
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.value {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.rise {
    color: #F53F3F;
}

.fall {
    color: #00B42A;
}

.neutral {
    color: #86909C;
}

/* 自选和持仓页面 */
.watchlist-container, .position-container {
    display: none;
}

/* 表头 */
.list-header {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
}

.header-cell {
    padding: 0 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
}

.header-cell.right {
    justify-content: flex-end;
    text-align: right;
}

.sort-icon {
    font-size: 12px;
    color: #999;
}

/* 基金列表 */
.fund-list {
    flex: 1;
    overflow-y: auto;
    min-height: 300px;
}

.fund-account-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 12px;
    border-radius: 4px;
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
}

.fund-subaccount-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 4px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 600;
}

.fund-subaccount-tag.core {
    background-color: rgba(22, 93, 255, 0.1);
    color: #165DFF;
}

.fund-subaccount-tag.satellite {
    background-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.fund-group-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 6px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 600;
}

.fund-group-tag.core {
    background-color: rgba(22, 93, 255, 0.1);
    color: #165DFF;
}

.fund-group-tag.satellite {
    background-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.fund-group-tag.supplement {
    background-color: rgba(245, 63, 63, 0.1);
    color: #F53F3F;
}

.supplement-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.supplement-summary .summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.supplement-summary .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.supplement-summary .value {
    font-size: 20px;
    font-weight: bold;
    color: #165DFF;
}

.supplement-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.supplement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.supplement-item.available {
    border-left: 4px solid #4ade80;
}

.supplement-item.unavailable {
    border-left: 4px solid #fbbf24;
    opacity: 0.7;
}

.supplement-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fund-info {
    flex: 1;
}

.fund-info .fund-name {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.fund-info .fund-code {
    font-size: 12px;
    color: var(--text-muted);
}

.fund-change {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
}

.fund-change .change-value {
    font-size: 18px;
    font-weight: bold;
    color: #F53F3F;
}

.fund-change .change-label {
    font-size: 12px;
    color: var(--text-muted);
}

.fund-action {
    min-width: 80px;
}

.btn-supplement {
    padding: 8px 16px;
    background: #4ade80;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-supplement:hover {
    background: #22c55e;
    transform: translateY(-2px);
}

.unavailable-text {
    color: #fbbf24;
    font-size: 12px;
    font-weight: 500;
}

.supplement-rules {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid #fbbf24;
}

.supplement-rules h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 14px;
}

.supplement-rules ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.supplement-rules li {
    margin-bottom: 6px;
}

.supplement-confirm-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.supplement-confirm-info .info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.supplement-confirm-info .info-item.highlight {
    background: rgba(22, 93, 255, 0.1);
    border: 1px solid #165DFF;
}

.supplement-confirm-info .label {
    font-size: 14px;
    color: var(--text-muted);
}

.supplement-confirm-info .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.warning-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 6px;
    color: #92400e;
    font-size: 13px;
}

.warning-tip i {
    color: #fbbf24;
}

.position-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.position-actions .btn {
    max-width: 200px;
}

.watchlist-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.watchlist-actions .btn {
    max-width: 200px;
}

.fund-value {
    text-align: right;
    justify-content: flex-end;
    font-weight: bold;
}

.profit-positive {
    color: #F53F3F;
}

.profit-negative {
    color: #00B42A;
}

/* 浮窗操作界面 */
.action-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

.action-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.action-panel-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-primary);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    line-height: 1.3;
}

.position-info {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding: 16px;
    background-color: var(--bg-tertiary);
    border-radius: 16px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    min-height: 80px;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.position-info span {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
    position: relative;
    padding-top: 22px;
    min-width: 0;
    word-break: break-all;
    overflow-wrap: break-word;
}

.position-info [data-label] {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    word-break: break-all;
    overflow-wrap: break-word;
}

.position-info [data-label]:before {
    content: attr(data-label);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f8fafc;
    padding: 0 8px;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1;
}

.position-amount {
    color: #334155;
}

.position-cost {
    color: #059669;
}

.position-rate {
    font-weight: 600;
    font-size: 15px;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 8px 0;
    width: 100%;
    box-sizing: border-box;
}

/* 确保移动端始终保持三列布局 */
@media screen and (max-width: 768px) {
    .action-buttons-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .action-panel-btn {
        min-width: 0 !important;
        flex-shrink: 1 !important;
    }
}

.action-panel-btn {
    padding: 8px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    position: relative;
}

.action-panel-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.action-panel-btn i {
    font-size: 18px;
    margin-bottom: 4px;
}



.action-panel-btn-text {
    font-weight: 500;
    line-height: 1.2;
}

/* 持仓统计卡片 */
.position-summary-card {
    background: var(--bg-primary);
    border-radius: 2px;
    padding: 4px;
    margin-top: 6px;
    border: 1px solid var(--border-color);
}

.position-summary-card.editing-breathing-bg {
    border-color: #165DFF;
}

.summary-grid {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.summary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.summary-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.summary-value {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
    word-break: break-all;
}

/* 设置页面 */
.settings-container {
    display: none;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section.collapsible {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-tertiary);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.settings-section-header:hover {
    background: var(--border-color);
}

.settings-section-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.section-toggle {
    transition: transform 0.3s ease;
    color: var(--text-muted);
    font-size: 14px;
}

.settings-section-header.collapsed .section-toggle {
    transform: rotate(-90deg);
}

.settings-section-content {
    padding: 15px 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 2000px;
    overflow: hidden;
}

.settings-section-header.collapsed + .settings-section-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.settings-number {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    font-size: 14px;
    width: 80px;
}

.settings-number:focus {
    outline: none;
    border-color: #4CAF50;
}

.settings-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.settings-section h4 {
    margin: 15px 0 10px 0;
    color: var(--text-secondary);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.settings-label {
    font-weight: 500;
    font-size: 14px;
}

.settings-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    font-size: 14px;
    cursor: pointer;
}

.settings-select:hover {
    border-color: var(--border-light);
}

.settings-select:focus {
    outline: none;
    border-color: #4CAF50;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
}

.toggle-checkbox {
    display: none;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--bg-primary);
    transition: .4s;
    border-radius: 50%;
}

.toggle-checkbox:checked + .toggle-slider {
    background-color: #165DFF;
}

.toggle-checkbox:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* 对话框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-error {
    display: none !important;
    color: #F53F3F !important;
    font-size: 12px !important;
    margin-top: 4px !important;
    font-family: "微软雅黑", sans-serif !important;
    font-weight: normal !important;
}

.form-error.show {
    display: block !important;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.form-input, .form-file {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 44px;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.loading {
    text-align: center;
    padding: 20px;
    display: none;
}

.loading i {
    color: #165DFF;
    font-size: 20px;
    margin-right: 8px;
}

.tips {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

.error-tip {
    color: #F53F3F;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* 分组管理样式 */
.group-management {
    margin-bottom: 16px;
}

.group-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    background: var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.group-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.group-item.active {
    border-color: #165DFF;
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

.group-item.dragging {
    opacity: 0.8;
    background: var(--primary-light);
    position: absolute;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: rotate(2deg);
}

.group-item-info {
    flex: 1;
    min-width: 0;
}

.group-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 4px;
}

.group-item-count {
    font-size: 13px;
    color: var(--text-muted);
}

.group-item-actions {
    display: flex;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.group-item:hover .group-item-actions {
    opacity: 1;
}

/* 编辑状态呼吸动画 */
@keyframes breathing {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(22, 93, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(22, 93, 255, 0);
    }
}

.group-item.editing-breathing-bg {
    border-color: #165DFF;
    background: #f0f7ff;
    animation: breathing 2s ease-in-out infinite;
    position: relative;
}

.group-item.editing-breathing-bg::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 14px;
    background: linear-gradient(45deg, #165DFF, #7b61ff, #165DFF);
    z-index: -1;
    opacity: 0.3;
    animation: breathing 2s ease-in-out infinite;
}

/* 拖拽手柄样式优化 */
.drag-handle {
    margin-right: 16px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: grab;
    color: var(--text-muted);
}

.drag-handle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
}

.drag-handle:active {
    cursor: grabbing;
    color: #165DFF;
}

.drag-handle i {
    font-size: 16px;
}

.empty-tip {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.icon-btn {
    padding: 5px 10px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #165DFF;
}

/* 历史记录 */
.history-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.history-account {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
}

.history-detail {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.history-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-date {
    font-weight: 500;
    color: var(--text-secondary);
}

.history-amount {
    color: #165DFF;
    font-weight: 500;
}

.loading-text, .empty-text, .error-text {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.error-text {
    color: #ef4444;
}

/* 快速操作按钮 */
.quick-buttons {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.quick-buttons .btn {
    flex: 1;
    padding: 8px 4px;
    font-size: 14px;
}

/* 通知弹窗 */
.notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.3s;
}

.notification.show {
    opacity: 1;
    pointer-events: auto;
}

.notification-content {
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.notification.show .notification-content {
    transform: scale(1);
}

.notification-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.notification-content p {
    color: var(--text-secondary);
}

/* Gist配置 */
.gist-info {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.gist-info h4 {
    font-weight: 500;
    margin-bottom: 8px;
}

.help-text {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* 导入选项 */
.import-options {
    margin-top: 10px;
}

.import-options label {
    display: block;
    margin-bottom: 8px;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .summary-grid {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .summary-item {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
    }
    
    .summary-label {
        font-size: 12px;
    }
    
    .summary-value {
        font-size: 14px;
    }
    
    .action-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-buttons {
        flex-wrap: wrap;
    }
    
    .quick-buttons .btn {
        flex: 1 1 calc(50% - 5px);
    }
}

/* 账户管理页面 */
.accounts-container {
    display: none;
}

.accounts-overview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
}

.accounts-overview h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.total-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(22, 93, 255, 0.1);
    border-radius: 8px;
}

.total-balance .label {
    color: #165DFF;
    font-size: 14px;
    font-weight: 600;
}

.total-balance .value {
    font-size: 28px;
    font-weight: bold;
    color: #165DFF;
}

.health-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(22, 93, 255, 0.1);
    border-radius: 8px;
}

.health-status .status-label {
    color: #165DFF;
    font-size: 14px;
    font-weight: 600;
}

.health-status .status-value {
    font-weight: bold;
    font-size: 16px;
}

.health-status.normal .status-value {
    color: #4ade80;
}

.health-status.warning .status-value {
    color: #fbbf24;
}

.health-status.critical .status-value {
    color: #f87171;
}

.investment-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.investment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.investment-item.core {
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.1) 0%, rgba(22, 93, 255, 0.05) 100%);
    border-left: 4px solid #165DFF;
}

.investment-item.satellite {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left: 4px solid #fbbf24;
}

.investment-item .label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.investment-item .value {
    font-size: 18px;
    font-weight: bold;
    color: #165DFF;
}

.investment-item.satellite .value {
    color: #fbbf24;
}

.investment-item .ratio {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
}

.accounts-list {
    margin-bottom: 20px;
}

.account-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.account-item.normal {
    border-left: 4px solid #4ade80;
}

.account-item.warning {
    border-left: 4px solid #fbbf24;
}

.account-item.critical {
    border-left: 4px solid #f87171;
}

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

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

.account-balance {
    font-weight: bold;
    font-size: 18px;
    color: #165DFF;
}

.account-balance-type {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 8px;
}

.account-details {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.account-ratio,
.account-target,
.account-deviation {
    text-align: center;
}

.account-ratio .label,
.account-target .label,
.account-deviation .label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.account-ratio .value,
.account-target .value,
.account-deviation .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.account-deviation .value.positive {
    color: #f87171;
}

.account-deviation .value.negative {
    color: #4ade80;
}

.account-breakdown {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.breakdown-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.breakdown-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.account-actions {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
}

.account-actions .card-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.account-actions .card-btn:hover {
    border-color: #165DFF;
    background: #165DFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 93, 255, 0.2);
}

.account-actions .card-btn:active {
    transform: translateY(0) scale(0.98);
}

.account-actions .card-btn i {
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.sub-accounts {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #d1d5db;
}

.sub-account-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.sub-account-item:hover {
    background: var(--bg-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sub-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sub-account-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.sub-account-balance {
    font-size: 15px;
    font-weight: bold;
    color: #165DFF;
}

.sub-account-details {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    padding: 8px;
    background: var(--bg-primary);
    border-radius: 6px;
}

.sub-account-ratio,
.sub-account-target,
.sub-account-deviation {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sub-account-ratio .label,
.sub-account-target .label,
.sub-account-deviation .label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.sub-account-ratio .value,
.sub-account-target .value,
.sub-account-deviation .value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sub-account-deviation .value.positive {
    color: #10b981;
}

.sub-account-deviation .value.negative {
    color: #ef4444;
}

.sub-account-breakdown {
    display: flex;
    gap: 8px;
}

.sub-account-breakdown .breakdown-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: var(--bg-primary);
    border-radius: 4px;
}

.sub-account-breakdown .breakdown-label {
    font-size: 11px;
    color: var(--text-muted);
}

.sub-account-breakdown .breakdown-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sub-account-item.normal {
    border-left: 3px solid #4ade80;
}

.sub-account-item.warning {
    border-left: 3px solid #fbbf24;
}

.sub-account-item.critical {
    border-left: 3px solid #f87171;
    background: rgba(245, 63, 63, 0.1);
}

.sub-account-item.critical:hover {
    background: rgba(245, 63, 63, 0.15);
}

@media screen and (max-width: 767px) {
    .sub-accounts {
        flex-direction: column;
        gap: 8px;
    }
    
    .sub-account-item {
        padding: 10px;
    }
    
    .sub-account-details {
        padding: 6px;
    }
    
    .sub-account-ratio .value,
    .sub-account-target .value,
    .sub-account-deviation .value {
        font-size: 11px;
    }
}

/* 策略管理页面 */
.strategy-container {
    display: none;
}

.strategy-overview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
}

.strategy-overview h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.active-strategy {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.active-strategy .label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.active-strategy .value {
    font-weight: bold;
    font-size: 16px;
}

.strategy-list {
    margin-bottom: 20px;
}

.strategy-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.strategy-item.enabled {
    border-left: 4px solid #4ade80;
}

.strategy-item.disabled {
    border-left: 4px solid #9ca3af;
}

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

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

.strategy-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.strategy-status.enabled {
    background: #d1fae5;
    color: #065f46;
}

.strategy-status.disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.strategy-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.strategy-config {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.strategy-config span {
    font-size: 13px;
    color: var(--text-secondary);
}

.strategy-actions {
    display: flex;
    gap: 8px;
}

.strategy-actions .btn-small {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.strategy-actions .btn-small:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.strategy-actions .btn-edit:hover {
    background: #eff6ff;
    border-color: #165DFF;
    color: #165DFF;
}

.strategy-actions .btn-delete:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #f87171;
}

.strategy-actions {
    display: flex;
    gap: 10px;
}

.strategy-actions .action-btn {
    flex: 1;
}

/* 数据管理按钮样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.card.danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.card.danger:hover {
    border-color: var(--profit-color);
    box-shadow: 0 4px 12px rgba(245, 63, 63, 0.1);
}

.card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--border-color);
}

.card.danger .card-title {
    color: var(--profit-color);
    border-bottom-color: #fecaca;
}

.card-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.card-btn:last-child {
    margin-bottom: 0;
}

.card-btn:hover {
    border-color: #165DFF;
    background: #165DFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 93, 255, 0.2);
}

.card-btn:active {
    transform: translateY(0) scale(0.98);
}

.card-btn i {
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.card-btn.danger {
    border-color: #F53F3F;
    color: #F53F3F;
}

.card-btn.danger:hover {
    background: #F53F3F;
    color: white;
    box-shadow: 0 4px 8px rgba(245, 63, 63, 0.2);
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 16px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card-title {
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .card-btn {
        padding: 10px 14px;
        margin-bottom: 8px;
        gap: 8px;
    }
    
    .card-btn i {
        font-size: 16px;
        width: 20px;
    }
}

/* 数据管理按钮样式 */
.data-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.data-management-group {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.data-management-group:hover {
    border-color: #165DFF;
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.1);
}

.data-management-group.danger {
    border-color: var(--profit-color);
    background: rgba(245, 63, 63, 0.1);
}

.data-management-group.danger:hover {
    border-color: #F53F3F;
    box-shadow: 0 4px 12px rgba(245, 63, 63, 0.1);
}

.group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.data-management-group.danger .group-title {
    color: #F53F3F;
    border-bottom-color: var(--profit-color);
}

.data-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.data-btn:last-child {
    margin-bottom: 0;
}

.data-btn:hover {
    border-color: #165DFF;
    background: #165DFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 93, 255, 0.2);
}

.data-btn:active {
    transform: translateY(0) scale(0.98);
}

.data-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.data-btn.danger {
    border-color: #F53F3F;
    color: #F53F3F;
}

.data-btn.danger:hover {
    background: #F53F3F;
    color: white;
    box-shadow: 0 4px 8px rgba(245, 63, 63, 0.2);
}

/* 补仓推荐 */
.supplement-recommendations {
    max-height: 400px;
    overflow-y: auto;
}

.recommendation-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.position-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.position-info .position-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.position-info .position-code {
    font-size: 14px;
    color: var(--text-muted);
}

.supplement-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    background: #fef3c7;
    border-radius: 8px;
}

.supplement-details span {
    font-size: 13px;
    color: #92400e;
}

.recommendation-item .btn-execute {
    width: 100%;
    padding: 10px;
    background: #165DFF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.recommendation-item .btn-execute:hover {
    background: #0E48D9;
}

/* 再平衡弹窗 */
.rebalance-summary {
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 15px;
}

.rebalance-summary p {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.rebalance-adjustments {
    max-height: 300px;
    overflow-y: auto;
}

.adjustment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
}

.adjustment-item.send {
    border-left: 4px solid #f87171;
}

.adjustment-item.receive {
    border-left: 4px solid #4ade80;
}

.adjustment-item .account-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.adjustment-item span {
    font-size: 13px;
    color: var(--text-muted);
}

.adjustment-item .adjustment-amount {
    font-weight: bold;
    font-size: 14px;
}

.adjustment-item.send .adjustment-amount {
    color: #f87171;
}

.adjustment-item.receive .adjustment-amount {
    color: #4ade80;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.modal-overlay .modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

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

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

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer .btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-footer .btn-confirm {
    background: #165DFF;
    color: white;
}

.modal-footer .btn-transfer {
    background: #10B981;
    color: white;
}

.custom-rules {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.fund-info-summary {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.fund-info-summary span {
    font-weight: 600;
    color: var(--text-primary);
}

.batch-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.batch-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

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

.batch-item:hover {
    background-color: var(--bg-tertiary);
}

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

.batch-date {
    font-size: 14px;
    color: var(--text-muted);
}

.batch-id {
    font-size: 12px;
    color: var(--text-muted);
}

.batch-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.batch-detail-item {
    display: flex;
    flex-direction: column;
}

.batch-detail-label {
    font-size: 12px;
    color: var(--text-muted);
}

.batch-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.batch-profit {
    grid-column: span 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
}

.batch-profit-value {
    font-size: 16px;
    font-weight: bold;
}

.batch-profit-value.positive {
    color: #F53F3F;
}

.batch-profit-value.negative {
    color: #00B42A;
}

.batch-update-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.batch-update-item {
    display: grid;
    grid-template-columns: 120px 200px 1fr 120px 120px 120px;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

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

.batch-update-item:hover {
    background-color: var(--bg-tertiary);
}

.batch-update-code {
    font-weight: 600;
    color: var(--text-primary);
}

.batch-update-name {
    color: var(--text-muted);
}

.batch-update-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 18px;
    height: 50px;
    box-sizing: border-box;
    min-width: 120px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.batch-update-input:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.15);
    background-color: var(--bg-primary);
}

.batch-update-value {
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

.batch-update-profit {
    text-align: right;
    font-weight: 600;
}

.batch-update-profit.positive {
    color: #F53F3F;
}

.batch-update-profit.negative {
    color: #00B42A;
}

/* 预测页面样式 */
.prediction-container {
    display: none;
}

.settings-input {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    font-size: 14px;
    color: var(--text-primary);
}

.settings-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.settings-textarea {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    font-size: 14px;
}

/* 筛选条件样式 */
.filter-container {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* 统计信息样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 历史记录项样式增强 */
.history-item {
    margin-bottom: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--border-light);
}

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

.history-type {
    font-weight: 600;
    color: var(--text-primary);
}

.history-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-fund {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.history-details {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.history-details span {
    display: inline-block;
    margin-right: 16px;
    color: var(--text-secondary);
}

.history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.undo-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.undo-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-item {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.settings-textarea {
    resize: vertical;
    font-family: inherit;
    color: var(--text-primary);
}

.settings-textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.settings-file {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    font-size: 14px;
    color: var(--text-primary);
}

.prediction-result {
    margin-top: 20px;
}

.prediction-content {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    min-height: 100px;
    max-height: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    color: var(--text-primary);
    overflow: visible;
}

.prediction-meta {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.prediction-meta .meta-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.prediction-meta .meta-value {
    color: #165DFF;
    font-weight: 500;
}

/* 登录界面样式 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-lg);
    transition: all var(--transition-normal);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-light);
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px var(--spacing-xl);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 48px;
}

.login-btn:hover {
    background: #0E48D9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}

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

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.login-footer a {
    color: #165DFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: #0E48D9;
    text-decoration: underline;
}

@media screen and (max-width: 767px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
    
    .form-input {
        font-size: 16px;
    }
    
    .login-btn {
        font-size: 15px;
        padding: 12px 20px;
    }
}

.login-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-actions .action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px;
}

.login-actions .action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.login-actions .action-btn:active {
    transform: translateY(0);
}

.login-actions .action-btn i {
    font-size: 16px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    background: var(--bg-primary);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

@media screen and (min-width: 2560px) {
    .bottom-nav {
        max-width: 1600px;
    }
}

@media screen and (min-width: 1920px) and (max-width: 2559px) {
    .bottom-nav {
        max-width: 1400px;
    }
}

@media screen and (min-width: 1440px) and (max-width: 1919px) {
    .bottom-nav {
        max-width: 1200px;
    }
}

@media screen and (min-width: 1200px) and (max-width: 1439px) {
    .bottom-nav {
        max-width: 1000px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
    border-radius: 12px;
    min-width: 64px;
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-tertiary);
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-item.active {
    color: #165DFF;
    background: rgba(22, 93, 255, 0.1);
}

.nav-item.active i {
    transform: scale(1.1);
}

/* 为底部导航留出空间 */
.container {
    padding-bottom: 80px;
}

/* 首页汇总卡片 */
.home-summary-card {
    background: linear-gradient(135deg, #165DFF 0%, #0E48D9 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    color: white;
    box-shadow: 0 4px 20px rgba(22, 93, 255, 0.3);
}

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

.summary-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.summary-value {
    font-size: 28px;
    font-weight: bold;
}

.summary-details {
    display: flex;
    gap: 24px;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.item-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.item-value {
    font-size: 16px;
    font-weight: 600;
}

.item-value.positive {
    color: #F53F3F;
}

.item-value.negative {
    color: #00B42A;
}

/* 行情页面 */
.market-container {
    display: none;
    flex-direction: column;
}

.market-container.active {
    display: flex;
}

.section-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.section-divider span {
    padding: 0 16px;
}

/* 持仓页面 */
.portfolio-container {
    display: none;
    flex-direction: column;
}

.portfolio-container.active {
    display: flex;
}

.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.portfolio-summary .summary-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.portfolio-summary .summary-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.portfolio-summary .summary-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

.portfolio-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
}

.portfolio-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.portfolio-tab.active {
    background: var(--bg-primary);
    color: #165DFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.portfolio-subtab {
    display: none;
}

.portfolio-subtab.active {
    display: block;
}

/* 我的页面 */
.profile-container {
    display: none;
    flex-direction: column;
}

.profile-container.active {
    display: flex;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #165DFF 0%, #0E48D9 100%);
    border-radius: 16px;
    margin-bottom: 16px;
    color: white;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar i {
    font-size: 36px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

.profile-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.logout-btn i {
    font-size: 18px;
}

.profile-menu {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    -webkit-tap-highlight-color: transparent;
}

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

.menu-item:hover {
    background: var(--bg-tertiary);
}

.menu-item:active {
    background: var(--bg-tertiary);
}

.menu-item i:first-child {
    font-size: 20px;
    color: #165DFF;
    margin-right: 16px;
    width: 24px;
    text-align: center;
}

.menu-item span {
    flex: 1;
    font-size: 15px;
    color: var(--text-secondary);
}

.menu-item i:last-child {
    font-size: 14px;
    color: var(--text-muted);
}

.profile-subpage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    z-index: 1001;
    overflow-y: auto;
    padding: 0 15px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.profile-subpage.active {
    display: block;
}

.subpage-header {
    display: flex;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn {
    background: none;
    border: none;
    padding: 8px;
    margin-right: 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
    background: var(--bg-tertiary);
}

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

.subpage-header span {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 移动端适配 */
@media screen and (max-width: 767px) {
    .bottom-nav {
        max-width: 100%;
        border-radius: 0;
    }
    
    .nav-item {
        padding: 6px 12px;
        min-width: 56px;
    }
    
    .nav-item i {
        font-size: 20px;
    }
    
    .nav-item span {
        font-size: 11px;
    }
    
    .home-summary-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .summary-value {
        font-size: 24px;
    }
    
    .portfolio-summary {
        grid-template-columns: 1fr;
    }
    
    .portfolio-summary .summary-card {
        padding: 12px;
    }
    
    .profile-header {
        padding: 20px;
    }
    
    .profile-avatar {
        width: 56px;
        height: 56px;
    }
    
    .profile-avatar i {
        font-size: 28px;
    }
    
    .profile-name {
        font-size: 18px;
    }
    
    .menu-item {
        padding: 14px 16px;
    }
    
    .menu-item i:first-child {
        font-size: 18px;
    }
    
    .menu-item span {
        font-size: 14px;
    }
}

/* 卡片可展开样式 */
.fund-card {
    background: var(--bg-primary);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.fund-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fund-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.fund-card-header:active {
    background: var(--bg-tertiary);
}

.fund-card-main {
    flex: 1;
}

.fund-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fund-card-code {
    font-size: 12px;
    color: var(--text-muted);
}

.fund-card-values {
    text-align: right;
}

.fund-card-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fund-card-change {
    font-size: 14px;
    font-weight: 500;
}

.fund-card-change.positive {
    color: #F53F3F;
}

.fund-card-change.negative {
    color: #00B42A;
}

.fund-card-expand {
    padding: 4px 8px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.fund-card.expanded .fund-card-expand {
    transform: rotate(180deg);
}

.fund-card-details {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--border-color);
}

.fund-card.expanded .fund-card-details {
    display: block;
}

.fund-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 16px;
}

.fund-detail-item {
    display: flex;
    flex-direction: column;
}

.fund-detail-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.fund-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.fund-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.fund-card-actions .action-btn {
    flex: 1;
    padding: 10px;
    font-size: 13px;
}

/* 下拉刷新样式 */
.pull-refresh {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: var(--font-size-base);
    opacity: 0;
    transform: translateY(0);
    transition: all var(--transition-normal);
    background: var(--bg-secondary);
}

.pull-refresh.visible {
    opacity: 1;
}

.pull-refresh i {
    margin-right: var(--spacing-sm);
    transition: transform var(--transition-normal);
}

/* 滑动操作样式 */
.swipe-actions {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: 5;
}

.swipe-actions-left {
    left: 0;
}

.swipe-actions-right {
    right: 0;
}

.swipe-action-btn {
    width: 60px;
    height: 100%;
    border: none;
    color: white;
    font-size: var(--font-size-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.swipe-action-btn:active {
    opacity: 0.8;
}

.fund-card-header {
    position: relative;
    z-index: 10;
    background: var(--bg-primary);
    transition: transform var(--transition-normal);
}

/* 触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    .nav-item:active,
    .menu-item:active,
    .fund-card-header:active,
    .action-btn:active,
    .btn:active {
        opacity: 0.7;
    }
}

/* 滚动优化 */
.fund-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.tab-content {
    -webkit-overflow-scrolling: touch;
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
    
    .container {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* 深色模式特殊样式 */
[data-theme="dark"] .card.danger,
:root:not([data-theme="light"]) .card.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .card.danger:hover,
:root:not([data-theme="light"]) .card.danger:hover {
    border-color: var(--profit-color);
}

[data-theme="dark"] .bottom-nav,
:root:not([data-theme="light"]) .bottom-nav {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-content,
:root:not([data-theme="light"]) .modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .home-summary-card,
:root:not([data-theme="light"]) .home-summary-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
}

[data-theme="dark"] .profile-header,
:root:not([data-theme="light"]) .profile-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
}

[data-theme="dark"] .strategy-overview,
:root:not([data-theme="light"]) .strategy-overview {
    background: linear-gradient(135deg, #4a1d6a 0%, #5c2d5e 100%);
}

[data-theme="dark"] .position-summary-card,
:root:not([data-theme="light"]) .position-summary-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
:root:not([data-theme="light"]) input,
:root:not([data-theme="light"]) select,
:root:not([data-theme="light"]) textarea {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] input::placeholder,
:root:not([data-theme="light"]) input::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .toggle-slider,
:root:not([data-theme="light"]) .toggle-slider {
    background: var(--border-color);
}

[data-theme="dark"] h1,
:root:not([data-theme="light"]) h1 {
    color: var(--text-primary);
}

/* 深色模式卡片按钮样式 */
[data-theme="dark"] .card-btn,
:root:not([data-theme="light"]) .card-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .card-btn:hover,
:root:not([data-theme="light"]) .card-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* 深色模式数据按钮样式 */
[data-theme="dark"] .data-btn,
:root:not([data-theme="light"]) .data-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .data-btn:hover,
:root:not([data-theme="light"]) .data-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* 深色模式账户操作按钮样式 */
[data-theme="dark"] .account-actions .card-btn,
:root:not([data-theme="light"]) .account-actions .card-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .account-actions .card-btn:hover,
:root:not([data-theme="light"]) .account-actions .card-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* 深色模式策略操作按钮样式 */
[data-theme="dark"] .strategy-actions .btn-small,
:root:not([data-theme="light"]) .strategy-actions .btn-small {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .strategy-actions .btn-small:hover,
:root:not([data-theme="light"]) .strategy-actions .btn-small:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

[data-theme="dark"] .strategy-actions .btn-edit:hover,
:root:not([data-theme="light"]) .strategy-actions .btn-edit:hover {
    background: rgba(22, 93, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .strategy-actions .btn-delete:hover,
:root:not([data-theme="light"]) .strategy-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--profit-color);
    color: var(--profit-color);
}

/* 深色模式切换按钮 */
.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.theme-toggle i {
    font-size: 18px;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.theme-toggle:active {
    transform: scale(0.95);
}

@media screen and (max-width: 767px) {
    .theme-toggle {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle i {
        font-size: 16px;
    }
}

/* 深色模式账户卡片样式 */
[data-theme="dark"] .account-item,
:root:not([data-theme="light"]) .account-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .account-name,
:root:not([data-theme="light"]) .account-name {
    color: var(--text-primary);
}

[data-theme="dark"] .account-balance,
:root:not([data-theme="light"]) .account-balance {
    color: var(--primary-color);
}

[data-theme="dark"] .account-ratio .value,
[data-theme="dark"] .account-target .value,
[data-theme="dark"] .account-deviation .value,
:root:not([data-theme="light"]) .account-ratio .value,
:root:not([data-theme="light"]) .account-target .value,
:root:not([data-theme="light"]) .account-deviation .value {
    color: var(--text-primary);
}

[data-theme="dark"] .sub-account-item,
:root:not([data-theme="light"]) .sub-account-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .sub-account-name,
:root:not([data-theme="light"]) .sub-account-name {
    color: var(--text-primary);
}

/* 深色模式基金卡片样式 */
[data-theme="dark"] .fund-card,
:root:not([data-theme="light"]) .fund-card {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .fund-card-name,
:root:not([data-theme="light"]) .fund-card-name {
    color: var(--text-primary);
}

[data-theme="dark"] .fund-card-price,
:root:not([data-theme="light"]) .fund-card-price {
    color: var(--text-primary);
}

[data-theme="dark"] .fund-detail-value,
:root:not([data-theme="light"]) .fund-detail-value {
    color: var(--text-secondary);
}

[data-theme="dark"] .fund-card-details,
:root:not([data-theme="light"]) .fund-card-details {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .fund-card-actions,
:root:not([data-theme="light"]) .fund-card-actions {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .action-btn,
:root:not([data-theme="light"]) .action-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .action-btn:hover,
:root:not([data-theme="light"]) .action-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .action-btn.remove,
:root:not([data-theme="light"]) .action-btn.remove {
    border-color: var(--profit-color);
    color: var(--profit-color);
}

[data-theme="dark"] .action-btn.remove:hover,
:root:not([data-theme="light"]) .action-btn.remove:hover {
    background: var(--profit-color);
    color: white;
}

[data-theme="dark"] .back-btn,
:root:not([data-theme="light"]) .back-btn {
    color: var(--text-primary);
}

[data-theme="dark"] .back-btn:hover,
:root:not([data-theme="light"]) .back-btn:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .subpage-header span,
:root:not([data-theme="light"]) .subpage-header span {
    color: var(--text-primary);
}

/* 深色模式搜索框样式 */
[data-theme="dark"] #fundCode,
:root:not([data-theme="light"]) #fundCode {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* 深色模式表单样式 */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
:root:not([data-theme="light"]) .form-input,
:root:not([data-theme="light"]) .form-select {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* 深色模式标签样式 */
[data-theme="dark"] .tab,
:root:not([data-theme="light"]) .tab {
    color: var(--text-secondary);
}

[data-theme="dark"] .tab.active,
:root:not([data-theme="light"]) .tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
}

/* 深色模式分组标签样式 */
[data-theme="dark"] .group-tab,
:root:not([data-theme="light"]) .group-tab {
    color: var(--text-secondary);
}

[data-theme="dark"] .group-tab.active,
:root:not([data-theme="light"]) .group-tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
}

/* 深色模式设置项样式 */
[data-theme="dark"] .settings-item,
:root:not([data-theme="light"]) .settings-item {
    border-bottom-color: var(--border-color);
}

/* 深色模式模态框样式 */
[data-theme="dark"] .modal-header,
:root:not([data-theme="light"]) .modal-header {
    border-bottom-color: var(--border-color);
}

/* 深色模式历史记录样式 */
[data-theme="dark"] .history-item,
:root:not([data-theme="light"]) .history-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .history-item:hover,
:root:not([data-theme="light"]) .history-item:hover {
    background-color: var(--bg-secondary);
}

/* 深色模式批量操作样式 */
[data-theme="dark"] .batch-item,
:root:not([data-theme="light"]) .batch-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .batch-item:hover,
:root:not([data-theme="light"]) .batch-item:hover {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .batch-update-item,
:root:not([data-theme="light"]) .batch-update-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .batch-update-item:hover,
:root:not([data-theme="light"]) .batch-update-item:hover {
    background-color: var(--bg-secondary);
}

/* 深色模式表单标签样式 */
[data-theme="dark"] .form-label,
:root:not([data-theme="light"]) .form-label {
    color: var(--text-secondary);
}

/* 深色模式卡片标题样式 */
[data-theme="dark"] .card-title,
:root:not([data-theme="light"]) .card-title {
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

/* 深色模式数据管理组标题样式 */
[data-theme="dark"] .group-title,
:root:not([data-theme="light"]) .group-title {
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

/* 深色模式警告提示样式 */
[data-theme="dark"] .warning-tip,
:root:not([data-theme="light"]) .warning-tip {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

[data-theme="dark"] .warning-tip i,
:root:not([data-theme="light"]) .warning-tip i {
    color: #fbbf24;
}

/* 深色模式补充推荐样式 */
[data-theme="dark"] .supplement-details,
:root:not([data-theme="light"]) .supplement-details {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

/* 深色模式账户概览样式 */
[data-theme="dark"] .accounts-overview,
:root:not([data-theme="light"]) .accounts-overview {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
}

/* 深色模式投资项样式 */
[data-theme="dark"] .investment-item,
:root:not([data-theme="light"]) .investment-item {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .investment-item.core,
:root:not([data-theme="light"]) .investment-item.core {
    background: linear-gradient(135deg, rgba(64, 128, 255, 0.1) 0%, rgba(64, 128, 255, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
}

[data-theme="dark"] .investment-item.satellite,
:root:not([data-theme="light"]) .investment-item.satellite {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left: 4px solid #fbbf24;
}

/* 深色模式登录操作按钮样式 */
[data-theme="dark"] .login-actions .action-btn,
:root:not([data-theme="light"]) .login-actions .action-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .login-actions .action-btn:hover,
:root:not([data-theme="light"]) .login-actions .action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

/* 深色模式行为指南编辑器样式 */
[data-theme="dark"] .behavior-guidelines-editor,
:root:not([data-theme="light"]) .behavior-guidelines-editor {
    background: var(--bg-tertiary);
}

/* 深色模式补仓推荐样式 */
[data-theme="dark"] .recommendation-item,
:root:not([data-theme="light"]) .recommendation-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

/* 深色模式再平衡弹窗样式 */
[data-theme="dark"] .rebalance-summary,
:root:not([data-theme="light"]) .rebalance-summary {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .adjustment-item,
:root:not([data-theme="light"]) .adjustment-item {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

/* 深色模式预测页面样式 */
[data-theme="dark"] .prediction-content,
:root:not([data-theme="light"]) .prediction-content {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .prediction-meta,
:root:not([data-theme="light"]) .prediction-meta {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* 深色模式底部导航栏样式 */
[data-theme="dark"] .nav-item,
:root:not([data-theme="light"]) .nav-item {
    color: var(--text-muted);
}

[data-theme="dark"] .nav-item:hover,
:root:not([data-theme="light"]) .nav-item:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .nav-item.active,
:root:not([data-theme="light"]) .nav-item.active {
    color: var(--primary-color);
    background: rgba(64, 128, 255, 0.1);
}

/* 深色模式首页汇总卡片样式 */
[data-theme="dark"] .home-summary-card,
:root:not([data-theme="light"]) .home-summary-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
}

/* 深色模式行情页面样式 */
[data-theme="dark"] .section-divider,
:root:not([data-theme="light"]) .section-divider {
    color: var(--text-muted);
}

[data-theme="dark"] .section-divider::before,
[data-theme="dark"] .section-divider::after,
:root:not([data-theme="light"]) .section-divider::before,
:root:not([data-theme="light"]) .section-divider::after {
    background: var(--border-color);
}

/* 深色模式持仓页面样式 */
[data-theme="dark"] .portfolio-summary .summary-card,
:root:not([data-theme="light"]) .portfolio-summary .summary-card {
    background: var(--bg-tertiary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .portfolio-tab,
:root:not([data-theme="light"]) .portfolio-tab {
    color: var(--text-muted);
}

[data-theme="dark"] .portfolio-tab.active,
:root:not([data-theme="light"]) .portfolio-tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 深色模式我的页面样式 */
[data-theme="dark"] .profile-menu,
:root:not([data-theme="light"]) .profile-menu {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .menu-item,
:root:not([data-theme="light"]) .menu-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .menu-item:hover,
:root:not([data-theme="light"]) .menu-item:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .menu-item i:first-child,
:root:not([data-theme="light"]) .menu-item i:first-child {
    color: var(--primary-color);
}

[data-theme="dark"] .menu-item span,
:root:not([data-theme="light"]) .menu-item span {
    color: var(--text-secondary);
}

[data-theme="dark"] .menu-item i:last-child,
:root:not([data-theme="light"]) .menu-item i:last-child {
    color: var(--text-muted);
}

/* 深色模式下拉刷新样式 */
[data-theme="dark"] .pull-refresh,
:root:not([data-theme="light"]) .pull-refresh {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

/* 深色模式滑动操作样式 */
[data-theme="dark"] .fund-card-header,
:root:not([data-theme="light"]) .fund-card-header {
    background: var(--bg-tertiary);
}

/* 深色模式触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    [data-theme="dark"] .nav-item:active,
    [data-theme="dark"] .menu-item:active,
    [data-theme="dark"] .fund-card-header:active,
    [data-theme="dark"] .action-btn:active,
    [data-theme="dark"] .btn:active,
    :root:not([data-theme="light"]) .nav-item:active,
    :root:not([data-theme="light"]) .menu-item:active,
    :root:not([data-theme="light"]) .fund-card-header:active,
    :root:not([data-theme="light"]) .action-btn:active,
    :root:not([data-theme="light"]) .btn:active {
        opacity: 0.7;
    }
}

.behavior-guidelines-editor {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    min-height: 200px;
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 15px;
    border: 1px solid var(--border-color);
    outline: none;
    overflow-y: auto;
}

.behavior-guidelines-editor:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    pointer-events: none;
}

.behavior-guidelines-editor div,
.behavior-guidelines-editor p {
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.behavior-guidelines-editor div:last-child,
.behavior-guidelines-editor p:last-child {
    margin-bottom: 0;
}

[data-theme="dark"] #behaviorGuidelinesView,
:root:not([data-theme="light"]) #behaviorGuidelinesView {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-supplement,
:root:not([data-theme="light"]) .btn-supplement {
    background: #22c55e;
}

[data-theme="dark"] .btn-supplement:hover,
:root:not([data-theme="light"]) .btn-supplement:hover {
    background: #16a34a;
}

[data-theme="dark"] .card-btn,
:root:not([data-theme="light"]) .card-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

[data-theme="dark"] .account-actions .card-btn,
:root:not([data-theme="light"]) .account-actions .card-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

[data-theme="dark"] .account-actions .card-btn:hover,
:root:not([data-theme="light"]) .account-actions .card-btn:hover {
    border-color: #165DFF;
    background: #165DFF;
    color: white;
}

[data-theme="dark"] .card-btn:hover,
:root:not([data-theme="light"]) .card-btn:hover {
    background: #165DFF;
    border-color: #165DFF;
}

.card-btn.has-alert {
    background: linear-gradient(135deg, #F53F3F 0%, #ff6b6b 100%) !important;
    color: white !important;
    border-color: #F53F3F !important;
}

.card-btn.has-alert:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #F53F3F 100%) !important;
    border-color: #ff6b6b !important;
}

[data-theme="dark"] .btn-edit-account,
:root:not([data-theme="light"]) .btn-edit-account {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

[data-theme="dark"] .btn-edit-account:hover,
:root:not([data-theme="light"]) .btn-edit-account:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}
