@media (prefers-color-scheme: light) {
    :root {
        --md-sys-color-primary: rgb(109 94 15);
        --md-sys-color-surface-tint: rgb(109 94 15);
        --md-sys-color-on-primary: rgb(255 255 255);
        --md-sys-color-primary-container: rgb(248 226 135);
        --md-sys-color-on-primary-container: rgb(83 70 0);
        --md-sys-color-secondary: rgb(102 94 64);
        --md-sys-color-on-secondary: rgb(255 255 255);
        --md-sys-color-secondary-container: rgb(238 226 188);
        --md-sys-color-on-secondary-container: rgb(78 71 42);
        --md-sys-color-tertiary: rgb(67 102 78);
        --md-sys-color-tertiary-alpha: rgba(67, 102, 78, 0.6);
        --md-sys-color-on-tertiary: rgb(255 255 255);
        --md-sys-color-tertiary-container: rgb(197 236 206);
        --md-sys-color-on-tertiary-container: rgb(44 78 56);
        --md-sys-color-error: rgb(186 26 26);
        --md-sys-color-on-error: rgb(255 255 255);
        --md-sys-color-error-container: rgb(255 218 214);
        --md-sys-color-on-error-container: rgb(147 0 10);
        --md-sys-color-background: rgb(255 249 238);
        --md-sys-color-on-background: rgb(30 27 19);
        --md-sys-color-surface: rgb(255 249 238);
        --md-sys-color-on-surface: rgb(30 27 19);
        --md-sys-color-surface-variant: rgb(234 226 208);
        --md-sys-color-on-surface-variant: rgb(75 71 57);
        --md-sys-color-outline: rgb(124 119 103);
        --md-sys-color-outline-variant: rgb(205 198 180);
        --md-sys-color-shadow: rgb(0 0 0);
        --md-sys-color-scrim: rgb(0 0 0);
        --md-sys-color-inverse-surface: rgb(51 48 39);
        --md-sys-color-inverse-on-surface: rgb(247 240 226);
        --md-sys-color-inverse-primary: rgb(219 198 110);
        --md-sys-color-primary-fixed: rgb(248 226 135);
        --md-sys-color-on-primary-fixed: rgb(34 27 0);
        --md-sys-color-primary-fixed-dim: rgb(219 198 110);
        --md-sys-color-on-primary-fixed-variant: rgb(83 70 0);
        --md-sys-color-secondary-fixed: rgb(238 226 188);
        --md-sys-color-on-secondary-fixed: rgb(33 27 4);
        --md-sys-color-secondary-fixed-dim: rgb(209 198 161);
        --md-sys-color-on-secondary-fixed-variant: rgb(78 71 42);
        --md-sys-color-tertiary-fixed: rgb(197 236 206);
        --md-sys-color-on-tertiary-fixed: rgb(0 33 15);
        --md-sys-color-tertiary-fixed-dim: rgb(169 208 179);
        --md-sys-color-on-tertiary-fixed-variant: rgb(44 78 56);
        --md-sys-color-surface-dim: rgb(224 217 204);
        --md-sys-color-surface-bright: rgb(255 249 238);
        --md-sys-color-surface-container-lowest: rgb(255 255 255);
        --md-sys-color-surface-container-low: rgb(250 243 229);
        --md-sys-color-surface-container: rgb(244 237 223);
        --md-sys-color-surface-container-high: rgb(238 232 218);
        --md-sys-color-surface-container-highest: rgb(232 226 212);

        --bg-color: var(--md-sys-color-background);
        --text-color: var(--md-sys-color-on-surface);
        --primary: var(--md-sys-color-primary);
        --secondary: var(--md-sys-color-secondary-container);
        --surface: var(--md-sys-color-surface-container);
        --accent: var(--md-sys-color-primary);
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --md-sys-color-primary: rgb(219 198 110);
        --md-sys-color-surface-tint: rgb(219 198 110);
        --md-sys-color-on-primary: rgb(58 48 0);
        --md-sys-color-primary-container: rgb(83 70 0);
        --md-sys-color-on-primary-container: rgb(248 226 135);
        --md-sys-color-secondary: rgb(209 198 161);
        --md-sys-color-on-secondary: rgb(54 48 22);
        --md-sys-color-secondary-container: rgb(78 71 42);
        --md-sys-color-on-secondary-container: rgb(238 226 188);
        --md-sys-color-tertiary: rgb(169 208 179);
        --md-sys-color-tertiary-alpha: rgba(169, 208, 179, 0.6);
        --md-sys-color-on-tertiary: rgb(20 55 35);
        --md-sys-color-tertiary-container: rgb(44 78 56);
        --md-sys-color-on-tertiary-container: rgb(197 236 206);
        --md-sys-color-error: rgb(255 180 171);
        --md-sys-color-on-error: rgb(105 0 5);
        --md-sys-color-error-container: rgb(147 0 10);
        --md-sys-color-on-error-container: rgb(255 218 214);
        --md-sys-color-background: rgb(21 19 11);
        --md-sys-color-on-background: rgb(232 226 212);
        --md-sys-color-surface: rgb(21 19 11);
        --md-sys-color-on-surface: rgb(232 226 212);
        --md-sys-color-surface-variant: rgb(75 71 57);
        --md-sys-color-on-surface-variant: rgb(205 198 180);
        --md-sys-color-outline: rgb(150 144 128);
        --md-sys-color-outline-variant: rgb(75 71 57);
        --md-sys-color-shadow: rgb(0 0 0);
        --md-sys-color-scrim: rgb(0 0 0);
        --md-sys-color-inverse-surface: rgb(232 226 212);
        --md-sys-color-inverse-on-surface: rgb(51 48 39);
        --md-sys-color-inverse-primary: rgb(109 94 15);
        --md-sys-color-primary-fixed: rgb(248 226 135);
        --md-sys-color-on-primary-fixed: rgb(34 27 0);
        --md-sys-color-primary-fixed-dim: rgb(219 198 110);
        --md-sys-color-on-primary-fixed-variant: rgb(83 70 0);
        --md-sys-color-secondary-fixed: rgb(238 226 188);
        --md-sys-color-on-secondary-fixed: rgb(33 27 4);
        --md-sys-color-secondary-fixed-dim: rgb(209 198 161);
        --md-sys-color-on-secondary-fixed-variant: rgb(78 71 42);
        --md-sys-color-tertiary-fixed: rgb(197 236 206);
        --md-sys-color-on-tertiary-fixed: rgb(0 33 15);
        --md-sys-color-tertiary-fixed-dim: rgb(169 208 179);
        --md-sys-color-on-tertiary-fixed-variant: rgb(44 78 56);
        --md-sys-color-surface-dim: rgb(21 19 11);
        --md-sys-color-surface-bright: rgb(60 57 48);
        --md-sys-color-surface-container-lowest: rgb(16 14 7);
        --md-sys-color-surface-container-low: rgb(30 27 19);
        --md-sys-color-surface-container: rgb(34 32 23);
        --md-sys-color-surface-container-high: rgb(45 42 33);
        --md-sys-color-surface-container-highest: rgb(56 53 43);

        --bg-color: var(--md-sys-color-background);
        --text-color: var(--md-sys-color-on-surface);
        --primary: var(--md-sys-color-primary);
        --secondary: var(--md-sys-color-secondary-container);
        --surface: var(--md-sys-color-surface-container);
        --accent: var(--md-sys-color-primary);
    }
}

* {
    transition-duration: 0.2s;
    transition-property: background, color, border-color;
    transition-timing-function: ease-in-out;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    text-align: center;
    font-family: "Noto Sans", serif;
}

.monochrome {
    filter: grayscale(100%);
    color: #000000;
}

.header h1 {
    font-family: "Noto Sans", serif; /*задали явным образом*/
    font-size: 2.5rem;
    margin-top: 0;
    color: var(--md-sys-color-primary);
}

.info h2 {
    font-size: 2rem;
    margin-top: 1rem;
    color: var(--md-sys-color-primary);
}

.coords h1,
.logs h1,
.input h1 {
    font-size: 2rem;
    color: var(--md-sys-color-primary);
}

html,
body {
    margin: 0;
    padding: 0;
    overflow: hidden; /*убирает прокрутку*/
    height: 100%;
}

.wrapper {
    display: flex;
    height: calc(100vh - 20px - 20px);
    justify-content: space-between;
    border-radius: 2em;
    background: var(--bg-color);
    margin: 20px;
    gap: 20px;
}

.left,
.right {
    border-radius: 2em;
    padding: 15px;
    overflow-y: auto;
}

.right {
    flex: 3;
    background: var(--surface);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 2em;
    border-radius: 2em;
    overflow-y: auto;
}

.left {
    flex: 2;
    background: var(--surface);
    overflow-x: auto;
}

.battery-status-container,
.star-info-container {
    margin-left: auto;
    display: flex;
    flex-direction: row;
    align-items: end;
    padding: 10px;
    background: var(--md-sys-color-secondary-container);
    border-radius: 0.5em;
    text-align: center;
    font-weight: bold;
    color: var(--md-sys-color-on-secondary-container);
}

.battery-status-container {
    margin-top: auto;
}

.star-info-container {
    margin-top: 1em;
    padding: 0.5em;
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 600px;
    max-width: 600px;
    margin: 20px auto;
}

#background {
    width: 100%;
    height: 100%;
    display: block;
}

#foreground,
#animate-ground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.logs-container {
    display: flex;
    flex-direction: column;
}

.input {
    font-size: 1.2rem;
}

.notify {
    position: fixed;
    top: 40px;
    left: 40%;
    width: 20%;
    padding: 12px 20px;
    border-radius: 1em;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    max-width: 400px;
    font-size: 1.2em;
}

.notify.show {
    opacity: 1;
    transform: translateY(0);
}

.notify.error {
    background: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
}

.notify.success {
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
}

.form-container,
.coords-container,
.logs-container {
    width: 70%;
    background: var(--md-sys-color-surface-container-high);
    padding: 2em;
    border-radius: 1em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-container {
    margin-bottom: 2em;
}

.logs-container {
    min-width: 70%;
    overflow-x: auto; /* горизонтальная прокрутка */
    width: 70%;
}

.coords-section,
.form-section,
.logs-section {
    display: grid;
    place-items: center;
}

.form-group {
    margin-bottom: 1.5em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 1.1em;
}

.form-select {
    width: 100%;
    padding: 0.8em;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 0.5em;
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    font-size: 1em;
}

.form-select:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(248, 226, 135, 0.3);
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.8em;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 0.5em;
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    font-size: 1em;
}

.form-input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(248, 226, 135, 0.3);
}

.checkbox-group {
    display: flex;
    gap: 1.5em;
    background: var(--md-sys-color-surface-container-low);
    border-radius: 0.5em;
    border: 2px solid var(--md-sys-color-outline);
    padding-left: 1.6rem;
}

.checkbox-group legend {
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    padding: 0 0.5em;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin: 0.2em 0;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.5em;
    transform: scale(1.2);
    accent-color: var(--md-sys-color-primary);
}

.checkbox-item label {
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    margin: 0;
}

.submit-btn {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 1em 2em;
    border: 2px solid var(--md-sys-color-primary);
    border-radius: 0.5em;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 1em;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(0);
}

.show-btn {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: 0.3em;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

#result-table,
.tbody {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: 1em;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#result-table th,
#result-table td {
    padding: 0.5em 1em;
    text-align: center;
    color: var(--md-sys-color-on-surface);
}

#result-table th {
    background: var(--md-sys-color-surface-container-low);
    font-weight: 600;
}

#result-table:has(tr:not(:first-child)) th {
    border-bottom: 2px solid var(--md-sys-color-outline);
}

#result-table tr:hover {
    background: var(--md-sys-color-surface-container);
}

.idle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    color: var(--md-sys-color-secondary);
    font-family: "Noto Sans", serif;
    padding: 20px;
}

.idle-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.idle-overlay > .background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle,
        transparent 0%,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.7) 70%,
        rgba(0, 0, 0, 1) 100%
    );
    opacity: 0;
    filter: brightness 0.4;
    transition: opacity 6s ease;
    pointer-events: none;
    z-index: -1;
}

.idle-overlay.show > .background {
    opacity: 1;
}

.idle-content {
    text-align: center;
    padding: 2em;
    padding-left: 4em;
    padding-right: 4em;
    background: var(--md-sys-color-surface-container-high);
    border-radius: 2em;
    max-width: 60%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.idle-content h1 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-size: 4em;
}

.idle-content p {
    margin: 0.5em 0;
    font-size: 1rem;
}

.countdown {
    display: flex;
    flex-direction: row;
}
.sdvg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    flex-direction: row;
    gap: 30px;
    padding: 2em;
    width: 100%;
    height: 100vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    background: var(--md-sys-color-surface-container);
}

.sdvg-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.sdvg-content-left-colown {
    display: flex;
    flex-direction: column;
    gap: 30px;
    /*width: 10;
    height: 100%;*/
    height: 100%;
    width: 40%;
}

.sdvg-content-left-colown .sdvg-video {
    width: auto;
    height: calc(50% - 6em);
    object-fit: cover;
    border-radius: 2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sdvg-content-left {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    height: 50%;
}

.sdvg-content-left .sdvg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sdvg-content-right-colown {
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: 100%;
    width: 100%;
    width: calc(60% - 3em);
}

.sdvg-content-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: 100%;
}

.sdvg-content-right .sdvg-video {
    width: calc(100% - 3em);
    height: calc(50% - 3em);
    object-fit: cover;
    border-radius: 2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
