/* Тёмная тема Astro3D. Применяется при html[data-theme="dark"].
   Chrome страниц перекрашивается целиком; графики Plotly берут палитру
   из window.AstroTheme.plot() и перерисовываются при смене темы. */

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background: #121218;
    color: #e8e6f0;
}

html[data-theme="dark"] body * {
    border-color: #3a3a46;
}

html[data-theme="dark"] a {
    color: #c4b5fd;
}

html[data-theme="dark"] header,
html[data-theme="dark"] header *,
html[data-theme="dark"] .header,
html[data-theme="dark"] .header * {
    background: #3d0070;
    color: #fff;
}

html[data-theme="dark"] footer {
    background: #3d0070;
    color: #e8e6f0;
}

html[data-theme="dark"] .mobile-nav {
    background: #2a0050;
    border-top-color: #5b21b6;
}

html[data-theme="dark"] .mobile-nav a.active {
    background: #4c1d95;
}

html[data-theme="dark"] .center,
html[data-theme="dark"] .work {
    background: #1b1b22;
    border-color: #5b21b6;
}

html[data-theme="dark"] #chart {
    border-color: #5b21b6;
    background: #14141a;
}

html[data-theme="dark"] fieldset {
    border-color: #5b21b6;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #23232c;
    color: #e8e6f0;
    border-color: #5b21b6;
}

html[data-theme="dark"] [type=button],
html[data-theme="dark"] input[type=button],
html[data-theme="dark"] button {
    background: #2a2a35;
    color: #e8e6f0;
    border-color: #5b21b6;
}

html[data-theme="dark"] .grid .calcAstro,
html[data-theme="dark"] .calcAstro,
html[data-theme="dark"] .calc {
    background: #7c3aed;
    color: #fff;
    border: none;
}

html[data-theme="dark"] .grid-toggle {
    background: #2a2a35;
    color: #e8e6f0;
    border-color: #5b21b6;
}

html[data-theme="dark"] table,
html[data-theme="dark"] th {
    background: #1b1b22;
}

html[data-theme="dark"] table thead td,
html[data-theme="dark"] table td,
html[data-theme="dark"] td,
html[data-theme="dark"] th {
    border-color: #5b21b6;
}

html[data-theme="dark"] .tablehead td {
    color: #c4b5fd;
}

html[data-theme="dark"] .day0 {
    background-color: rgba(124, 58, 237, 0.25);
}

html[data-theme="dark"] .trap-block {
    border-bottom-color: #5b21b6;
    color: #8f8f9a;
}

html[data-theme="dark"] .trap-block.selected {
    color: #c4b5fd;
    border-bottom-color: #3a3a46;
}

html[data-theme="dark"] .tabs-content {
    border-color: #5b21b6;
    background: #1b1b22;
}

html[data-theme="dark"] .day-card {
    background: #1e1e26;
    border-color: #5b21b6;
}

html[data-theme="dark"] .day-head {
    border-bottom-color: #5b21b6;
}

html[data-theme="dark"] .day-num {
    color: #c4b5fd;
}

html[data-theme="dark"] .day-moon {
    color: #b9b3c7;
}

html[data-theme="dark"] .day-card .ev {
    border-bottom-color: #33333d;
}

html[data-theme="dark"] .modal-default,
html[data-theme="dark"] .modal-div {
    background: #1e1e26;
    color: #e8e6f0;
    border-color: #5b21b6;
}

html[data-theme="dark"] .modalbg {
    background-color: rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] iframe {
    background: #1e1e26;
}

html[data-theme="dark"] .transit-settings {
    background: #1e1e26;
    border-color: #3a3a46;
}

html[data-theme="dark"] #warning {
    color: #e8e6f0;
    border-color: #A138FC;
}

html[data-theme="dark"] .plotly-lazy-hint {
    color: #c4b5fd;
}

html[data-theme="dark"] .loading-indicator {
    background: rgba(30, 30, 38, 0.95);
    color: #e8e6f0;
}
