.slider-handle:focus-visible {
    outline: 3px solid var(
        --link-color,
        cyan
    );
    outline-offset: 3px;
}

.info-dialog {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    padding: 18px;
    background: var(
        --dialog-background,
        #303030
    );
    border: 2px solid var(
        --dialog-border,
        #ffffff
    );
    color: var(
        --dialog-text,
        #eeeeee
    );
    font-family: Arial, sans-serif;
    z-index: 1000;
}

.info-dialog button,
.info-dialog select {
    box-sizing: border-box;
    background: var(
        --button-background,
        #505050
    );
    color: var(
        --button-text,
        #eeeeee
    );
    border: 1px solid var(
        --button-border,
        #707070
    );
}

.info-dialog button {
    cursor: pointer;
}

.info-dialog select {
    background: var(
        --input-background,
        #505050
    );
    color: var(
        --input-text,
        #eeeeee
    );
    border-color: var(
        --input-border,
        #707070
    );
}

.info-dialog select:disabled {
    opacity: 0.65;
    cursor: default;
}

.about-dialog {
    width: 520px;
}

.info-dialog-header {
    margin-bottom: 24px;
}

.about-project-title {
    font-size: 24px;
    font-weight: bold;
}

.about-information {
    line-height: 1.5;
}

.about-information-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.about-information-row:last-child {
    margin-bottom: 0;
}

.about-information-label {
    width: 210px;
    flex: 0 0 210px;
    font-weight: bold;
}

.about-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
}

.settings-dialog {
    width: 460px;
    min-height: 300px;
    padding: 0;
    overflow: hidden;
}

.settings-dialog .info-dialog-header {
    margin-bottom: 0;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(
        --dialog-border,
        #707070
    );
}

.settings-title {
    font-size: 24px;
    font-weight: bold;
}

.settings-content {
    padding: 22px 20px 18px;
}

.settings-section {
    margin-bottom: 28px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    display: block;
    margin-bottom: 12px;
    font-weight: bold;
}

.settings-theme-options {
    display: flex;
    align-items: center;
    gap: 28px;
}

.settings-theme-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#settings-language {
    min-width: 180px;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 20px;
    border-top: 1px solid var(
        --dialog-border,
        #707070
    );
}

.ecosystem-info-dialog {
    width: min(820px, calc(100vw - 40px));
    height: min(720px, calc(100vh - 80px));
    padding: 0;
    overflow: hidden;
}

.ecosystem-info-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(
        --dialog-border,
        #707070
    );
}

.ecosystem-info-title {
    font-size: 24px;
    font-weight: bold;
}

.ecosystem-info-content {
    height: calc(100% - 112px);
    box-sizing: border-box;
    padding: 18px 20px;
    overflow-y: auto;
}

.ecosystem-info-description {
    margin: 0 0 24px;
    line-height: 1.5;
}

.ecosystem-info-section {
    margin-bottom: 28px;
}

.ecosystem-info-section:last-child {
    margin-bottom: 0;
}

.ecosystem-info-section h2 {
    margin: 0 0 12px;
    font-size: 20px;
}


.ecosystem-info-section p {
    margin: 0;
    line-height: 1.5;
}

.ecosystem-info-status-bar-example {
    box-sizing: border-box;
    margin-bottom: 18px;
    padding: 10px 12px;
    overflow-x: auto;
    background: var(
        --status-bar-background,
        #404040
    );
    border: 1px solid var(
        --dialog-border,
        #707070
    );
    color: var(
        --status-bar-text,
        #eeeeee
    );
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.ecosystem-info-status-bar-statistics,
.ecosystem-info-status-bar-actions {
    min-width: max-content;
    white-space: pre;
}

.ecosystem-info-status-bar-statistics {
    margin-bottom: 8px;
}


.ecosystem-info-status-bar-actions {
    color: var(
        --link-color,
        cyan
    );
}

#ecosystem-info-status-bar-text .info-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 8px;
}

#ecosystem-info-status-bar-text .info-item-title {
    margin-bottom: 0;
    font-weight: normal;
    white-space: nowrap;
}

#ecosystem-info-status-bar-text .info-item-title::after {
    content: " -";
}

#ecosystem-info-status-bar-text .info-item-description {
    line-height: 1.45;
}

#ecosystem-info-initial-parameters-text .info-item,
#ecosystem-info-prediction-parameters-text .info-item,
#ecosystem-info-csv-info-text .info-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 8px;
}

#ecosystem-info-initial-parameters-text .info-item-title,
#ecosystem-info-prediction-parameters-text .info-item-title,
#ecosystem-info-csv-info-text .info-item-title {
    margin-bottom: 0;
    font-weight: normal;
    white-space: nowrap;
}

#ecosystem-info-initial-parameters-text .info-item-title::after,
#ecosystem-info-prediction-parameters-text .info-item-title::after,
#ecosystem-info-csv-info-text .info-item-title::after {
    content: " -";
}

#ecosystem-info-species-text .species-info-text {
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
}

#ecosystem-info-species-text .species-info-title {
    margin-bottom: 0;
    font-weight: normal;
    white-space: nowrap;
}

#ecosystem-info-species-text .species-info-title::after {
    content: " -";
}

.info-item {
    margin-bottom: 14px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item-title {
    margin-bottom: 3px;
    font-weight: bold;
}

.info-item-description {
    line-height: 1.45;
}

.species-info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.species-info-item:last-child {
    margin-bottom: 0;
}

.species-info-sprite-container {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.species-info-sprite {
    display: block;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

.species-info-sprite-spider {
    width: 42px;
    height: 42px;
}

.species-info-sprite-bug {
    width: 46px;
    height: 46px;
}

.species-info-sprite-ant {
    width: 48px;
    height: 48px;
}

.species-info-sprite-frog {
    width: 70px;
    height: 70px;
}

.species-info-text {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.species-info-title {
    margin-bottom: 4px;
    font-weight: bold;
}

.species-info-description {
    line-height: 1.45;
}

.interaction-diagram {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.interaction-row {
    display: flex;
    align-items: center;
    min-width: max-content;
}

.interaction-node {
    min-width: 96px;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(
        --dialog-border,
        #777777
    );
    background: var(
        --button-background,
        #383838
    );
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
}

.interaction-node-resource {
    border-color: #9a9a9a;
    color: var(
        --dialog-text,
        #dddddd
    );
}

.interaction-node-egg {
    border-color: #aaaaaa;
    color: var(
        --dialog-text,
        #eeeeee
    );
}

.interaction-node-spider {
    border-color: #9a9a9a;
}

.interaction-node-bug {
    border-color: #b76a4d;
}

.interaction-node-ant {
    border-color: #9a5c42;
}

.interaction-node-frog {
    border-color: #91a857;
}

.interaction-relation {
    width: 160px;
    flex: 0 0 160px;
    text-align: center;
}

.interaction-relation-label {
    margin-bottom: 1px;
    color: var(
        --dialog-text,
        #d0d0d0
    );
    font-size: 13px;
    white-space: nowrap;
}

.interaction-arrow {
    font-size: 22px;
    line-height: 18px;
}

.ecosystem-info-actions {
    height: 58px;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 20px;
    border-top: 1px solid var(
        --dialog-border,
        #707070
    );
}

@media (max-width: 700px) {
    .interaction-diagram {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .interaction-node {
        min-width: 88px;
    }

    .interaction-relation {
        width: 140px;
        flex-basis: 140px;
    }
}

#splash-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dcebee;
    opacity: 1;
    visibility: visible;
    z-index: 10000;
    transition:
        opacity 250ms ease,
        visibility 250ms ease;
}

#splash-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#splash-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    #splash-screen {
        transition: none;
    }
}
