/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #1e2a3a, #2d3b4d, #3d4e61);
    color: #f0f8ff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 25px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.chart-icon {
    font-size: 2.2rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #a0d2ff;
    opacity: 0.9;
}

/* 状态面板 */
.status-panel {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    color: #a0d2ff;
    font-weight: 600;
}

.status-value {
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 控制区域 */
.controls {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.control-group:last-child {
    margin-bottom: 0;
}


        .btn {
            padding: 8px 16px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .btn-primary {
            background-color: #165dff;
            color: #fff;
        }
        .btn-primary:hover {
            background-color: #0047cc;
        }
        .btn-secondary {
            background-color: #f0f2f5;
            color: #333;
        }
        .btn-secondary:hover {
            background-color: #e0e3e9;
        }
        .btn-secondary:disabled {
            background-color: #f8f9fa;
            color: #999;
            cursor: not-allowed;
        }
        .btn-danger {
            background-color: #ff4d4f;
            color: #fff;
        }
        .btn-danger:hover {
            background-color: #d9363e;
        }
        .btn-outline {
            background: transparent;
            border: 1px solid #165dff;
            color: #165dff;
            padding: 7px 15px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .btn-outline:hover {
            background-color: #165dff;
            color: #fff;
        }

        /* 股票选择区域样式（核心优化） */
        .symbol-select-group {
            display: flex;
            align-items: center;
            gap: 0;
            border-radius: 6px;
            overflow: hidden;
            border: 1px solid #e5e6eb;
        }
        .symbol-btn {
            width: 36px;
            height: 36px;
            border: none;
            background-color: #f7f8fa;
            color: #165dff;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .symbol-btn:hover:not(:disabled) {
            background-color: #e8f0ff;
        }
        .symbol-btn:disabled {
            background-color: #fafafa;
            color: #ccc;
            cursor: not-allowed;
        }
        .symbol-select {
            height: 36px;
            padding: 0 12px;
            border: none;
            outline: none;
            min-width: 180px;
            font-size: 14px;
            color: #333;
            background-color: #fff;
        }
        .symbol-select:focus {
            box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
        }
        .form-select {
            height: 36px;
            padding: 0 12px;
            border-radius: 6px;
            border: 1px solid #e5e6eb;
            outline: none;
            font-size: 14px;
            color: #333;
            background-color: #fff;
            transition: border-color 0.2s ease;
        }
        .form-select:focus {
            border-color: #165dff;
            box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
        }
        label {
            font-size: 14px;
            color: #666;
            white-space: nowrap;
        }

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(to right, #0052d4, #4364f7, #6fb1fc);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 82, 212, 0.3);
}

.btn-secondary {
    background: linear-gradient(to right, #2b5876, #4e4376);
    color: white;
    box-shadow: 0 4px 12px rgba(43, 88, 118, 0.3);
}

.btn-danger {
    background: linear-gradient(to right, #f46b45, #eea849);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 107, 69, 0.3);
}

.btn-info {
    background: linear-gradient(to right, #11998e, #38ef7d);
    color: white;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.btn-icon {
    font-size: 1.2rem;
}

.form-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    min-width: 120px;
}

.form-select:focus {
    outline: none;
    border-color: #4dabf7;
}

label {
    color: #a0d2ff;
    font-weight: 600;
}
/* 股票代码输入框 */
.form-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 8px;
    width: 120px;
}


/* 数据来源切换按钮 */
.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
}
.btn-outline:hover {
    background: #007bff;
    color: white;
}
/* 图表容器 */
.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    width: 100%;
    height: 800px;
    position: relative;
}

/* 专属子容器（必须占满父容器） */
#kline-chart-inner {
    width: 100%;
    height: 90%;
}
/* 加载中提示 */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #666;
    font-size: 18px;
}
.chart-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
}

.chart-info {
    display: flex;
    gap: 15px;
}

.chart-info span {
    background: rgba(0, 100, 255, 0.2);
    color: #4dabf7;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.chart-area {
    height: 900px;
    width: 100%;
    position: relative;
    background: #0f1a2a;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #a0d2ff;
    text-align: center;
}
/* 加载/提示样式 */
.chart-loading, .chart-placeholder, .chart-error {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    /* color: #f5f7fa;
    color: #165dff; */
    font-size: 16px;
}
.chart-error {
    color: #e53e3e;
}

        /* 指标列表样式 */
        .indicator-list {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .indicator-btn {
            padding: 6px 12px;
            border-radius: 4px;
            border: 1px solid #e5e6eb;
            background: #fff;
            color: #333;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s ease;
        }
        .indicator-btn.active {
            background-color: #165dff;
            color: #fff;
            border-color: #165dff;
        }
        .indicator-btn:hover:not(.active) {
            border-color: #165dff;
            color: #165dff;
        }
        .indicator-btn:disabled {
            background-color: #f8f9fa;
            color: #999;
            border-color: #e5e6eb;
            cursor: not-allowed;
        }

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* 日志面板 */
.log-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
}

.log-panel h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-icon {
    font-size: 1.2rem;
}

.log-output {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.log-timestamp {
    color: #a0d2ff;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 120px;
}

.log-message {
    color: #f0f8ff;
    flex: 1;
}

.log-message.success {
    color: #4cd964;
}

.log-message.error {
    color: #ff3b30;
}

.log-message.warning {
    color: #ffcc00;
}

.log-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    color: #a0d2ff;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-note {
    font-size: 0.8rem;
    color: #88aacc;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .status-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn, .form-select {
        width: 100%;
    }
    
    .chart-area {
        height: 400px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-info {
        flex-wrap: wrap;
    }
}