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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden; /* 防止水平滚动条 */
}

/* 应用容器 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部导航 - 固定在顶部 */
.app-header {
    background-color: #001529;
    color: white;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    position: fixed; /* 固定定位 */
    top: 0; /* 固定在顶部 */
    left: 0; /* 左侧对齐 */
    right: 0; /* 横向占满 */
    z-index: 1000; /* 确保显示在最上层 */
}

.logo h1 {
    color: white;
    font-size: 18px;
    margin: 0;
}

.price-display {
    display: flex;
    align-items: center;
}

.price-label {
    margin-right: 10px;
    opacity: 0.8;
}

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

.price-change {
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.price-change.up {
    background-color: rgba(82, 196, 26, 0.2);
    color: #52c41a;
}

.price-change.down {
    background-color: rgba(255, 77, 79, 0.2);
    color: #ff4d4f;
}

/* 内容区域 - 添加上边距为标题栏高度 */
.app-content {
    display: flex;
    flex: 1;
    margin-top: 64px; /* 与标题栏高度相同 */
    height: calc(100vh - 64px); /* 设置内容区域高度 */
    position: relative; /* 相对定位 */
}

/* 侧边栏 - 固定在左侧 */
.sidebar {
    width: 220px;
    background-color: #001529;
    color: white;
    padding-top: 20px;
    position: fixed; /* 固定定位 */
    top: 64px; /* 从标题栏下方开始 */
    left: 0; /* 左侧对齐 */
    bottom: 0; /* 延伸到底部 */
    overflow-y: auto; /* 如果菜单项过多，允许滚动 */
    z-index: 999; /* 确保显示在内容上方 */
}

.menu {
    list-style: none;
}

.menu li {
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.menu li:hover {
    color: #1890ff;
}

.menu li.active {
    background-color: #1890ff;
    color: white;
}

.menu li.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #f0f2f5;
}

/* 主内容区域 - 添加左边距为侧边栏宽度 */
.main-content {
    flex: 1;
    padding: 20px;
    margin-left: 220px; /* 与侧边栏宽度相同 */
    overflow-y: auto; /* 允许内容区域滚动 */
    height: 100%; /* 占满高度 */
}

.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 500;
    color: #222;
}

/* 仪表盘卡片布局 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 卡片基本样式 */
.card {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 仪表盘中的卡片统一样式 */
.dashboard-cards .card {
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    margin: 0; /* 移除所有外边距 */
    padding: 20px; /* 统一内边距 */
}

/* 卡片标题统一样式 */
.dashboard-cards .card h3 {
    margin: 0 0 15px 0; /* 只保留底部边距 */
    padding: 0;
    font-size: 16px;
    font-weight: 500;
    color: #666;
}

/* 卡片内容容器统一样式 */
.dashboard-cards .card > div:not(h3) {
    margin-top: 10px;
}

/* 分隔线统一样式 */
.position-direction-container,
.entry-price-container,
.position-profit-container,
.market-status-container {
    margin-top: 15px !important;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* 价格卡片样式 */
.price-card .price-big {
    margin-top: 10px;
}

.price-card .position-direction-container,
.price-card .entry-price-container,
.price-card .position-profit-container {
    margin-top: 15px;
    padding-top: 15px;
}

/* 评分卡片样式 */
.scores-container {
    margin-top: 10px;
}

.scores-card .market-status-container {
    margin-top: 15px;
    padding-top: 15px;
}

/* 上次交易记录卡片样式 */
.last-trade-card {
    margin-top: 0; /* 修改为0，与其他卡片保持一致 */
    margin-bottom: 0;
}

.last-trade-container {
    margin-top: 10px !important;
    flex: 1;
    overflow-y: auto;
}

.price-big {
    font-size: 32px;
    font-weight: bold;
    color: #1890ff;
    margin-bottom: 8px;
}

.last-update {
    font-size: 12px;
    color: #999;
}

.signal-display {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
}

.signal-display.long {
    background-color: rgba(82, 196, 26, 0.2);
    color: #52c41a;
}

.signal-display.short {
    background-color: rgba(255, 77, 79, 0.2);
    color: #ff4d4f;
}

.signal-display.wait {
    background-color: rgba(250, 173, 20, 0.2);
    color: #faad14;
}

.signal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.signal-details div {
    color: #666;
}

.signal-details span {
    font-weight: 500;
    color: #333;
}

.strategy-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 12px;
}

.strategy-status.running {
    background-color: rgba(24, 144, 255, 0.2);
    color: #1890ff;
}

.strategy-status.position {
    background-color: rgba(82, 196, 26, 0.2);
    color: #52c41a;
}

.win-rate {
    font-size: 16px;
    color: #666;
}

.win-rate span {
    font-weight: bold;
    color: #333;
}

/* 当前交易面板 */
.current-trade-panel {
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.current-trade-panel h3 {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 500;
    color: #666;
}

.no-trade {
    color: #999;
    font-style: italic;
}

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

.trade-row {
    display: flex;
    flex-direction: column;
}

.trade-label {
    color: #666;
    margin-bottom: 4px;
    font-size: 13px;
}

.trade-value {
    font-weight: 500;
    font-size: 16px;
    color: #333;
    min-height: 24px; /* 增加最小高度 */
    word-break: break-word; /* 允许在必要时换行 */
}

.trade-value.win {
    color: #52c41a;
}

.trade-value.loss {
    color: #ff4d4f;
}

/* 信号详情面板 */
.signal-details-panel {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* 信号页面顶部水平布局 */
.signal-top-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.signal-summary {
    flex: 0 0 30%;
    padding: 15px;
    background-color: #f7f9fc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.signal-scores {
    flex: 0 0 65%;
    padding: 15px;
    background-color: #f7f9fc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 重新定义信号评分样式 */
.score-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.score-label {
    width: 100px;
    font-weight: bold;
    color: #555;
}

.score-value {
    width: 60px;
    font-weight: bold;
}

.score-bar-container {
    flex: 1;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin-left: 10px;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

.long-bar {
    background: #52c41a;
}

.short-bar {
    background: #f5222d;
}

.wait-bar {
    background: #9e9e9e;  /* 灰色表示观望 */
    opacity: 1 !important; /* 确保可见 */
    display: block !important; /* 确保显示 */
}

.signal-type {
    font-size: 28px;
    font-weight: bold;
    margin: 12px 0;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
}

.signal-type.long {
    background-color: rgba(82, 196, 26, 0.2);
    color: #52c41a;
}

.signal-type.short {
    background-color: rgba(255, 77, 79, 0.2);
    color: #ff4d4f;
}

.signal-type.wait {
    background-color: rgba(250, 173, 20, 0.2);
    color: #faad14;
}

.confidence {
    color: #666;
    font-size: 16px;
}

.confidence span {
    font-weight: 500;
    color: #333;
}

.signal-prices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.price-item {
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 16px;
    background-color: #fafafa;
}

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

.price-value {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.levels-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

@media (min-width: 768px) {
    .levels-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

.level-item {
    border: 1px dashed #f0f0f0;
    border-radius: 4px;
    padding: 16px;
}

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

.level-value {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

/* 历史记录表格 */
.history-table-container {
    background-color: white;
    border-radius: 4px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th, .history-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.history-table th {
    background-color: #fafafa;
    font-weight: 500;
    color: #666;
}

.history-table tr:hover {
    background-color: #fafafa;
}

.history-table .win {
    color: #52c41a;
}

.history-table .loss {
    color: #ff4d4f;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stats-card-item {
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stats-card-label {
    color: #666;
    margin-bottom: 12px;
}

.stats-card-value {
    font-size: 24px;
    font-weight: bold;
    color: #1890ff;
}

/* 详细统计 */
.stats-details {
    background-color: white;
    border-radius: 4px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.stats-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-label {
    color: #666;
    font-weight: 500;
}

.stats-value {
    font-weight: 500;
    color: #333;
}

.stats-value.profit {
    color: #52c41a;
}

.stats-value.loss {
    color: #ff4d4f;
}

/* 杠杆说明样式 */
.leverage-note {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
    background-color: rgba(250, 173, 20, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #faad14;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .app-content {
        flex-direction: column;
        margin-top: 64px; /* 保持与顶部导航栏的距离 */
    }
    
    .sidebar {
        width: 100%;
        padding: 0;
        position: fixed; /* 保持固定定位 */
        top: 64px; /* 位于顶部导航栏下方 */
        left: 0;
        height: auto; /* 自动高度，仅包含菜单 */
        bottom: auto; /* 取消延伸到底部 */
        z-index: 998; /* 确保显示在内容上方 */
    }
    
    .menu {
        display: flex;
        overflow-x: auto;
    }
    
    .menu li {
        padding: 14px 20px;
        white-space: nowrap;
    }
    
    .menu li.active::after {
        display: none;
    }
    
    .main-content {
        padding: 16px;
        margin-left: 0; /* 移动视图下不需要左边距 */
        margin-top: 50px; /* 为菜单栏留出空间 */
        width: 100%; /* 确保宽度占满 */
        overflow-x: hidden; /* 防止水平滚动 */
    }
    
    .dashboard-cards, .signal-prices, .stats-cards {
        grid-template-columns: 1fr;
    }

    /* 页面标题调整 */
    .page-header {
        margin-top: 10px; /* 增加上边距 */
    }
}

/* 添加评分显示区域的样式 */
.signal-scores {
    padding: 15px;
    background-color: #f7f9fc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.signal-scores h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.score-threshold {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* 当前信号评分显示 */
.confidence {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* 多时间周期信号表格 */
.timeframe-signals {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeframe-signals h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.timeframe-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.timeframe-table th,
.timeframe-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.timeframe-table th {
    font-weight: 600;
    background-color: #f9f9f9;
}

.timeframe-table tr:last-child td {
    border-bottom: none;
}

.timeframe-table tr:hover {
    background-color: #f5f5f5;
}

/* 信号类型风格 */
.timeframe-table td.signal-long {
    color: #52c41a;
    font-weight: 600;
}

.timeframe-table td.signal-short {
    color: #f5222d;
    font-weight: 600;
}

.timeframe-table td.signal-wait {
    color: #faad14;
    font-weight: 600;
}

/* 支撑压力位注释 */
.level-source {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* 添加模拟账户面板样式 */
.simulated-account-panel {
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.simulated-account-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #001529;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.sim-account-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.sim-row {
    padding: 8px 0;
}

.sim-label {
    color: #888;
    font-size: 14px;
    margin-bottom: 4px;
}

.sim-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.sim-value.profit {
    color: #52c41a;
}

.sim-value.loss {
    color: #ff4d4f;
}

/* 在移动设备上调整模拟账户面板 */
@media (max-width: 992px) {
    .sim-account-details {
        grid-template-columns: 1fr;
    }
}

/* 信号页面标题样式统一 */
.signal-summary h3, .signal-scores h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#user-name {
    color: white;
    margin-right: 15px;
}

.logout-btn {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
}

.login-form {
    width: 350px;
    padding: 30px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #1890ff;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input {
    margin-right: 8px;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #40a9ff;
}

.error-message {
    color: #ff4d4f;
    margin-bottom: 15px;
}

/* 超小屏幕的额外调整（如手机） */
@media (max-width: 480px) {
    /* 调整整个头部布局 */
    .app-header {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 5px 10px; /* 进一步减小上下内边距 */
        align-items: center;
        min-height: 65px; /* 添加最小高度确保一致性 */
        border-bottom: none; /* 移除底部边框，以便与侧边栏无缝连接 */
        box-shadow: none; /* 移除阴影 */
    }
    
    /* 标题占据一整行 */
    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 2px; /* 进一步减小底部边距 */
    }
    
    /* 调整内容区域顶部边距，适应新的头部高度 */
    .app-content {
        margin-top: 65px; /* 减小到头部最小高度 */
    }
    
    /* 侧边栏位置调整 */
    .sidebar {
        top: 65px; /* 保持与app-content的margin-top一致 */
        border-top: none; /* 移除顶部边框 */
        margin-top: -1px; /* 使用负边距向上移动 */
        padding-top: 0; /* 确保没有上内边距 */
        box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); /* 将标题栏的阴影转移到侧边栏 */
    }
    
    /* 确保菜单紧贴在标题栏下方 */
    .menu {
        margin: 0;
        padding: 0;
        height: 40px; /* 固定高度 */
        border-top: 1px solid rgba(255,255,255,0.1); /* 添加顶部边框增强边界 */
    }
    
    /* 使菜单项更加紧凑 */
    .menu li {
        padding: 10px 15px;
        font-size: 13px;
        display: flex;
        align-items: center;
        height: 100%; /* 确保高度一致 */
    }
    
    /* 调整主内容区域的上边距，为菜单腾出合适空间 */
    .main-content {
        margin-top: 40px; /* 与菜单高度保持一致 */
        padding-top: 5px; /* 减小内容与菜单之间的间距 */
    }
}

/* 洗盘监控面板样式 */
.dip-card {
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}

.dip-info {
    padding: 8px 0;
}

.dip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.dip-label {
    color: #666;
    font-weight: normal;
}

.dip-value {
    color: #333;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0;
    width: 100%;
}

.progress-inner {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* 评分进度条样式 */
.progress-bar {
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0;
    width: 100%;
}

.progress-inner {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.scores-container .score-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.scores-container .score-label {
    width: 80px;
    flex-shrink: 0;
    font-size: 14px;
    color: #666;
}

.scores-container .progress-bar {
    flex-grow: 1;
    margin: 0 10px;
}

.scores-container .score-value {
    width: 40px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

/* 评分样式 */
.high-score {
    color: #ff4d4f !important;
    font-weight: bold !important;
    position: relative;
}

/* 超过100%的进度条特效 */
.progress-inner.over-max {
    background-image: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.15) 75%, 
        transparent 75%, 
        transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}

/* 高亮多头分数 */
#long-score.high-score {
    color: #52c41a !important;
}

/* 高亮空头分数 */
#short-score.high-score {
    color: #ff4d4f !important;
}

/* 高亮观望分数 */
#wait-score.high-score {
    color: #faad14 !important;
}

/* 多时间周期分析表格样式 */
.timeframe-signals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.timeframe-signals-table th,
.timeframe-signals-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.timeframe-signals-table th {
    background-color: #f9f9f9;
    font-weight: 500;
    color: #666;
}

.timeframe-signals-table tr:hover {
    background-color: #f5f5f5;
}

/* 信号类型样式 */
.signal-long {
    color: #52c41a;
    font-weight: bold;
}

.signal-short {
    color: #ff4d4f;
    font-weight: bold;
}

.signal-wait {
    color: #faad14;
    font-weight: bold;
}

/* 主界面的多时间周期分析卡片 */
.timeframe-analysis-card {
    margin-top: 20px;
    width: 100%;
}

/* 确保表格占据整个空间并有合适的外观 */
.timeframe-signals-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.timeframe-signals-table th {
    background-color: #f5f5f5;
    color: #333;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid #e8e8e8;
}

.timeframe-signals-table td {
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
}

.timeframe-signals-table tr:hover {
    background-color: #f9f9f9;
}

/* 可信度样式 */
.confidence-high {
    color: #fff;
    background-color: #52c41a;
    border-radius: 12px;
    padding: 3px 8px;
    font-weight: bold;
}

.confidence-medium {
    color: #fff;
    background-color: #1890ff;
    border-radius: 12px;
    padding: 3px 8px;
    font-weight: bold;
}

.confidence-low {
    color: #666;
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 3px 8px;
}

/* 市场状态显示样式 */
.market-status-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.market-status-container h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.market-condition-box {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.market-condition-icon {
    font-size: 20px;
    margin-right: 10px;
}

.market-condition {
    font-size: 18px;
    font-weight: 500;
}

.market-condition-desc {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* 市场状态持续时间样式 */
.market-condition-duration {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    padding: 5px 0;
    border-top: 1px dashed #eee;
}

.market-condition-duration span {
    font-weight: 500;
    color: #333;
}

/* 市场状态颜色 */
.market-condition.uptrend,
.market-condition-icon.uptrend {
    color: #52c41a;
}

.market-condition.downtrend,
.market-condition-icon.downtrend {
    color: #f5222d;
}

.market-condition.ranging,
.market-condition-icon.ranging {
    color: #722ed1;
}

.market-condition.weak-trend,
.market-condition-icon.weak-trend {
    color: #fa8c16;
}

/* 市场条件相关样式 */
.market-condition-card {
    margin-top: 20px;
    padding: 10px 0;
}

/* 盈亏显示相关样式 */
.position-profit-container {
    margin-top: 20px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.position-profit-container h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.position-profit {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 6px 0;
}

.profit-positive {
    color: #52c41a;
}

.profit-negative {
    color: #f5222d;
}

.profit-neutral {
    color: #faad14;
}

/* 持仓方向相关样式 */
.position-direction-container {
    margin-top: 15px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.position-direction-container h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.position-direction {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 8px 0;
    border-radius: 4px;
}

/* 价格卡片中的持仓方向容器样式 */
.price-card .position-direction-container {
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.price-card .position-direction {
    margin-top: 10px;
    padding: 10px 0;
    font-size: 16px;
}

/* 价格卡片中的盈亏显示样式 */
.price-card .position-profit-container {
    margin-top: 15px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.price-card .position-profit {
    margin-top: 10px;
    padding: 10px 0;
    font-size: 16px;
}

/* 入场价格样式 */
.entry-price-container {
    margin-top: 15px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.entry-price-container h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.entry-price {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 6px 0;
    color: #1890ff;
}

/* 价格卡片中的入场价格样式 */
.price-card .entry-price-container {
    margin-top: 15px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.price-card .entry-price {
    margin-top: 10px;
    padding: 10px 0;
    font-size: 16px;
}

.direction-long {
    background-color: rgba(82, 196, 26, 0.15);
    color: #52c41a;
}

.direction-short {
    background-color: rgba(245, 34, 45, 0.15);
    color: #f5222d;
}

.direction-none {
    background-color: rgba(250, 173, 20, 0.15);
    color: #faad14;
}

/* 设置页面样式 */
.settings-container {
    background-color: white;
    border-radius: 4px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.settings-container h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.settings-intro {
    margin-bottom: 24px;
    color: #666;
    font-size: 14px;
}

.settings-group {
    margin-bottom: 32px;
}

.settings-group h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
    font-weight: 500;
}

.setting-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #f0f0f0;
}

.setting-item label {
    width: 160px;
    color: #666;
    font-weight: 500;
}

.setting-item input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
}

.setting-item input:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.setting-desc {
    margin-left: 16px;
    color: #999;
    font-size: 13px;
    flex: 1;
}

.settings-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.settings-btn, .settings-save-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2);
}

.settings-btn:hover, .settings-save-btn:hover, .save-btn:hover {
    background-color: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
    transform: translateY(-2px);
}

.restart-btn {
    background-color: #fa8c16;
    box-shadow: 0 2px 6px rgba(250, 140, 22, 0.2);
}

.restart-btn:hover {
    background-color: #ffa940;
    box-shadow: 0 4px 12px rgba(250, 140, 22, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-item label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .setting-desc {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-btn, .settings-save-btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 9999;
    transform: translateX(110%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #52c41a;
}

.notification.error {
    background-color: #f5222d;
}

.notification.info {
    background-color: #1890ff;
}

.notification.warning {
    background-color: #faad14;
}

@media (max-width: 480px) {
    .notification {
        width: calc(100% - 40px);
        top: 60px;
        right: 20px;
    }
}

/* 评分历史图表样式 */
.score-history-card {
    margin-top: 20px;
}

.chart-container {
    width: 100%;
    height: 400px;
    margin-top: 15px;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 10px;
}

.refresh-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.refresh-btn:hover {
    background-color: #40a9ff;
}

.period-select {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

/* 上次交易记录卡片样式 */
.last-trade-card {
    margin-top: 0; /* 修改为0，与其他卡片保持一致 */
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.last-trade-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f5f5f5;
}

.last-trade-row:last-child {
    border-bottom: none;
}

.last-trade-label {
    color: #666;
    font-weight: 500;
}

.last-trade-value {
    font-weight: 500;
    color: #333;
}

/* 添加正负值样式 */
.positive {
    color: #52c41a !important;
    font-weight: bold;
}

.negative {
    color: #f5222d !important;
    font-weight: bold;
}

.last-trade-value.type-long {
    color: #1890ff;
}

.last-trade-value.type-short {
    color: #f5222d;
}

@media (max-width: 768px) {
    .last-trade-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .last-trade-label {
        margin-bottom: 4px;
    }
}

/* 智能评分卡片中的市场状态样式 */
.scores-card .market-status-container {
    margin-top: 15px;
    padding-top: 15px;
}

.scores-card .market-status-container h4 {
    font-size: 15px;
    color: #333;
    margin-bottom: 10px;
}

.scores-card .market-condition-box {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.scores-card .market-condition-icon {
    font-size: 18px;
    margin-right: 8px;
}

.scores-card .market-condition {
    font-weight: 500;
    font-size: 16px;
}

.scores-card .market-condition-desc {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* 监控状态容器 */
.monitoring-status-container {
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(0,0,0,0.03);
    border-radius: 5px;
}

.monitoring-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.monitoring-label {
    font-weight: 500;
    margin-right: 10px;
    min-width: 80px;
}

.monitoring-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 13px;
}

.monitoring-status.active {
    background-color: #52c41a;
    color: white;
}

.monitoring-status.inactive {
    background-color: #d9d9d9;
    color: rgba(0,0,0,0.65);
}

.monitoring-countdown {
    font-family: monospace;
    font-size: 14px;
    margin-left: 3px;
    color: #1890ff;
}

.monitoring-threshold {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(0,0,0,0.65);
}

/* 冷静期状态容器 */
.cooling-period-container {
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 5px;
    border-left: 3px solid #ff4d4f;
}

.cooling-period-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ff4d4f;
}

.cooling-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.cooling-label {
    font-weight: 500;
    margin-right: 10px;
    min-width: 60px;
}

.cooling-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 13px;
}

.cooling-status.active {
    background-color: #ff4d4f;
    color: white;
}

.cooling-status.inactive {
    background-color: #d9d9d9;
    color: rgba(0,0,0,0.65);
}

.cooling-countdown {
    font-family: monospace;
    font-size: 14px;
    margin-left: 3px;
    color: #666;
}

.cooling-countdown.active {
    color: #ff7875;
}

.cooling-countdown.near-end {
    color: #ff4d4f;
    font-weight: bold;
}
/* ===== 行情分析卡片（ETH/BTC 支撑压力·买卖点）===== */
.market-analysis-card {
    grid-column: 1 / -1;      /* 占满整行 */
    min-height: auto;         /* 覆盖卡片默认 400px */
}
.market-analysis-card .ma-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.market-analysis-card .ma-head h3 {
    margin: 0;
}
.ma-head-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ma-status {
    font-size: 12px;
    color: #999;
}
.ma-refresh-btn {
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}
.ma-refresh-btn:disabled {
    background: #bfbfbf;
    cursor: not-allowed;
}
.ma-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}
.ma-loading {
    grid-column: 1 / -1;
    color: #999;
    font-size: 13px;
    padding: 20px 0;
    text-align: center;
}
.ma-coin {
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 14px;
    background: #fafafa;
}
.ma-coin-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ma-coin-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.ma-coin-price {
    font-size: 18px;
    font-weight: 600;
    color: #1890ff;
}
.ma-coin-meta {
    width: 100%;
    font-size: 12px;
    color: #888;
    line-height: 1.6;
}
.ma-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.ma-row-label {
    flex: 0 0 36px;
    font-size: 12px;
    text-align: center;
    border-radius: 3px;
    padding: 3px 0;
    margin-top: 2px;
}
.ma-row-label.res {
    background: #fff1f0;
    color: #cf1322;
}
.ma-row-label.sup {
    background: #f6ffed;
    color: #389e0d;
}
.ma-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ma-lvl {
    display: inline-flex;
    flex-direction: column;
    font-size: 12px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    padding: 3px 7px;
    color: #333;
}
.ma-lvl-price small {
    color: #aaa;
    margin-left: 2px;
}
.ma-lvl-tf {
    font-style: normal;
    font-size: 10px;
    color: #999;
    line-height: 1.3;
    margin-top: 1px;
}
.ma-lvl.res {
    border-color: #ffccc7;
}
.ma-lvl.sup {
    border-color: #b7eb8f;
}
.ma-setups {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ma-setup {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 8px 10px;
}
.ma-setup-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.ma-conf {
    float: right;
    font-size: 12px;
    font-weight: 500;
    background: #e6f7ff;
    color: #1890ff;
    border-radius: 10px;
    padding: 1px 9px;
}
.ma-conf.low {
    background: #fff7e6;
    color: #d46b08;
}
.ma-setup-detail {
    font-size: 12px;
    color: #666;
    line-height: 1.7;
}
.ma-setup-detail b {
    color: #444;
    font-weight: 600;
}
.ma-rr {
    float: right;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    padding: 1px 9px;
}
.ma-rr.good {
    background: #f6ffed;
    color: #389e0d;
}
.ma-rr.weak {
    background: #fff7e6;
    color: #d46b08;
}
.ma-note {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}
@media (max-width: 900px) {
    .ma-content {
        grid-template-columns: 1fr;
    }
}

/* ===== 手机窄屏优化（行情分析卡片）===== */
@media (max-width: 600px) {
    .dashboard-cards { gap: 12px; }
    .market-analysis-card { padding: 14px; }
    .ma-content { gap: 12px; margin-top: 10px; }
    .ma-coin { padding: 11px; }
    .ma-coin-head { gap: 8px; margin-bottom: 8px; }
    .ma-coin-price { font-size: 16px; }
    .ma-head h3 { font-size: 15px; }
    .ma-refresh-btn { padding: 5px 12px; font-size: 12px; }
    .ma-status { font-size: 11px; }
    .ma-lvl { font-size: 11px; padding: 2px 6px; }
    .ma-lvl-tf { font-size: 9px; }
    .ma-rr { font-size: 11px; }
    .ma-row-label { flex: 0 0 30px; font-size: 11px; }
    .ma-setup { padding: 7px 9px; }
    .ma-setup-label { font-size: 12px; }
    .ma-setup-detail { font-size: 11px; }
    .ma-coin-meta { font-size: 11px; }
    .ma-note { font-size: 11px; }
}

/* ===== 挂限价单按钮 ===== */
.ma-order-btn {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #1890ff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.ma-order-btn:active { background: #096dd9; }

/* ===== 挂单确认弹窗 ===== */
.ma-modal-mask {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}
.ma-modal {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 380px;
    padding: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.ma-modal-title { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 10px; }
.ma-modal-dir {
    font-size: 14px; font-weight: 700; text-align: center;
    border-radius: 6px; padding: 6px 0; margin-bottom: 12px;
}
.ma-modal-dir.long { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.ma-modal-dir.short { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.ma-modal-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: #555; padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}
.ma-modal-row b { color: #222; font-weight: 600; }
.ma-modal-row input {
    width: 110px; padding: 5px 8px; font-size: 13px;
    border: 1px solid #d9d9d9; border-radius: 4px;
}
.ma-modal-warn {
    font-size: 11px; color: #b5651d; line-height: 1.5;
    background: #fffbe6; border-radius: 4px; padding: 7px 9px; margin: 12px 0;
}
.ma-modal-btns { display: flex; gap: 10px; }
.ma-modal-btns button {
    flex: 1; padding: 9px 0; font-size: 14px;
    border-radius: 6px; border: 1px solid #d9d9d9; background: #fff; cursor: pointer;
}
.ma-modal-btns button.primary { background: #1890ff; color: #fff; border-color: #1890ff; }
.ma-modal-btns button.primary:disabled { background: #91d5ff; cursor: default; }
