:root {
    --color-bg-primary: #1e232d;
    --color-bg-panel: #0e1b2c;
    --color-bg-hover: #1f477a;
    --color-state-hover: #1f477a;
    --color-text-primary: #e0e0e0;
    --color-text-tertiary: #888888;
    --color-text-plate: #01bcdd;
    --color-function-red: #D22222;
    --color-border: #333333;
    --color-scrollbar: #555;
    --color-scrollbar-hover: #ff9900;
}

body.light-theme {
    --color-bg-primary: #e0e0e0;
    --color-bg-panel: #e0e0e0;
    --color-bg-hover: #cbd5e1;
    --color-state-hover: #cbd5e1;
    --color-text-primary: #1a1d23;
    --color-text-tertiary: #64748b;
    --color-text-plate: #0066ff;
    --color-function-red: #D22222;
    --color-border: #cbd5e1;
    --color-scrollbar: #64748b;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--color-bg-primary) !important;
    color: var(--color-text-primary) !important;
    font-family: "Microsoft YaHei", "JetBrains Mono", "Roboto Mono", Consolas, Monaco, "PingFang SC", monospace !important;
}

* {
    border-radius: 0 !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    display: block;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px !important;
    background: var(--color-scrollbar);
    background-clip: padding-box;
    border: 0 solid transparent;
}

::-webkit-scrollbar-thumb:vertical {
    border-width: 0 2.5px;
}

::-webkit-scrollbar-thumb:horizontal {
    border-width: 2.5px 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-hover);
    border-width: 0;
}

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

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-scrollbar) transparent;
}

* {
    -ms-overflow-style: none;
}

#container {
    width: 100%;
    height: 100%;
    background: var(--color-bg-primary);
    padding: 0;
    position: relative;
    margin: 0 auto;
}

.chart {
    padding: 0;
    margin-top: 0;
}

.chart-scroll {
    width: 100%;
    height: 100vh;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

#chart {
    height: 100%;
    margin-top: 0;
}

.loading-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    padding: 20px 30px;
    z-index: 9999;
    text-align: center;
    min-width: 280px;
}

.loading-text {
    color: var(--color-text-primary);
    font-size: 14px;
    margin-bottom: 8px;
}

.loading-progress {
    color: var(--color-text-plate);
    font-size: 12px;
}

.loading-tip.hidden {
    display: none;
}

.manual-open {
    position: fixed;
    top: 2px;
    right: 10px;
    width: 10px;
    height: 5px;
    margin-top: 3px;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0px;
    font-size: 11px;
    line-height: 17px;
    color: #555555;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    user-select: none;
}

.manual-open::before {
    content: "";
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
}

.manual-open:hover {
    color: #ff9900;
}

.manual-modal {
    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: 2147483005;
}

.manual-modal[hidden] {
    display: none;
}

.manual-modal-content {
    width: 100%;
    height: 100%;
    background: var(--color-bg-primary);
    overflow: hidden;
    position: relative;
}

.manual-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.font-settings-panel {
    position: fixed;
    top: 28px;
    right: 30px;
    width: 40px;
    height: 150px;
    background: #2a2a2a;
    border: 1px solid #555;
    padding: 15px 10px;
    z-index: 10003;
    box-sizing: border-box;
    display: none;
    cursor: default;
}

body.light-theme .font-settings-panel {
    background: #ffffff;
    border-color: #cbd5e1;
}

.font-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

input[type="range"].font-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    background: #555;
    outline: none;
    cursor: pointer;
    transform: rotate(-90deg);
    margin: 0;
}

body.light-theme input[type="range"].font-slider {
    background: #cbd5e1;
}

input[type="range"].font-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #01bcdd;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

input[type="range"].font-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #01bcdd;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

.updates-tooltip {
    background: #1e232d;
    border: 1px solid #888888;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.updates-tooltip-close {
    background: #555555;
    color: #e0e0e0;
    transition: background 0.2s ease;
}
.updates-tooltip-close:hover {
    background: #D22222;
}
body.light-theme .updates-tooltip {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
body.light-theme .updates-tooltip-close {
    background: #64748b;
    color: #ffffff;
}
body.light-theme .updates-tooltip-close:hover {
    background: #b91c1c;
}
