/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 禁用滚轮 */
html,
body {
    overflow: hidden;
    height: 100%;
    background: linear-gradient(135deg, #0f0f13 0%, #1a1a26 100%);
    color: #e0e0e8;
    min-height: 100vh;
    padding: 5px;
}

/* 顶部信息栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: rgba(20, 20, 30, 0.7);
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    height: 50px;
}

.system-info {
    display: flex;
    flex-direction: column;
    margin-top: -5px;
}

.system-info h1 {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(90deg, #fc0606, #ca6c6c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 5px;
}

.date-time {
    color: #8c8ca1;
    font-size: 14px;
}

/* 市场状态统计 */
.market-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stock-stats,
.turnover-stats {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-item {
    display: flex;
    align-items: center;
    min-width: 180px;
}

.stat-item span:first-child {
    flex: 0 0 100px;
    text-align: right;
    margin-right: 8px;
    color: #8c8ca1;
}

.highlight-value {
    color: #3498db;
    font-weight: bold;
    margin: 0 5px;
}

.positive {
    color: #e74c3c;
}

.negative {
    color: #2ecc71;
}

.neutral {
    color: #8c8ca1;
    font-weight: bold;
    margin: 0 5px;
}

/* 收藏网址 */
.fav-url {
    position: relative;
    left: 20px;
    margin-top: 0px;
    padding: 0px;
    background: rgba(30, 144, 255, 0.15);
    border-radius: 8px;
    text-align: center;
}

.fav-url h3 {
    font-size: 16px;
    color: #cc9110;
    margin-bottom: 5px;
    line-height: 1.2;
}

.fav-url h3 a {
    color: #cc9110 !important;
    text-decoration: none;
}

.url-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding-top: 0px;
    padding-bottom: 0px;
    margin-top: 0px;
}

.url-box a {
    color: #ee5914;
    font-size: 14px;
    text-decoration: none;
    font-family: monospace;
    font-weight: bold;
    line-height: 1.2;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    margin-left: 20px;
    background: #e0e0e8;
    border-radius: 8px;
    padding: 5px 10px;
    height: 40px;
}

.search-box input {
    background: transparent;
    border: none;
    color: #070707;
    padding: 5px;
    width: 120px;
    outline: none;
}

.search-box input::placeholder {
    color: #1e1e20;
}

.search-box button {
    background: transparent;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 5px;
}

.search-box button:hover {
    color: #5dade2;
}

/* 市场指数 */
.market-indices {
    display: flex;
    gap: 12px;
    padding: 4px 12px;
    background: rgba(20, 20, 30, 0.7);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    align-items: center;
    min-height: 40px;
    margin-left: 20px;
}

.index-card {
    display: flex;
    flex-direction: column;
    min-width: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 5px;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 0px;
}

.index-card:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.index-card:active {
    transform: translateY(0);
}

.index-name {
    color: #e5e5ee;
    font-weight: bolder;
    font-size: 12px;
    margin-bottom: 2px;
}

.index-value {
    font-size: 14px;
    font-weight: bold;
    color: #e0e0e8;
    margin-bottom: 2px;
}

.index-change {
    font-size: 12px;
    margin-top: auto;
}

/* 主容器 */
.container {
    display: flex;
    gap: 0px;

    overflow: hidden;
    /* 禁止滚动 */
}

.sidebar {
    width: 150px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    /* 默认允许滚动 */
    overflow-x: hidden;
    /* 禁止横向滚动 */
    scrollbar-width: thin;
    /* Firefox 优化 */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    /* 滚动条颜色 */
}

/* Chrome/Safari 滚动条优化 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.feature-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.feature-btn {
    background: linear-gradient(45deg, #2c3e50, #4a5a68);
    color: #e0e0e8;
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.feature-btn:hover {
    background: linear-gradient(45deg, #34495e, #556270);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.feature-btn i {
    margin-right: 8px;
    font-size: 16px;
}

.green-outline-btn {
    background: transparent;
    color: #e90b0b;
    border: 1px solid #e9c00b;
    font-size: 12px;
    transition: all 0.3s;
}

.green-outline-btn:hover {
    background: rgba(39, 174, 96, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

/* 状态显示 */
.status {
    min-height: 40px;
    color: #73c0de;
    font-size: 14px;
    padding: 10px;
    text-align: center;
    background: rgba(20, 20, 30, 0.7);
    border-radius: 8px;
    margin-top: 0px;
    margin-bottom: 0px;

}

.error {
    color: #ff6b6b;
}

.success {
    color: #51cf66;
}

.bottom-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 0px;
    background: rgba(20, 20, 30, 0.7);
    border-radius: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #ccccd6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding-left: 0px;
    padding-bottom: 5px;
    padding-top: 0px;
    margin-top: 0px;
    border-bottom-width: 5px;

}

/* 添加这个新容器包裹可滚动内容 */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 60px;
    /* 给bottom-info留出空间 */
    height: 280px;
    overflow-y: hidden;
}

.bottom-info #stockCount {
    color: #3498db;
    font-weight: bold;
}

/* 行业信息 */
.industry-section {
    margin-top: 10px;
}

.industry-section h4 {
    color: #3498db;
    margin-bottom: 10px;
    font-size: 15px;
}

.industry-item {
    margin: 6px 0;
    padding: 0px;
    border-radius: 3px;
    background: rgba(60, 60, 80, 0.3);
    font-size: 12px;
    color: #e74c3c;
}

/* 截图按钮 */
.screenshot-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #165DFF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.screenshot-btn:hover {
    background-color: #0E42D2;
}

.screenshot-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* 操作提示 */
.market-map {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 8px;
    padding-left: 2px;
    padding-top: 0px;
    padding-bottom: 0px;
    margin-top: 15px;
    border: 1px solid white;
    text-align: left;
    width: 90%;
}

.market-map h3 {
    align-self: flex-start;
    margin-left: 0;
    padding-left: 0;
    padding-bottom: 5px;
    padding-top: 5px;
    color: #ecae27;
    font-size: 15px;
}

.tips {
    font-size: 12px;
}

/* 图表区域 */
.chart-area {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

#main {
    width: 100%;
    height: calc(100vh - 100px) !important;
    background: rgba(10, 10, 15, 0.7);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin: 0;
}

/* 颜色条 */
.colorbar-container {
    display: flex;
    margin-top: auto;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 0px;
}

.colorbar {
    width: 100%;
    max-width: 500px;
    height: 16px;
    background: linear-gradient(to right,
            hsl(140, 70%, 35%),
            hsl(0, 5%, 28%),
            hsl(0, 80%, 45%));
    border-radius: 8px;
}

.colorbar-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    font-size: 12px;
    color: white;
    margin-top: 4px;
}

.colorbar-label.left {
    margin-right: 8px;
}

.colorbar-label.right {
    margin-left: 8px;
}

/* 截图模态框 */
.screenshot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.screenshot-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a26;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.screenshot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.screenshot-title {
    color: #e0e0e8;
    font-size: 18px;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: #e0e0e8;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.screenshot-preview {
    margin-bottom: 20px;
    text-align: center;
}

.screenshot-image {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.screenshot-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-weight: bold;
}

.save-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.save-btn:hover {
    background: linear-gradient(45deg, #219a52, #27ae60);
    transform: translateY(-2px);
}

.copy-btn {
    background: linear-gradient(45deg, #3498db, #5dade2);
}

.copy-btn:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: translateY(-2px);
}

.action-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.loading-text {
    color: #73c0de;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

/* 隐藏文件输入 */
#csvInput {
    display: none;
}

/* 其他链接 */
.across-link {
    font-size: 15.5px;
    color: #e73030;
    font-weight: bold;
}

/* 筛选器部分 */
.filter-section {
    margin-top: 5px;
    margin-bottom: 5px;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 12px;
    color: #8c8ca1;
    margin-bottom: 2px;
}

.filter-select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #3d3d4d;
    background-color: rgba(20, 20, 30, 0.8);
    color: #e0e0e8;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.1;
}

.filter-select:hover {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.7);
}

/* 预加载状态的股票块样式 */
.echarts-preloading {
    opacity: 0.7;
    animation: pulse 2s infinite;
}

/* 加载状态样式 */
.loading-container {
    text-align: center;
    padding: 20px;
}

.progress-container {
    width: 80%;
    margin: 15px auto;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 10px;
    background: #3498db;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #aaa;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0.7;
    }
}

/* 响应式设计 - 重组为平铺结构 */
@media (max-width: 340px) {
    /* 小屏样式 (0-768px) */
    .container {
        flex-direction: column;
        overflow-y: auto;
    }

    .header{
        width: 100%;
    }

    
    .sidebar {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .market-indices {
        gap: 10px;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .chart-bottom-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .replay-container {
        max-width: 100%;
        justify-content: center;
        gap: 6px;
    }
    
    .colorbar-container {
        max-width: 100%;
        justify-content: center;
    }
    
    .replay-btn {
        min-width: 60px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .colorbar {
        width: 250px;
    }
}

@media (min-width: 340px) and (max-width: 1200px) {
    /* 中屏样式 (769-1200px) */
    .chart-bottom-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        gap: 20px;
    }
    
    .replay-container {
        max-width: 60%;
        justify-content: flex-start;
    }
    
    .colorbar-container {
        max-width: 35%;
        justify-content: flex-end;
        min-width: 250px;
    }
    
    .colorbar {
        width: 200px;
    }
}

@media (min-width: 640px) {
    /* 大屏样式 (1201px+) */
    .colorbar {
        width: 300px;
    }
    /* 其他大屏专属样式 */
}