/* Тёмная тема для css/studio.css (окно управления Студии). Сама сцена (.studio-stage) и окно вывода
   studio_output.php не меняются: это картинка для записи видео, её цвета задаёт пользователь. */

html[data-theme="dark"] {
    --st-accent: #5c8af0;
    --st-rec: #f5a35c;
    --st-line: var(--c-border);
    --st-muted: var(--c-muted);
}

html[data-theme="dark"] .st-page,
html[data-theme="dark"] .st-scenario-title,
html[data-theme="dark"] .st-moves-title,
html[data-theme="dark"] .st-moves-game-title {
    color: var(--c-text);
}

html[data-theme="dark"] .st-scenario-bar,
html[data-theme="dark"] .st-arrange {
    background: var(--c-surface-2);
    border-color: var(--c-border);
}

html[data-theme="dark"] .st-scenario-bar a {
    color: var(--c-accent-text);
}

html[data-theme="dark"] .st-scenario-open,
html[data-theme="dark"] .st-btn,
html[data-theme="dark"] .st-remember,
html[data-theme="dark"] .st-popover,
html[data-theme="dark"] .st-panel,
html[data-theme="dark"] .st-input,
html[data-theme="dark"] .st-color,
html[data-theme="dark"] .st-seg-btn,
html[data-theme="dark"] .st-context-menu,
html[data-theme="dark"] .st-swatch,
html[data-theme="dark"] .st-counter,
html[data-theme="dark"] .st-tile,
html[data-theme="dark"] .st-preset,
html[data-theme="dark"] .st-items-row,
html[data-theme="dark"] .st-item-editor,
html[data-theme="dark"] .st-games-row,
html[data-theme="dark"] .st-plan-block {
    background: var(--c-surface);
    color: var(--c-text);
}

html[data-theme="dark"] .st-input,
html[data-theme="dark"] .st-color,
html[data-theme="dark"] .st-seg-btn {
    border-color: var(--c-border);
}

html[data-theme="dark"] #scenarioStatus[data-status="error"],
html[data-theme="dark"] #scenarioStatus[data-status="conflict"],
html[data-theme="dark"] #scenarioStatus[data-status="limit"],
html[data-theme="dark"] .st-scenario-conflict,
html[data-theme="dark"] .st-error,
html[data-theme="dark"] p.st-error {
    color: var(--c-danger) !important;
}

html[data-theme="dark"] .st-status,
html[data-theme="dark"] .st-mv.is-temp,
html[data-theme="dark"] .st-mv.st-step.is-temp {
    color: #f5a35c;
}

html[data-theme="dark"] .st-app.is-remembering .st-remember,
html[data-theme="dark"] .st-text-style,
html[data-theme="dark"] .st-items-row.is-selected,
html[data-theme="dark"] .st-moves-var[data-depth="4"],
html[data-theme="dark"] .st-moves-var[data-depth="5"],
html[data-theme="dark"] .st-moves-var[data-depth="6"] {
    background: #3d3314;
}

html[data-theme="dark"] .st-text-style,
html[data-theme="dark"] .st-item-editor {
    border-color: #5c4d1c;
}

html[data-theme="dark"] .st-tab:hover {
    color: var(--c-text);
}

/* Список ходов */
html[data-theme="dark"] .st-moves {
    background: var(--c-surface);
    color: var(--c-text);
}

html[data-theme="dark"] .st-moves-num {
    color: var(--c-muted);
}

html[data-theme="dark"] .st-moves-var {
    background: #15283f;
    color: var(--c-text);
}

html[data-theme="dark"] .st-moves-var[data-depth="2"] {
    background: #231c4a;
}

html[data-theme="dark"] .st-moves-var[data-depth="3"] {
    background: #163a34;
}

html[data-theme="dark"] .st-mv:hover {
    background: var(--c-accent-soft);
}

html[data-theme="dark"] .st-mv.st-step,
html[data-theme="dark"] .st-ind-markup {
    color: #b79cf2;
}

html[data-theme="dark"] .st-mv.is-setup,
html[data-theme="dark"] .st-ind-pieces {
    color: #4ee0d4;
}

html[data-theme="dark"] .st-ind-style {
    color: #f0b44c;
}

html[data-theme="dark"] .st-ind-flip {
    color: #7ba2f6;
}

html[data-theme="dark"] .st-preset-icon::before {
    background: var(--c-border);
}

html[data-theme="dark"] .st-preset-custom::before {
    border-color: var(--c-border);
}

html[data-theme="dark"] .st-bg-name,
html[data-theme="dark"] .st-bg-delete {
    background: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .st-games-row:hover {
    background: var(--c-surface-2);
}

/* Вкладка «Запись» */
html[data-theme="dark"] .st-rec-notice {
    background: #3d3314;
    color: #f3dd9a;
}

html[data-theme="dark"] .st-rec-notice.is-info {
    background: #14304a;
    color: #a9d4f5;
}

html[data-theme="dark"] .st-rec-result {
    background: #123a24;
    color: #b6e8c9;
}

html[data-theme="dark"] .st-rec-result.is-failed {
    background: #4a1a1a;
    color: #f5b5b5;
}

html[data-theme="dark"] .st-rec-clock {
    color: #f58a8a;
}

html[data-theme="dark"] .st-rec-item {
    background: var(--c-surface);
    border-color: var(--c-border);
}

html[data-theme="dark"] .st-rec-badge-status {
    background: var(--c-surface-2);
    color: var(--c-text);
}

html[data-theme="dark"] .st-rec-badge-status.is-3 {
    background: #4a1a1a;
    color: #f5b5b5;
}
