:root {
        --bg: #202124;
        --border: #3c4043;
        --text: #e8eaed;
        --accent: #8ab4f8;
        --size-scroll: 6px;
}

body,
html {
        margin: 0;
        height: 100%;
        background: var(--bg);
        color: var(--text);
        font-family: Segoe UI, Arial;
}

.container {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
}

.app {
        width: 90%;
        max-width: 600px;
        height: 90vh;
        border: 1px solid var(--border);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        background: #202124;
        position: relative;
}

.popup-box {
        position: absolute;
        top: 4px;
        left: 4px;
        right: 4px;
        background: #2a3933;
        border: 1px solid #2a3933;
        color: var(--text);
        padding: 4px 15px;
        border-radius: 4px;

        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s ease, visibility 0.5s ease;
        z-index: 1000;
}

.popup-box.visible {
        opacity: 1;
        visibility: visible;
}

.controls {
        display: flex;
        gap: 4px;
        padding: 4px;
}

.btn-top {
        flex: 1;
}

.module-box {
        display: flex;
        flex-direction: column;
        gap: 4px;
        height: 100%;
        max-height: 250px;
}

.horizont-box {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0 6px;
}

/* Редактор */
#edit {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
        padding: 0 0 0 var(--size-scroll);
        overflow-y: scroll;
}

.text-box {
        background: var(--bg);
        color: var(--text);
        border: 1px solid var(--border);
        padding: 8px 15px;
        border-radius: 4px;
        outline: none;
        margin: 0;
        white-space: pre-wrap;
        font-family: inherit;
        font-size: 14px;
        box-sizing: border-box;
}

.text-box:first-child:last-child {
        flex: 1;
}

.text-box:not(:only-child):last-child {
        flex: 1;
        margin-bottom: 0;
}

.input-name,
.input-search {
        background: var(--bg);
        border: 1px solid var(--border);
        color: #78bfe4;
        padding: 8px 15px;
        border-radius: 4px;
        outline: none;
}

.input-name {
        flex: 1;
}

.btn-add {
        width: 32px;
        height: 32px;
        aspect-ratio: 1 / 1;
        font-size: 1.1em;
        line-height: 1em;
}

button {
        padding: 8px;
        border: none;
        background: #303134;
        color: var(--text);
        cursor: pointer;
        border-radius: 4px;
}

button:hover {
        background: #3c4043;
}

.list {
        height: 150px;
        overflow-y: scroll;
        border-bottom: 1px solid var(--border);
        padding: 4px 0 0 6px;
        flex: 1;
}

.item {
        padding: 8px;
        cursor: pointer;
        border-bottom: 1px solid var(--border);
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
}

.item.active {
        background: #303134;
}

.padding-x {
        display: flex;
        padding: 4px;
        flex: 0;
        flex-direction: column;
        gap: 4px;
}

.help-box {
        padding: 4px 10px;
        font-size: 0.8em;
}

button {
        width: 100%;
        padding: 8px;
        border: none;
        background: #303134;
        color: var(--text);
        cursor: pointer;
}

button:hover {
        background: #3c4043;
}

textarea {
        width: 100%;
        height: 150px;
        resize: none;
        background: #202124;
        color: var(--text);
        border: none;
        padding: 8px;
        box-sizing: border-box;
}

.controls {
        display: flex;
        gap: 4px;
}

::-webkit-scrollbar {
        width: var(--size-scroll);
}

::-webkit-scrollbar-thumb {
        background: #6B737E;
        border-radius: 50px;
}

::-webkit-scrollbar-track {
        background: var(--color-dark-gray);
}