:root {
    --primary-color: #282c34;
    --secondary-color: #21252b;
    --text-color: #abb2bf;
    --accent-color: #e2e8f0;
    --highlight-color: #e5c07b;
    --error-color: #e06c75;
    --success-color: #98c379;
    --font-family: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    overflow: hidden;
}

/* Шапка */
.nav-container {
    background-color: var(--secondary-color);
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    height: 50px;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: white; /* Белый цвет шрифта */
    font-family: "Times New Roman", sans-serif;
    font-weight: 600;
    font-size: 20px;
    padding: 0 10px;
    transition: color 0.3s;
}

nav a:hover {
    background-color: yellow;
    color: black;
}

.nav-right {
    margin-left: auto;
    display: flex;
    gap: 1.5rem;
}

/* Обёртка для контента */
.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 0.5rem;
}

/* Основной контент */
main {
    display: flex;
    justify-content: center;
    align-items: stretch;
    position: relative;
    width: 100%;
    gap: 0;
    margin-bottom: 1rem;
}

.left-panel, .center-panel, .right-panel {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--accent-color);
    height: 550px;
}

.left-panel {
    width: calc(50% - 240px);
    min-width: 300px;
    margin-right: 0;
}

.center-panel {
    width: 480px;
    margin: 0;
}

.right-panel {
    width: 480px;
    margin-left: 0;
}

.left-panel .content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--highlight-color);
    margin-bottom: 0;
}

/* Поля ввода в center-panel */
.input-fields {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    height: 60px;
    margin-bottom: 1rem;
}

/* Поля ввода в right-panel */
.control-fields {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    height: 60px;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.input-group label {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.input-group input, .input-group select {
    padding: 0.6rem;
    border: 2px solid #61afef;
    border-radius: 8px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 80px;
    text-align: center;
    outline: none;
    background-color: #2c323c;
    color: var(--accent-color);
    transition: border-color 0.3s;
}

.input-group input:focus, .input-group select:focus {
    border-color: #98c379;
}

.manual-input {
    display: flex;
    align-items: center;
    flex: 1;
}

#manual-input {
    width: 100%;
    max-width: 200px;
    margin-right: 0;
    font-family: 'Consolas', 'Courier New', monospace;
    text-transform: uppercase;
}

#language-select {
    width: 100%;
    max-width: 200px;
    font-family: 'Consolas', 'Courier New', monospace;
    flex: 1;
    font-size: 1.3rem; /* Увеличено с 1.1rem до 1.3rem */
}

#errors {
    color: var(--error-color);
}

.code-input {
    font-family: 'Consolas', 'Courier New', monospace;
}

/* Текстовая область */
.editable-textarea {
    width: 100%;
    height: calc(100% - 92px);
    padding: 1.2rem;
    border: 2px solid #61afef;
    border-radius: 8px;
    font-size: 1.35rem;
    text-transform: uppercase;
    overflow-y: auto;
    background-color: #2c323c;
    color: var(--accent-color);
    outline: none;
    max-width: 100%;
    flex: 1;
}

#left-textarea, #right-textarea {
    font-family: 'Consolas', 'Courier New', monospace;
}

.editable-textarea:empty::before {
    content: attr(data-placeholder);
    color: #5c6370;
    font-style: italic;
}

.missing-char {
    color: #61afef;
    font-weight: bold;
}

.error-char {
    color: var(--error-color);
    font-weight: bold;
}

/* Кнопки */
.buttons {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0;
    flex-wrap: wrap;
    width: calc(480px + 480px);
    margin-left: calc(50% - 240px);
}

.save-new-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-left: 8.25rem;
}

.btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    background-color: var(--success-color);
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #7cb305;
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    background-color: #5c6370;
    cursor: not-allowed;
}

/* Футер */
.footer-container {
    background-color: var(--secondary-color);
    padding: 0.5rem;
    text-align: center;
    color: var(--text-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    height: 40px;
}

footer p {
    font-size: 18px;
    font-weight: 600;
}

/* Адаптивность */
/* ... existing code ... */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 0.5rem;
    }
}
