/* ===============================
   基金持仓管理系统 - 样式表
   =============================== */

/* === 主题颜色变量定义 === */
/* 浅色主题 (默认) */
:root {
    /* 背景颜色 */
    --bg-primary: #f5f5f5;        /* 主背景色 */
    --bg-secondary: #ffffff;      /* 卡片背景色 */
    --bg-tertiary: #fafafa;       /* 辅助背景色 */

    /* 文字颜色 */
    --text-primary: #333333;      /* 主文字色 */
    --text-secondary: #666666;    /* 次要文字色 */
    --text-contrast: white;       /* 对比文字色 */

    /* 边框和阴影 */
    --border-color: #e1e5e9;      /* 主边框色 */
    --border-light: #ddd;         /* 浅边框色 */
    --shadow: rgba(0,0,0,0.1);    /* 阴影色 */

    /* 交互颜色 */
    --hover-bg: #e3f2fd;          /* 悬停背景色 */
    --input-bg: #f8f9fa;          /* 输入框背景色 */

    /* 渐变色 */
    --gradient-start: #667eea;    /* 渐变起始色 */
    --gradient-end: #764ba2;      /* 渐变结束色 */

    /* 状态颜色 */
    --success-color: #28a745;     /* 成功色 (绿色) */
    --warning-color: #ffc107;     /* 警告色 (黄色) */
    --danger-color: #dc3545;      /* 危险色 (红色) */
    --info-color: #17a2b8;        /* 信息色 (蓝色) */

    /* 动画过渡 */
    --transition-theme: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    --transition-interaction: all 0.3s ease;
    --transition-input: all 0.2s ease;

    /* 层级 */
    --z-overlay: 1000;            /* 覆盖层层级 */
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;        /* 深色主背景 */
    --bg-secondary: #2d2d2d;      /* 深色卡片背景 */
    --bg-tertiary: #3a3a3a;       /* 深色辅助背景 */
    --text-primary: #f0f0f0;      /* 深色主文字 */
    --text-secondary: #c0c0c0;    /* 深色次要文字 */
    --text-contrast: #ffffff;     /* 深色对比文字 */
    --border-color: #4a4a4a;      /* 深色边框 */
    --border-light: #555;         /* 深色浅边框 */
    --shadow: rgba(0,0,0,0.3);    /* 深色阴影 */
    --hover-bg: #404040;          /* 深色悬停背景 */
    --input-bg: #3a3a3a;          /* 深色输入框背景 */
    --gradient-start: #4a5568;    /* 深色渐变起始 */
    --gradient-end: #2d3748;      /* 深色渐变结束 */
}

/* === 全局重置样式 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === 页面基础样式 === */
body {
    font-family: "Microsoft YaHei", Arial, sans-serif;  /* 字体设置 */
    background-color: var(--bg-primary);                /* 页面背景色 */
    color: var(--text-primary);                         /* 页面文字色 */
    padding: 0;                                         /* 去除页面内边距 */
    margin: 0;                                          /* 去除页面外边距 */
    transition: var(--transition-theme);                 /* 主题切换动画 */
}

/* === 主容器样式 === */
.container {
    background: var(--bg-secondary);          /* 容器背景色 */
    border-radius: 0;                         /* 去除圆角 */
    box-shadow: none;                         /* 去除阴影效果 */
    overflow: hidden;                         /* 内容溢出隐藏 */
    max-width: none;                         /* 去除最大宽度限制 */
    width: 100%;                             /* 占满全宽 */
    min-height: 100vh;                       /* 最小高度为视窗高度 */
    margin: 0;                               /* 去除外边距 */
    transition: var(--transition-theme);     /* 主题切换动画 */
}

/* === 头部区域样式 === */
.header {
    background: transparent;               /* 透明背景 */
    color: var(--text-primary);           /* 文字颜色 */
    padding: 20px;                        /* 内边距 */
    position: relative;                   /* 相对定位 */
    transition: var(--transition-theme);  /* 主题切换动画 */
}

.header-content {
    display: flex;                        /* 弹性布局 */
    justify-content: space-between;      /* 两端对齐 */
    align-items: center;                 /* 垂直居中 */
    max-width: none;                     /* 去除最大宽度限制 */
    width: 100%;                         /* 占满全宽 */
    margin: 0;                           /* 去除外边距 */
    padding: 0 20px;                     /* 添加左右内边距 */
    box-sizing: border-box;              /* 包含内边距在宽度内 */
}

.header-text {
    text-align: left;                    /* 左对齐 */
    flex: 1;                             /* 弹性增长 */
}

.header-controls {
    display: flex;                       /* 弹性布局 */
    gap: 10px;                          /* 子元素间距 */
    align-items: center;                /* 垂直居中 */
}

/* === 头部按钮样式 === */
.nav-btn, .theme-toggle {
    background: transparent;                      /* 透明背景 */
    border: 1px solid var(--border-color);      /* 边框 */
    border-radius: 8px;                         /* 圆角 */
    padding: 8px 15px;                          /* 内边距 */
    display: flex;                              /* 弹性布局 */
    align-items: center;                        /* 垂直居中 */
    justify-content: center;                    /* 水平居中 */
    cursor: pointer;                            /* 手型光标 */
    transition: var(--transition-interaction);  /* 交互动画 */
    text-decoration: none;                      /* 无下划线 */
    color: var(--text-primary);                /* 文字颜色 */
    font-size: 13px;                           /* 字体大小 */
    font-weight: 500;                          /* 字体粗细 */
}

/* 主题切换按钮特殊样式 */
.theme-toggle {
    border-radius: 50%;                         /* 圆形按钮 */
    width: 40px;                               /* 宽度 (缩小) */
    height: 40px;                              /* 高度 (缩小) */
    padding: 0;                                /* 无内边距 */
}

/* 按钮悬停效果 */
.nav-btn:hover, .theme-toggle:hover {
    background: var(--hover-bg);               /* 悬停背景色 */
    border-color: var(--text-secondary);      /* 悬停边框色 */
    transform: scale(1.05);                    /* 微放大效果 */
}

/* 主题图标样式 */
.theme-icon {
    font-size: 18px;                          /* 图标大小 (缩小) */
    transition: transform 0.3s ease;          /* 旋转动画 */
}

/* 主题切换点击旋转效果 */
.theme-toggle:active .theme-icon {
    transform: rotate(360deg);                 /* 360度旋转 */
}

/* === 操作按钮样式 === */
.action-btn {
    background: var(--bg-secondary);                 /* 按钮背景 */
    border: 1px solid var(--border-color);          /* 边框 */
    border-radius: 6px;                             /* 圆角 */
    padding: 8px 12px;                              /* 内边距 */
    display: flex;                                  /* 弹性布局 */
    align-items: center;                            /* 垂直居中 */
    gap: 5px;                                      /* 图标与文字间距 */
    cursor: pointer;                               /* 手型光标 */
    transition: var(--transition-interaction);     /* 交互动画 */
    color: var(--text-primary);                   /* 文字颜色 */
    font-size: 12px;                             /* 字体大小 */
    font-weight: 500;                             /* 字体粗细 */
    min-width: 75px;                             /* 最小宽度 */
    justify-content: center;                      /* 水平居中 */
}

/* 操作按钮图标样式 */
.btn-icon {
    font-size: 14px;                             /* 图标大小 */
    transition: transform 0.2s ease;             /* 变换动画 */
}

/* 操作按钮悬停效果 */
.action-btn:hover {
    background: var(--hover-bg);                 /* 悬停背景 */
    border-color: var(--text-secondary);        /* 悬停边框 */
    transform: translateY(-1px);                 /* 微上移效果 */
    box-shadow: 0 2px 8px var(--shadow);        /* 悬停阴影 */
}

/* 操作按钮点击效果 */
.action-btn:active {
    transform: translateY(0);                    /* 按下回弹 */
    box-shadow: 0 1px 3px var(--shadow);       /* 按下阴影 */
}

/* 操作按钮点击图标旋转 */
.action-btn:active .btn-icon {
    transform: scale(0.9) rotate(180deg);       /* 缩放旋转 */
}

/* 更新按钮特殊样式 */
.update-btn {
    border-color: var(--success-color);         /* 绿色边框 */
    color: var(--success-color);               /* 绿色文字 */
}

.update-btn:hover {
    background: rgba(40, 167, 69, 0.1);        /* 绿色悬停背景 */
    border-color: var(--success-color);        /* 保持绿色边框 */
}

/* 校验按钮特殊样式 */
.validate-btn {
    border-color: var(--info-color);           /* 蓝色边框 */
    color: var(--info-color);                 /* 蓝色文字 */
}

.validate-btn:hover {
    background: rgba(23, 162, 184, 0.1);      /* 蓝色悬停背景 */
    border-color: var(--info-color);          /* 保持蓝色边框 */
}

/* 刷新按钮特殊样式 */
.refresh-btn {
    border-color: var(--warning-color);        /* 黄色边框 */
    color: var(--warning-color);              /* 黄色文字 */
}

.refresh-btn:hover {
    background: rgba(255, 193, 7, 0.1);       /* 黄色悬停背景 */
    border-color: var(--warning-color);       /* 保持黄色边框 */
}

/* 按钮加载状态 */
.action-btn.loading {
    cursor: not-allowed;                       /* 禁用光标 */
    opacity: 0.7;                            /* 半透明 */
}

.action-btn.loading .btn-icon {
    animation: spin 1s linear infinite;        /* 旋转动画 */
}

/* 旋转动画定义 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === 头部标题样式 === */
.header h1 {
    font-size: 24px;                          /* 标题字体大小 */
    margin-bottom: 5px;                       /* 底部边距 */
}

.header p {
    font-size: 14px;                          /* 副标题字体大小 */
    opacity: 0.9;                             /* 透明度 */
}

/* === 统计数据区域样式 === */
.stats {
    display: flex;                            /* 弹性布局 */
    justify-content: space-around;           /* 均匀分布 */
    padding: 20px;                           /* 内边距 */
    background-color: var(--bg-tertiary);   /* 背景颜色 */
    border-bottom: 1px solid var(--border-color); /* 底部边框 */
    flex-wrap: wrap;                         /* 允许换行 */
    gap: 10px;                              /* 子元素间距 */
    transition: var(--transition-theme);    /* 主题切换动画 */
}

.stat-item {
    text-align: center;                      /* 文字居中 */
    min-width: 120px;                       /* 最小宽度 */
}

.stat-value {
    font-size: 18px;                        /* 数值字体大小 */
    font-weight: bold;                      /* 粗体 */
    color: var(--text-primary);            /* 文字颜色 */
    transition: var(--transition-theme);   /* 主题切换动画 */
}

.stat-label {
    font-size: 12px;                        /* 标签字体大小 */
    color: var(--text-secondary);          /* 次要文字色 */
    margin-top: 5px;                       /* 顶部边距 */
    transition: var(--transition-theme);   /* 主题切换动画 */
}

/* === 表格容器样式 === */
.table-container {
    overflow-x: auto;                        /* 水平滚动条 */
    padding: 20px;                           /* 内边距 */
    -webkit-overflow-scrolling: touch;      /* 移动端平滑滚动 */
}

/* === 表格基本样式 === */
table {
    width: 100%;                            /* 占满宽度 */
    border-collapse: collapse;              /* 边框合并 */
    font-size: 12px;                        /* 字体大小 */
    min-width: 1000px;                      /* 最小宽度（保证在手机上滚动） */
}

/* 表头样式 */
th {
    background-color: var(--bg-tertiary);   /* 表头背景色 */
    color: var(--text-primary);            /* 文字颜色 */
    font-weight: bold;                      /* 粗体 */
    padding: 12px 8px;                      /* 内边距 */
    text-align: center;                     /* 文字居中 */
    border: 1px solid var(--border-color); /* 边框 */
    white-space: nowrap;                    /* 禁止换行 */
    transition: var(--transition-theme);   /* 主题切换动画 */
}

/* 表格单元格样式 */
td {
    padding: 10px 8px;                      /* 内边距 */
    text-align: center;                     /* 文字居中 */
    border: 1px solid var(--border-color); /* 边框 */
    white-space: nowrap;                    /* 禁止换行 */
    transition: var(--transition-theme);   /* 主题切换动画 */
}

/* 表格偶数行样式 */
tr:nth-child(even) {
    background-color: var(--bg-tertiary);   /* 交替背景色 */
    transition: var(--transition-theme);    /* 主题切换动画 */
}

/* === 数据状态颜色样式 === */
/* 上涨（中国股市惯例：红色） */
.positive {
    color: #dc3545;                         /* 上涨颜色（红色） */
    font-weight: bold;                      /* 粗体 */
}

/* 下跌（中国股市惯例：绿色） */
.negative {
    color: #28a745;                         /* 下跌颜色（绿色） */
    font-weight: bold;                      /* 粗体 */
}

/* 无变化或数据为零 */
.zero {
    color: var(--text-secondary);          /* 中性颜色 */
}

/* 最新变化数据样式 */
.latest-change {
    font-weight: 600;                      /* 稍粗字体 */
}

/* === 计算列数据样式 === */
/* 一般计算列样式 */
.calculated {
    background-color: var(--bg-tertiary);   /* 辅助背景色 */
    font-weight: 500;                       /* 微粗字体 */
}

/* 自定义金额列样式 */
.custom-amount {
    background-color: transparent;          /* 透明背景 */
    color: var(--text-primary);            /* 主文字色 */
    font-weight: bold;                      /* 粗体 */
}

/* 深色主题下的计算列样式 */
[data-theme="dark"] .calculated {
    background-color: transparent;          /* 深色主题下透明背景 */
    color: var(--text-primary);            /* 深色主题下文字色 */
}

[data-theme="dark"] .custom-amount {
    background-color: transparent;          /* 深色主题下透明背景 */
    color: var(--text-primary);            /* 深色主题下文字色 */
}

/* === 页脚样式 === */
.footer {
    padding: 15px 20px;                     /* 内边距 */
    text-align: center;                     /* 文字居中 */
    font-size: 12px;                        /* 字体大小 */
    color: var(--text-secondary);          /* 次要文字色 */
    border-top: 1px solid var(--border-color); /* 顶部边框 */
    background-color: var(--bg-tertiary);   /* 背景色 */
    transition: var(--transition-theme);    /* 主题切换动画 */
}

/* === 图表查看按钮样式 === */
.chart-btn {
    background: transparent;                 /* 透明背景 */
    border: 1px solid var(--border-color); /* 边框 */
    border-radius: 4px;                     /* 圆角 */
    padding: 5px 10px;                      /* 内边距 */
    font-size: 10px;                        /* 字体大小 */
    color: var(--text-primary);            /* 文字颜色 */
    cursor: pointer;                        /* 手型光标 */
    transition: var(--transition-interaction); /* 交互动画 */
}

/* 图表按钮悬停效果 */
.chart-btn:hover {
    background: var(--hover-bg);           /* 悬停背景色 */
    transform: translateY(-1px);           /* 微向上移动 */
}

/* === 图表模态框样式 === */
#fundChartModal {
    position: fixed;                        /* 固定定位 */
    top: 0;
    left: 0;
    width: 100vw;                          /* 全屏宽度 */
    height: 100vh;                         /* 全屏高度 */
    background: rgba(0, 0, 0, 0.8);       /* 半透明黑色背景 */
    z-index: var(--z-overlay);            /* 层级 */
    display: none;                         /* 默认隐藏 */
    backdrop-filter: blur(5px);           /* 背景模糊效果 */
}

/* 模态框内容区域 */
#fundChartModal .modal-content {
    position: absolute;                     /* 绝对定位 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);      /* 居中显示 */
    background: var(--bg-secondary);       /* 内容背景色 */
    border-radius: 12px;                   /* 圆角 */
    width: 90vw;                          /* 宽度 */
    max-height: 90vh;                     /* 最大高度改为90vh,确保不超出视窗 */
    max-width: 1200px;                    /* 最大宽度 */
    box-shadow: 0 10px 30px var(--shadow); /* 阴影效果 */
    display: flex;                         /* 弹性布局 */
    flex-direction: column;                /* 垂直排列 */
    overflow: hidden;                      /* 隐藏溢出,由内部滚动处理 */
}

/* 模态框头部 */
#fundChartModal .modal-header {
    padding: 20px;                         /* 内边距 */
    border-bottom: 1px solid var(--border-color); /* 底部边框 */
    display: flex;                         /* 弹性布局 */
    justify-content: space-between;       /* 两端对齐 */
    align-items: center;                  /* 垂直居中 */
    background: var(--bg-tertiary);       /* 头部背景色 */
    border-radius: 12px 12px 0 0;         /* 上方圆角 */
}

#fundChartModal .modal-header h2 {
    margin: 0;                             /* 无外边距 */
    color: var(--text-primary);           /* 文字颜色 */
    font-size: 20px;                      /* 字体大小 */
}

/* 模态框头部操作按钮区域 */
#fundChartModal .modal-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 标签页导航 */
.chart-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    padding: 0 20px;
}

.chart-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.chart-tab:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.chart-tab.active {
    color: var(--gradient-start);
    border-bottom-color: var(--gradient-start);
    font-weight: 600;
}

/* 标签页内容 */
.chart-tab-content {
    display: none;
}

.chart-tab-content.active {
    display: block;
}

/* 历史净值标签页样式 */
#historyTab {
    padding: 0 20px 20px 20px;
}

#historyTab #fundDataTableContainer {
    max-height: 500px;
    overflow-y: auto;
}

/* 持仓明细标签页样式 */
#positionTab {
    padding: 0 20px 20px 20px;
}

#fundPositionContainer {
    max-height: 500px;
    overflow-y: auto;
}

.position-summary {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.position-summary-item {
    text-align: center;
}

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

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

.position-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    table-layout: auto;
}

.position-table thead tr {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

.position-table th {
    padding: 2px 6px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-size: 11px;
    white-space: nowrap;
}

.position-table tbody tr {
    transition: background 0.2s ease;
}

.position-table tbody tr:hover {
    background: var(--hover-bg) !important;
}

.position-table td {
    padding: 1px 6px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
}

/* 关闭按钮 */
#fundChartModal .close-btn {
    background: none;                      /* 无背景 */
    border: none;                          /* 无边框 */
    font-size: 24px;                      /* 字体大小 */
    cursor: pointer;                       /* 手型光标 */
    color: var(--text-secondary);         /* 文字颜色 */
    transition: var(--transition-interaction); /* 交互动画 */
}

#fundChartModal .close-btn:hover {
    color: var(--danger-color);           /* 悬停变红色 */
    transform: scale(1.1);                /* 微放大 */
}

/* 模态框主体内容区域 */
#fundChartModal .modal-body {
    flex: 1;                              /* 占据剩余空间 */
    padding: 20px;                        /* 内边距 */
    overflow-y: auto;                     /* 允许垂直滚动 */
    overflow-x: hidden;                   /* 隐藏水平溢出 */
    -webkit-overflow-scrolling: touch;    /* iOS平滑滚动 */
}

/* === 图表中统计信息区域样式 === */
.statistics-bar {
    display: flex;                          /* 弹性布局 */
    justify-content: space-around;         /* 均匀分布 */
    background: var(--bg-tertiary);        /* 背景色 */
    padding: 15px;                         /* 内边距 */
    margin-bottom: 20px;                   /* 底部边距 */
    border-radius: 8px;                    /* 圆角 */
    flex-wrap: wrap;                       /* 允许换行 */
    gap: 10px;                            /* 子元素间距 */
}

.statistics-bar .stat-item {
    text-align: center;                    /* 文字居中 */
    min-width: 100px;                     /* 最小宽度 */
}

.statistics-bar .stat-value {
    font-size: 16px;                      /* 数值字体大小 */
    font-weight: bold;                    /* 粗体 */
    margin-bottom: 5px;                   /* 底部边距 */
}

.statistics-bar .stat-label {
    font-size: 11px;                      /* 标签字体大小 */
    color: var(--text-secondary);         /* 次要文字色 */
}

/* === 图表容器样式 === */
#fundChart {
    width: 100%;                          /* 占满宽度 */
    height: 500px;                        /* 高度 */
}

/* === 消息提示容器样式 === */
#messageContainer {
    position: fixed;                       /* 固定定位 */
    top: 20px;                            /* 距离顶部 */
    right: 20px;                          /* 距离右侧 */
    z-index: calc(var(--z-overlay) + 100); /* 最高层级 */
}

/* 消息提示样式 */
.message {
    background: var(--bg-secondary);       /* 背景色 */
    border-left: 4px solid var(--info-color); /* 左侧边框（信息色） */
    padding: 15px 20px;                   /* 内边距 */
    margin-bottom: 10px;                  /* 底部边距 */
    border-radius: 0 8px 8px 0;          /* 右侧圆角 */
    box-shadow: 0 4px 12px var(--shadow); /* 阴影效果 */
    max-width: 350px;                     /* 最大宽度 */
    animation: slideIn 0.3s ease;         /* 滑入动画 */
}

/* 不同类型消息的边框色 */
.message.success {
    border-left-color: var(--success-color); /* 成功消息绿色 */
}

.message.warning {
    border-left-color: var(--warning-color); /* 警告消息黄色 */
}

.message.error {
    border-left-color: var(--danger-color);  /* 错误消息红色 */
}

/* 消息滑入动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);          /* 从右侧滑入 */
        opacity: 0;                           /* 初始透明 */
    }
    to {
        transform: translateX(0);             /* 滑入到位 */
        opacity: 1;                           /* 完全不透明 */
    }
}

/* === 自定义金额输入框样式 === */
#customAmount {
    border: 1px solid var(--border-light);   /* 边框 */
    background: var(--input-bg);              /* 输入框背景色 */
    color: var(--text-primary);              /* 文字颜色 */
    border-radius: 4px;                      /* 圆角 */
    padding: 4px 8px;                        /* 内边距 */
    transition: var(--transition-input);     /* 输入动画 */
}

/* 输入框聚焦效果 */
#customAmount:focus {
    outline: none;                           /* 移除默认轮廓 */
    box-shadow: 0 0 3px rgba(102, 126, 234, 0.3); /* 蓝色发光效果 */
}

/* ===============================
   响应式设计 - 移动端适配
   =============================== */

/* === 手机横屏时的特殊处理 === */
/* 在手机横屏时尽可能利用屏幕空间 */
@media screen and (max-height: 768px) and (orientation: landscape) {
    .container, .header-content {
        max-width: none;                     /* 去除最大宽度限制 */
        width: 100%;                         /* 横屏时占满屏幕 */
    }
    body {
        padding: 0;                          /* 去除页面内边距 */
    }
}

/* === 平板和小屏幕设备 (768px 以下) === */
@media (max-width: 768px) {
    body {
        padding: 0;                         /* 去除页面内边距 */
        margin: 0;                          /* 去除页面外边距 */
    }

    .container {
        border-radius: 0;                   /* 小屏幕上去除圆角 */
        width: 100%;                        /* 占满全宽 */
        max-width: none;                    /* 去除最大宽度限制 */
        margin: 0;                          /* 去除外边距 */
        min-height: 100vh;                  /* 最小高度为视窗高度 */
    }

    /* 头部区域调整 */
    .header {
        padding: 15px 20px;                 /* 调整内边距 */
    }

    .header-content {
        padding: 0;                          /* 去除内边距 */
        max-width: none;                     /* 去除宽度限制 */
        width: 100%;                        /* 占满全宽 */
    }
    .header h1 {
        font-size: 20px;                    /* 减小标题字体 */
    }

    /* 统计区域调整 */
    .stats {
        padding: 15px 10px;                 /* 调整内边距 */
        justify-content: space-between;     /* 两端对齐 */
    }
    .stat-item {
        min-width: 80px;                    /* 减小最小宽度 */
    }
    .stat-value {
        font-size: 16px;                    /* 调整字体大小 */
    }
    .stat-label {
        font-size: 10px;                    /* 调整标签字体 */
    }

    /* 表格区域调整 */
    .table-container {
        padding: 10px 0;                    /* 调整内边距 */
        margin: 0;                           /* 去除外边距 */
    }
    table {
        font-size: 10px;                    /* 减小表格字体 */
        min-width: 800px;                   /* 保持最小宽度以支持滚动 */
    }
    th, td {
        padding: 8px 4px;                   /* 减小单元格内边距 */
    }

    /* 页脚调整 */
    .footer {
        padding: 10px;
        font-size: 10px;
    }

    /* 图表按钮调整 */
    .chart-btn {
        font-size: 9px;
        padding: 4px 8px;
    }

    /* 头部控制按钮调整 */
    .header-controls {
        flex-direction: column;              /* 垂直排列 */
        gap: 5px;
    }
    .nav-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* 自定义金额输入框调整 */
    #customAmount {
        width: 60px !important;              /* 强制设置宽度 */
        font-size: 9px !important;           /* 强制设置字体大小 */
        padding: 2px 4px !important;         /* 强制设置内边距 */
    }

    /* 模态框调整 */
    #fundChartModal .modal-content {
        width: 95vw;                         /* 增加宽度利用率 */
        height: 85vh;                        /* 增加高度利用率 */
    }

    #fundChartModal .modal-header {
        padding: 15px;                       /* 减少内边距 */
    }

    #fundChartModal .modal-header h2 {
        font-size: 18px;                     /* 减小标题字体 */
    }

    #fundChartModal .modal-body {
        padding: 15px;                       /* 减少内边距 */
    }

    /* 统计栏调整 */
    .statistics-bar {
        padding: 10px;                       /* 减少内边距 */
        margin-bottom: 15px;                 /* 减少底部边距 */
    }

    .statistics-bar .stat-value {
        font-size: 14px;                     /* 调整字体大小 */
    }

    .statistics-bar .stat-label {
        font-size: 10px;                     /* 调整标签字体 */
    }

    /* 图表容器调整 */
    #fundChart {
        height: 300px;                       /* 减少图表高度 */
    }
}

/* === 超小屏幕设备 (480px 以下) === */
/* 针对手机竖屏等超小屏幕的特殊优化 */
@media (max-width: 480px) {
    body {
        padding: 0;                             /* 去除所有内边距 */
        margin: 0;                              /* 去除所有外边距 */
    }

    .container {
        width: 100%;                            /* 占满全宽 */
        max-width: none;                        /* 去除最大宽度限制 */
        margin: 0;                              /* 去除外边距 */
        border-radius: 0;                       /* 去除圆角 */
        min-height: 100vh;                      /* 最小高度为视窗高度 */
    }

    .header {
        padding: 8px 10px;                      /* 进一步减小头部内边距 */
    }

    .header-content {
        padding: 0;                             /* 去除内边距 */
        width: 100%;                            /* 占满全宽 */
        max-width: none;                        /* 去除宽度限制 */
        flex-wrap: wrap;                        /* 允许换行 */
    }

    /* 头部标题进一步缩小并换行优化 */
    .header h1 {
        font-size: 16px;                        /* 更小的标题字体 */
        line-height: 1.3;                       /* 行高 */
        margin-bottom: 3px;                     /* 减小底部边距 */
    }

    .header p {
        font-size: 11px;                        /* 更小的副标题字体 */
        margin: 2px 0;                          /* 减小上下边距 */
    }

    /* 头部控制按钮区域优化 */
    .header-controls {
        flex-direction: row;                    /* 改为横向排列 */
        gap: 4px;                               /* 减小间距 */
        margin-top: 5px;                        /* 顶部边距 */
    }

    .theme-toggle {
        width: 32px;                            /* 减小按钮尺寸 */
        height: 32px;
    }

    .theme-icon {
        font-size: 14px;                        /* 减小图标尺寸 */
    }

    /* 统计区域优化 - 改为紧凑的2列网格布局 */
    .stats {
        display: grid;                          /* 改为网格布局 */
        grid-template-columns: 1fr 1fr;         /* 2列布局 */
        gap: 8px 10px;                          /* 行间距8px，列间距10px */
        padding: 10px 8px;                      /* 减小内边距 */
        justify-content: stretch;               /* 拉伸填充 */
    }

    /* 统计区域项目布局优化 - 横向紧凑布局 */
    .stat-item {
        display: flex;                          /* 弹性布局 */
        justify-content: space-between;         /* 两端对齐 */
        align-items: center;                    /* 垂直居中 */
        width: 100%;                            /* 占满宽度 */
        max-width: none;                        /* 去除最大宽度限制 */
        padding: 6px 8px;                       /* 内边距 */
        background: var(--bg-secondary);        /* 添加背景色 */
        border-radius: 6px;                     /* 圆角 */
        border: 1px solid var(--border-light); /* 边框 */
    }

    .stat-value {
        font-size: 13px;                        /* 调整数值字体 */
        font-weight: 700;                       /* 加粗 */
        margin-right: 6px;                      /* 右侧边距 */
        flex-shrink: 0;                         /* 不收缩 */
    }

    .stat-label {
        font-size: 9px;                         /* 调整标签字体 */
        text-align: right;                      /* 右对齐 */
        margin-top: 0;                          /* 重置顶部边距 */
        line-height: 1.2;                       /* 行高 */
        flex-shrink: 1;                         /* 允许收缩 */
    }

    /* 表格进一步优化 */
    table {
        font-size: 9px;                        /* 更小的表格字体 */
    }

    th, td {
        padding: 6px 3px;                      /* 更小的内边距 */
    }

    /* 图表按钮进一步缩小 */
    .chart-btn {
        font-size: 8px;                        /* 更小的按钮字体 */
        padding: 3px 6px;                      /* 更小的按钮内边距 */
    }

    /* 自定义金额输入框进一步缩小 */
    #customAmount {
        width: 50px !important;                 /* 更小的输入框宽度 */
        font-size: 8px !important;              /* 更小的输入框字体 */
    }

    /* 模态框最大化利用屏幕空间 */
    #fundChartModal .modal-content {
        width: 100vw;                          /* 全屏宽度 */
        max-height: 100vh;                     /* 全屏高度 */
        height: 100vh;                         /* 固定全屏高度 */
        border-radius: 0;                      /* 移除圆角 */
        top: 0;                                /* 顶部对齐 */
        left: 0;                               /* 左侧对齐 */
        transform: none;                       /* 移除居中变换 */
    }

    #fundChartModal .modal-header {
        padding: 12px 15px;                    /* 减少内边距 */
        flex-shrink: 0;                        /* 不收缩 */
    }

    #fundChartModal .modal-header h2 {
        font-size: 16px;                       /* 减小标题字体 */
    }

    #fundChartModal .modal-body {
        padding: 10px;                         /* 减少内边距 */
        flex: 1;                               /* 占据剩余空间 */
        overflow-y: auto;                      /* 允许滚动 */
        -webkit-overflow-scrolling: touch;     /* iOS平滑滚动 */
    }

    /* 标签页导航优化 */
    .chart-tabs {
        padding: 0 10px;                       /* 减少内边距 */
        margin-bottom: 10px;                   /* 减少底部边距 */
        overflow-x: auto;                      /* 允许横向滚动 */
        -webkit-overflow-scrolling: touch;     /* iOS平滑滚动 */
    }

    .chart-tab {
        padding: 8px 12px;                     /* 减少内边距 */
        font-size: 12px;                       /* 减小字体 */
        white-space: nowrap;                   /* 不换行 */
    }

    /* 图表高度调整 */
    #fundChart {
        height: 200px;                         /* 进一步减少图表高度 */
    }

    /* 图表中统计栏垂直布局 */
    .statistics-bar {
        flex-direction: column;                /* 垂直排列 */
        gap: 2px;                              /* 减小间距 */
        padding: 8px;                          /* 减小内边距 */
        margin-bottom: 10px;                   /* 减小底部边距 */
    }

    .statistics-bar .stat-item {
        display: flex;                         /* 弹性布局 */
        justify-content: space-between;        /* 两端对齐 */
        align-items: center;                   /* 垂直居中 */
        width: 100%;                          /* 占满宽度 */
        padding: 6px 8px;                     /* 上下左右内边距 */
        border-bottom: 1px solid var(--border-light); /* 底部分隔线 */
    }

    .statistics-bar .stat-item:last-child {
        border-bottom: none;                   /* 最后一项无分隔线 */
    }

    .statistics-bar .stat-value {
        font-size: 13px;                      /* 调整字体大小 */
        margin-bottom: 0;                     /* 重置底部边距 */
    }

    .statistics-bar .stat-label {
        font-size: 11px;                      /* 调整标签字体 */
        text-align: right;                    /* 右对齐 */
    }
}

/* ===============================
   遗留样式组件 (兼容性保留)
   =============================== */

/* === 图表模态框中的统计栏 === */
/* 这些样式主要为备份文件中的旧版本兼容性而保留 */
.stats-bar {
    display: flex;                            /* 弹性布局 */
    justify-content: space-around;           /* 均匀分布 */
    background: var(--bg-tertiary);          /* 背景色 */
    padding: 15px;                           /* 内边距 */
    border-radius: 8px;                      /* 圆角 */
    margin-bottom: 15px;                     /* 底部边距 */
    border: 1px solid var(--border-color);  /* 边框 */
    flex-wrap: wrap;                         /* 允许换行 */
    gap: 10px;                              /* 子元素间距 */
}

.stats-item {
    text-align: center;                      /* 文字居中 */
    flex: 1;                                /* 弹性增长 */
}

.stats-label {
    font-size: 12px;                        /* 标签字体大小 */
    color: var(--text-secondary);           /* 次要文字色 */
    margin-bottom: 5px;                     /* 底部边距 */
}

.stats-value {
    font-size: 14px;                        /* 数值字体大小 */
    font-weight: bold;                      /* 粗体 */
    color: var(--text-primary);            /* 主文字色 */
}

/* 数值状态颜色 */
.stats-value.positive {
    color: var(--danger-color);             /* 上涨显示红色 */
}

.stats-value.negative {
    color: var(--success-color);            /* 下跌显示绿色 */
}

/* 图表容器样式 */
.chart-container {
    margin-top: 30px;                       /* 顶部边距 */
    height: 400px;                          /* 高度 */
}

/* ===============================
   状态提示系统
   =============================== */

/* === 状态消息样式 === */
/* 用于显示系统操作反馈信息 */
.status-message {
    position: fixed;                         /* 固定定位 */
    top: 20px;                              /* 距离顶部 */
    right: 20px;                            /* 距离右侧 */
    padding: 15px 20px;                     /* 内边距 */
    border-radius: 8px;                     /* 圆角 */
    color: white;                           /* 白色文字 */
    font-weight: bold;                      /* 粗体 */
    z-index: calc(var(--z-overlay) + 10);  /* 高层级 */
    transform: translateX(100%);            /* 初始位置（隐藏在右侧） */
    transition: transform 0.3s ease;        /* 平滑滑入动画 */
}

/* 显示状态 */
.status-message.show {
    transform: translateX(0);               /* 滑入显示 */
}

/* 不同状态的背景颜色 */
.status-success {
    background: var(--success-color);       /* 成功状态绿色背景 */
}

.status-error {
    background: var(--danger-color);        /* 错误状态红色背景 */
}

.status-warning {
    background: var(--warning-color);       /* 警告状态黄色背景 */
}

/* ===============================
   Funds-Master风格基金详情弹窗样式
   =============================== */


/* ===============================
   简化版基金信息样式
   =============================== */

/* 简化的基金信息容器 */
.fund-info-simple {
    padding: 20px 0;
}

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

.info-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--gradient-start);
    padding-bottom: 8px;
}

/* 基本信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item .label {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 80px;
}

.info-item .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.info-item .value.link {
    color: var(--gradient-start);
    cursor: pointer;
    text-decoration: none;
}

.info-item .value.link:hover {
    color: var(--gradient-end);
    text-decoration: underline;
}

.info-item .date {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 简化的业绩表现 */
.performance-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.perf-item {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.perf-item .period {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.perf-item .perf-value {
    font-size: 18px;
    font-weight: 700;
}

.perf-item .perf-value.positive {
    color: var(--danger-color);
}

.perf-item .perf-value.negative {
    color: var(--success-color);
}

.perf-item .perf-rank {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .performance-simple {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .perf-item {
        padding: 12px 8px;
    }

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

@media (max-width: 480px) {
    .performance-simple {
        grid-template-columns: 1fr;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-item .label {
        min-width: auto;
        font-weight: 500;
    }
}

/* ===============================
   通用模态框样式
   =============================== */

/* === 基础模态框结构 === */
.modal {
    display: none;                          /* 默认隐藏 */
    position: fixed;                        /* 固定定位 */
    z-index: var(--z-overlay);            /* 高层级 */
    left: 0;                               /* 左边对齐 */
    top: 0;                                /* 顶部对齐 */
    width: 100%;                           /* 全屏宽度 */
    height: 100%;                          /* 全屏高度 */
    background: rgba(0, 0, 0, 0.6);        /* 半透明黑色背景 */
    backdrop-filter: blur(4px);            /* 背景模糊效果 */
}

/* === 模态框内容容器 === */
.modal-content {
    background: var(--bg-secondary);       /* 内容背景色 */
    position: absolute;                    /* 绝对定位 */
    top: 50%;                             /* 垂直居中 */
    left: 50%;                            /* 水平居中 */
    transform: translate(-50%, -50%);      /* 完美居中 */
    padding: 32px;                        /* 内边距 */
    border-radius: 16px;                  /* 圆角 */
    width: 90%;                           /* 宽度 */
    max-width: 480px;                     /* 最大宽度 */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); /* 阴影效果 */
    transition: var(--transition-theme);  /* 主题切换动画 */
}

/* === 模态框头部 === */
.modal-header {
    text-align: center;                   /* 文字居中 */
    margin-bottom: 24px;                  /* 底部边距 */
}

.modal-title {
    font-size: 24px;                      /* 标题字体大小 */
    font-weight: 600;                     /* 字体粗细 */
    color: var(--text-primary);          /* 标题颜色 */
    margin-bottom: 8px;                   /* 底部边距 */
}

/* === 模态框主体 === */
.modal-body {
    padding: 0;                           /* 无内边距 */
}

/* === 表单相关样式 === */
.form-group {
    margin-bottom: 20px;                  /* 表单组底部边距 */
}

.form-label {
    display: block;                       /* 块级显示 */
    margin-bottom: 8px;                   /* 底部边距 */
    font-weight: 500;                     /* 字体粗细 */
    color: var(--text-primary);          /* 文字颜色 */
}

.form-input {
    width: 100%;                          /* 全宽 */
    padding: 12px 16px;                   /* 内边距 */
    border: 1px solid var(--border-color); /* 边框 */
    border-radius: 8px;                   /* 圆角 */
    background: var(--input-bg);          /* 背景色 */
    color: var(--text-primary);          /* 文字颜色 */
    font-size: 14px;                      /* 字体大小 */
    transition: var(--transition-input);  /* 过渡动画 */
}

.form-input:focus {
    outline: none;                        /* 移除默认聚焦边框 */
    border-color: var(--gradient-start);  /* 聚焦边框颜色 */
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); /* 聚焦阴影 */
}

/* === 操作按钮样式 === */
.form-actions {
    display: flex;                        /* 弹性布局 */
    justify-content: flex-end;            /* 右对齐 */
    gap: 12px;                           /* 按钮间距 */
    margin-top: 24px;                    /* 顶部边距 */
}

.action-btn {
    padding: 12px 24px;                  /* 内边距 */
    border: none;                        /* 无边框 */
    border-radius: 8px;                  /* 圆角 */
    font-size: 14px;                     /* 字体大小 */
    font-weight: 500;                    /* 字体粗细 */
    cursor: pointer;                     /* 手型光标 */
    transition: var(--transition-interaction); /* 交互动画 */
    text-decoration: none;               /* 移除下划线 */
    display: inline-flex;                /* 内联弹性布局 */
    align-items: center;                 /* 垂直居中 */
    justify-content: center;             /* 水平居中 */
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); /* 主要按钮渐变 */
    color: var(--text-contrast);        /* 对比文字色 */
}

.action-btn.success {
    background: var(--success-color);    /* 成功按钮背景 */
    color: white;                        /* 白色文字 */
}

.action-btn.danger {
    background: var(--danger-color);     /* 危险按钮背景 */
    color: white;                        /* 白色文字 */
}

.action-btn.small {
    padding: 8px 16px;                   /* 小按钮内边距 */
    font-size: 12px;                     /* 小按钮字体 */
}

.action-btn:hover {
    transform: translateY(-2px);         /* 悬停上移效果 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* 悬停阴影 */
}

.action-btn:active {
    transform: translateY(0);            /* 点击时恢复位置 */
}

/* === 每日录入页面特有的按钮样式 === */
/* 覆盖通用按钮样式，采用边框样式 */
.daily-input-page .action-btn {
    padding: 8px 16px;                   /* 较小的内边距 */
    border: 1px solid var(--border-color); /* 添加边框 */
    background: var(--bg-secondary);     /* 背景色 */
    color: var(--text-primary);         /* 文字颜色 */
    font-size: 13px;                     /* 较小字体 */
    white-space: nowrap;                 /* 禁止换行 */
}

.daily-input-page .action-btn.primary {
    background: var(--gradient-start);   /* 主按钮背景 */
    color: white;                        /* 白色文字 */
    border-color: var(--gradient-start); /* 边框颜色 */
}

.daily-input-page .action-btn.success {
    border-color: var(--success-color);  /* 成功按钮边框 */
    color: var(--success-color);         /* 成功按钮文字 */
    background: var(--bg-secondary);     /* 背景色 */
}

.daily-input-page .action-btn.danger {
    border-color: var(--danger-color);   /* 危险按钮边框 */
    color: var(--danger-color);          /* 危险按钮文字 */
    background: var(--bg-secondary);     /* 背景色 */
}

.daily-input-page .action-btn.small {
    padding: 6px 10px;                   /* 小按钮内边距 */
    font-size: 12px;                     /* 小按钮字体 */
}

.daily-input-page .action-btn:hover {
    transform: translateY(-1px);         /* 悬停上移 */
    box-shadow: 0 2px 4px var(--shadow); /* 悬停阴影 */
}

/* === 基金详情弹出框样式 === */
.fund-name-clickable {
    cursor: pointer;
    color: var(--gradient-start);
    text-decoration: none;
    transition: var(--transition-interaction);
    border-bottom: 1px dashed transparent;
}

.fund-name-clickable:hover {
    color: var(--gradient-end);
    border-bottom-color: var(--gradient-start);
    text-decoration: none;
}

.fund-detail-content {
    padding: 20px 0;
}

.fund-detail-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid var(--gradient-start);
}

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

.fund-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.fund-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

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

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

.fund-detail-value.positive {
    color: var(--success-color);
}

.fund-detail-value.negative {
    color: var(--danger-color);
}

.fund-detail-value.neutral {
    color: var(--info-color);
}

.fund-operations-list {
    max-height: 300px;
    overflow-y: auto;
}

.fund-operation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.fund-operation-date {
    font-weight: 600;
    color: var(--text-primary);
}

.fund-operation-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.fund-operation-type.add {
    background: var(--success-color);
    color: white;
}

.fund-operation-type.reduce {
    background: var(--danger-color);
    color: white;
}

.fund-operation-amount {
    font-weight: 600;
    color: var(--text-primary);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--gradient-start);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===============================
   基金详细信息区域样式
   =============================== */

/* 基金详细信息展开按钮容器 */
.fund-detail-toggle {
    text-align: center;
    margin: 15px 0;
    padding: 0 20px;
}

/* 展开按钮样式 */
.expand-detail-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-contrast);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-interaction);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.expand-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.expand-detail-btn .btn-icon {
    font-size: 16px;
}

.expand-detail-btn .btn-text {
    flex: 1;
    text-align: center;
}

.expand-detail-btn .btn-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

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

/* 基金详细信息区域 */
.fund-detail-section {
    margin: 20px 0;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-theme);
}

/* 基金详细信息头部 */
.fund-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-interaction);
}

.fund-detail-header:hover {
    background: var(--hover-bg);
}

.fund-detail-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 切换按钮 */
.toggle-detail-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-interaction);
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-detail-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.toggle-detail-btn .btn-icon {
    font-size: 14px;
}

.toggle-detail-btn .btn-text {
    font-weight: 500;
}

/* 基金详细信息内容 */
.fund-detail-content {
    padding: 20px;
}

/* 详细信息网格布局 */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* 详细信息卡片 */
.detail-info-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-light);
    transition: var(--transition-theme);
}

.detail-info-card h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

/* 信息项容器 */
.info-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 单个信息项 */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

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

.info-item .info-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 80px;
}

.info-item .info-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    flex: 1;
}

/* 特殊数值样式 */
.info-value.positive {
    color: var(--danger-color);
}

.info-value.negative {
    color: var(--success-color);
}

.info-value.neutral {
    color: var(--info-color);
}

/* 基金详细信息加载状态 */
.fund-detail-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.fund-detail-loading .loading-spinner {
    text-align: center;
}

.fund-detail-loading .spinner {
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
}

.fund-detail-loading p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fund-detail-header {
        padding: 12px 15px;
    }

    .fund-detail-header h3 {
        font-size: 14px;
    }

    .detail-info-card {
        padding: 12px;
    }

    .fund-detail-content {
        padding: 15px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-item .info-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .detail-info-grid {
        gap: 8px;
    }

    .detail-info-card {
        padding: 10px;
    }

    .detail-info-card h4 {
        font-size: 13px;
    }

    /* 展开按钮调整 */
    .fund-detail-toggle {
        padding: 0 15px;
        margin: 10px 0;
    }

    .expand-detail-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 160px;
    }

    .expand-detail-btn .btn-icon {
        font-size: 14px;
    }

    .expand-detail-btn .btn-arrow {
        font-size: 11px;
    }

    /* 切换按钮调整 */
    .toggle-detail-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .toggle-detail-btn .btn-icon {
        font-size: 12px;
    }
}

/* ===============================
   指数行情栏样式
   =============================== */

/* 指数行情栏容器 */
.index-bar {
    display: flex;                             /* 弹性布局 */
    flex-wrap: nowrap;                         /* 不换行,保持一行 */
    justify-content: center;                   /* 居中显示 */
    gap: 12px;                                 /* 间隔适中 */
    background: var(--bg-secondary);           /* 背景色 */
    padding: 8px 15px;                         /* 内边距 */
    border-bottom: 2px solid var(--border-color); /* 底部边框 */
    margin-bottom: 0;                          /* 无底部边距 */
    transition: var(--transition-theme);       /* 主题切换动画 */
    overflow-x: auto;                          /* 超出时允许横向滚动 */
}

/* 单个指数项 */
.index-item {
    text-align: center;                        /* 文字居中 */
    padding: 4px 8px;                          /* 内边距适中 */
    min-width: 0;                              /* 允许收缩 */
    flex-shrink: 0;                            /* 不压缩 */
    background: var(--bg-tertiary);            /* 添加背景色区分 */
    border-radius: 4px;                        /* 圆角 */
}

/* 指数名称 */
.index-name {
    font-size: 11px;                           /* 字体适中 */
    color: var(--text-secondary);             /* 次要文字色 */
    margin-bottom: 3px;                        /* 底部边距 */
    font-weight: 600;                          /* 加粗 */
    white-space: nowrap;                       /* 不换行 */
}

/* 指数数值 */
.index-value {
    font-size: 15px;                           /* 字体加大 */
    font-weight: bold;                         /* 粗体 */
    color: var(--text-primary);               /* 主文字色 */
    margin-bottom: 2px;                        /* 底部边距 */
    font-family: 'Arial', sans-serif;          /* 数字字体 */
}

/* 指数涨跌幅 */
.index-change {
    font-size: 11px;                           /* 字体适中 */
    font-weight: 600;                          /* 加粗 */
    font-family: 'Arial', sans-serif;          /* 数字字体 */
    white-space: nowrap;                       /* 不换行 */
    margin-bottom: 2px;                        /* 底部边距 */
}

/* 成交额 */
.index-turnover {
    font-size: 11px;                           /* 字体加大 */
    color: var(--text-secondary);             /* 次要文字色 */
    font-family: 'Arial', sans-serif;          /* 数字字体 */
    white-space: nowrap;                       /* 不换行 */
    margin-bottom: 1px;                        /* 底部边距 */
    font-weight: 500;                          /* 加粗 */
}

/* 涨跌家数统计 */
.index-stats {
    font-size: 11px;                           /* 字体加大 */
    color: var(--text-secondary);             /* 次要文字色 */
    white-space: nowrap;                       /* 不换行 */
    font-family: 'Arial', sans-serif;          /* 数字字体 */
    font-weight: 500;                          /* 加粗 */
}

/* 上涨样式 */
.index-change.up {
    color: #e74c3c;                            /* 红色 */
}

/* 下跌样式 */
.index-change.down {
    color: #27ae60;                            /* 绿色 */
}

/* 平盘样式 */
.index-change.flat {
    color: var(--text-secondary);             /* 次要文字色 */
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
    .index-bar {
        gap: 8px;                              /* 减小间距 */
        padding: 8px 12px;                     /* 减小内边距 */
        justify-content: flex-start;           /* 左对齐,方便滚动 */
    }

    .index-item {
        padding: 6px 8px;                      /* 减小内边距 */
        min-width: 120px;                      /* 设置最小宽度 */
    }

    .index-name {
        font-size: 11px;                       /* 减小字体 */
    }

    .index-value {
        font-size: 14px;                       /* 减小字体 */
    }

    .index-change {
        font-size: 10px;                       /* 减小字体 */
    }

    .index-turnover {
        font-size: 10px;                       /* 减小字体 */
    }

    .index-stats {
        font-size: 10px;                       /* 减小字体 */
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 480px) {
    .index-bar {
        gap: 6px;                              /* 进一步减小间距 */
        padding: 6px 8px;                      /* 进一步减小内边距 */
        justify-content: flex-start;           /* 左对齐 */
        -webkit-overflow-scrolling: touch;     /* iOS平滑滚动 */
    }

    .index-item {
        padding: 4px 6px;                      /* 减小内边距 */
        min-width: 100px;                      /* 减小最小宽度 */
    }

    .index-name {
        font-size: 10px;                       /* 进一步减小字体 */
        margin-bottom: 2px;                    /* 减小底部边距 */
    }

    .index-value {
        font-size: 13px;                       /* 进一步减小字体 */
        margin-bottom: 1px;                    /* 减小底部边距 */
    }

    .index-change {
        font-size: 9px;                        /* 进一步减小字体 */
        margin-bottom: 1px;                    /* 减小底部边距 */
    }

    .index-turnover {
        font-size: 9px;                        /* 进一步减小字体 */
        margin-bottom: 1px;                    /* 减小底部边距 */
    }

    .index-stats {
        font-size: 9px;                        /* 进一步减小字体 */
    }
}

/* ===============================
   骨架屏加载动画 (图表性能优化)
   =============================== */

/* 骨架屏容器 */
.chart-skeleton {
    width: 100%;
    height: 100%;
    min-height: 400px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

/* 骨架屏标题 */
.skeleton-title {
    width: 200px;
    height: 24px;
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--border-light) 50%,
        var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 骨架屏统计信息区域 */
.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.skeleton-stat {
    height: 60px;
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--border-light) 50%,
        var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
}

/* 骨架屏图表区域 */
.skeleton-chart {
    width: 100%;
    height: 300px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 骨架屏折线图（SVG） */
.skeleton-line-chart {
    width: 100%;
    height: 100%;
    color: var(--gradient-start);
}

.skeleton-line {
    stroke: var(--gradient-start);
    opacity: 0.4;
}

.skeleton-point {
    fill: var(--gradient-start);
    opacity: 0.5;
}

/* 骨架屏闪烁动画 */
.skeleton-shimmer {
    animation: shimmer 1.5s ease-in-out infinite;
}

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

/* 骨架屏淡出动画 */
.chart-skeleton.fade-out {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* 深色主题下的骨架屏样式 */
[data-theme="dark"] .skeleton-title,
[data-theme="dark"] .skeleton-stat {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        #444 50%,
        var(--bg-tertiary) 75%);
    background-size: 200% 100%;
}

[data-theme="dark"] .skeleton-line {
    stroke: var(--gradient-start);
    opacity: 0.5;
}

[data-theme="dark"] .skeleton-point {
    fill: var(--gradient-start);
    opacity: 0.6;
}

/* 响应式设计 - 移动端骨架屏优化 */
@media (max-width: 768px) {
    .chart-skeleton {
        padding: 15px;
        min-height: 300px;
    }

    .skeleton-title {
        width: 150px;
        height: 20px;
        margin-bottom: 15px;
    }

    .skeleton-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .skeleton-stat {
        height: 50px;
    }

    .skeleton-chart {
        height: 200px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .chart-skeleton {
        padding: 10px;
        min-height: 250px;
    }

    .skeleton-title {
        width: 120px;
        height: 18px;
        margin-bottom: 12px;
    }

    .skeleton-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 15px;
    }

    .skeleton-stat {
        height: 40px;
    }

    .skeleton-chart {
        height: 150px;
        padding: 10px;
    }

    .skeleton-bars {
        gap: 1px;
    }
}

/* 性能优化：减少重绘和回流 */
.chart-skeleton,
.skeleton-title,
.skeleton-stat,
.skeleton-line,
.skeleton-point {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 加载完成后的过渡效果 */
.chart-skeleton.loading-complete {
    animation: skeletonComplete 0.4s ease-out forwards;
}

@keyframes skeletonComplete {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
        visibility: hidden;
    }
}

/* ===============================
   搜索模态框样式
   =============================== */

/* 搜索模态框容器 */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    animation: fadeIn 0.25s ease;
}

/* 搜索模态框内容 */
.search-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 搜索模态框头部 */
.search-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
}

.search-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-modal-header .close-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

/* 搜索模态框主体 */
.search-modal-body {
    padding: 24px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 搜索输入区域 */
.search-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.search-input-wrapper input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.search-input-wrapper input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 搜索提示 */
.search-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* 搜索结果容器 */
.search-results-container {
    flex: 1;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-tertiary);
    min-height: 0; /* 允许 flex 子元素收缩并启用滚动 */
}

#searchResultsWrapper {
    height: 100%;
    overflow-y: auto;
    padding: 16px;
}

/* 初始提示 */
.search-initial-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.search-initial-hint .hint-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.search-initial-hint .hint-text {
    font-size: 15px;
}

/* 搜索结果列表 */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 搜索结果项 */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: var(--gradient-start);
    background: var(--hover-bg);
    transform: translateX(4px);
}

.search-result-item .fund-code {
    font-family: 'Consolas', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--gradient-start);
    min-width: 70px;
}

.search-result-item .fund-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    margin-left: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-item .fund-type {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 12px;
    margin-left: 12px;
}

.search-result-item .arrow-icon {
    margin-left: 12px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* 加载状态 */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    gap: 16px;
}

.search-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--gradient-start);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    padding: 0;
}

.search-loading span {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 无结果提示 */
.search-no-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.search-no-result .no-result-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.search-no-result .no-result-text {
    font-size: 15px;
}

/* 基金详情区域 */
.search-fund-detail {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-fund-detail .detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.search-fund-detail .back-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-fund-detail .back-btn:hover {
    background: var(--hover-bg);
    border-color: var(--gradient-start);
}

.search-fund-detail .detail-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

/* 详情主体 */
.search-fund-detail .detail-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

/* 详情信息网格 */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.detail-info-item .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.detail-info-item .value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-info-item .value.positive {
    color: var(--danger-color);
}

.detail-info-item .value.negative {
    color: var(--success-color);
}

/* 业绩表现 */
.detail-performance {
    margin-bottom: 24px;
}

.detail-performance h4 {
    margin: 0 0 14px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gradient-start);
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.performance-grid .perf-item {
    text-align: center;
    padding: 14px 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.performance-grid .perf-item .period {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.performance-grid .perf-item .perf-value {
    font-size: 16px;
    font-weight: 700;
}

/* 趋势图区域 */
.detail-chart-section {
    margin-bottom: 16px;
}

.detail-chart-section h4 {
    margin: 0 0 14px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gradient-start);
}

.detail-chart-container {
    width: 100%;
    height: 280px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

/* 图表加载状态 */
.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.chart-loading .loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-light);
    border-top-color: var(--gradient-start);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
    padding: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .search-modal-header {
        padding: 16px 20px;
    }

    .search-modal-header h2 {
        font-size: 18px;
    }

    .search-modal-body {
        padding: 16px;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-input-wrapper input {
        padding: 12px 16px;
    }

    .search-btn {
        padding: 12px 20px;
    }

    .detail-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .performance-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-chart-container {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .search-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }

    .search-modal-header {
        padding: 14px 16px;
    }

    .search-modal-header h2 {
        font-size: 16px;
    }

    .search-modal-body {
        padding: 12px;
    }

    .search-result-item {
        padding: 12px;
    }

    .search-result-item .fund-name {
        font-size: 13px;
    }

    .search-result-item .fund-type {
        display: none;
    }

    .detail-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .detail-info-item {
        padding: 10px 12px;
    }

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

    .detail-chart-container {
        height: 200px;
    }
}