* {
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 5px;
    background-color: #f8f9fa;
}

.header-Title {
    text-align: center;
    padding: 20px 0;
    background: linear-gradient(to right, #8e2de2, #4a00e0);
    color: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-Title h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.header-Title p {
    margin: 8px 0 0;
    font-size: 1rem;
    opacity: 0.9;
}

.control-panel {
    margin: 10px auto;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
    max-width: 800px;
}

.control-group {
    flex: 0 0 auto;
    min-width: 150px;
}

.control-title {
    display: block;
    margin-left: 5px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

/* 收藏按钮样式 */
.favorite-button {
    background-color: #8e2de2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.favorite-button:hover {
    background-color: #6a1b9a;
    transform: translateY(-1px);
}

.favorite-button.favorited {
    background-color: #ffc107;
    color: #333;
}

/* 提示信息样式 */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-message.show {
    opacity: 1;
}

.chart-container {
    width: 100%;
    height: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

#chart-tb {
    width: 100%;
    height: 100%;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
    flex-direction: column;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8e2de2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

.loading-text {
    font-size: 14px;
    color: #8e2de2;
    font-weight: bold;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    body { padding: 5px; }
    .control-panel { padding: 8px; gap: 8px; margin: 8px auto; }
    .control-group { min-width: 120px; }
    .chart-container { height: 350px; }
    select { padding: 7px; font-size: 13px; }
}

@media (max-width: 480px) and (orientation: portrait) {
    .chart-container { height: 300px; }
    .control-title { font-size: 13px; }
    .header-Title h1 { font-size: 1.5rem; }
    .header-Title p { font-size: 0.9rem; }
}

@media (max-width: 900px) and (orientation: landscape) {
    .chart-container { height: 350px; }
    .control-panel { max-width: 100%; }
}