html, body {
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: #282c34; /* Тёмно-синий, как в IDE */
    color: #abb2bf; /* Светло-серый текст */
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.nav-container {
    width: 100%;
    padding: 10px 20px;
    background-color: #21252b; /* Почти чёрный для навигации */
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: white; /* Белый цвет шрифта */
    font-family: "Times New Roman", sans-serif;
    margin-right: 30px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    padding: 5px 10px;
    transition: background-color 0.3s ease; /* Плавное изменение фона */
}

nav a:hover {
    background-color: yellow; /* Жёлтый фон при наведении */
    color: black; /* Чёрный текст при наведении */
}


.nav-right {
    display: flex;
    margin-left: auto;
}

/* Левый контейнер: Справочник */
.left-container {
    position: fixed;
    top: 60px;
    left: 0;
    width: calc(50% - 300px - 20px);
    padding: 20px;
    max-height: calc(100vh - 60px);
    background-color: #21252b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px; /* Чуть меньше округлости для строгости */
    overflow-y: auto;
}

.left-container h2 {
    color: #e5c07b; /* Оранжевый для заголовков */
    margin-bottom: 15px;
    font-weight: 600;
}

.left-container p {
    font-size: 16px;
    color: #abb2bf;
    margin-bottom: 10px;
}

.left-container ul {
    list-style-type: none;
    padding: 0;
}

.left-container ul li {
    margin-bottom: 10px;
    font-size: 16px;
    color: #abb2bf;
}

/* Центральный контейнер: Программа */
.center-container {
    margin: 0 auto;
    padding: 0 20px 0 20px;
    max-width: 600px;
    max-height: calc(100vh - 60px - 40px);
    display: flex;
    align-items: center;
}

.morse-box {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #2c323c; /* Тёмно-серый для блока */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    gap: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 100%;
}

.morse-box h1 {
    font-size: 28px;
    margin-bottom: 12px;
    color: #c678dd; /* Фиолетовый для заголовка */
}

input {
    width: 120px;
    padding: 8px;
    color: #abb2bf;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    border: 2px solid #61afef; /* Голубой бордер */
    border-radius: 8px;
    background-color: #21252b;
    transition: border-color 0.3s ease;
}

input:focus {
    border-color: #98c379; /* Зелёный при фокусе */
    outline: none;
}

#morseInput {
    width: 80px;
    font-family: 'Consolas', 'Courier New', monospace;
}

#symbolsInput {
    width: 240px;
    font-family: 'Consolas', 'Courier New', monospace;
}

button {
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    background-color: #98c379; /* Зелёный для кнопок */
    color: #282c34; /* Тёмный текст на кнопках */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #7cb305; /* Темнее при наведении */
    transform: translateY(-2px);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(152, 195, 121, 0.4);
}

.line {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
}

.line input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #e5c07b; /* Оранжевый для чекбоксов */
}

.line label span {
    cursor: default;
    font-size: 16px;
    color: #abb2bf;
}

.no-cursor {
    cursor: default;
}

input[type="range"] {
    cursor: pointer;
    -webkit-appearance: none;
    width: 240px;
    height: 8px;
    background: #3e4451; /* Тёмный трек */
    outline: none;
    border-radius: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #c678dd; /* Фиолетовый бегунок */
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.history {
    width: 300px; /* Фиксированная ширина */
    height: 70px;
    border: 2px solid #61afef;
    padding: 8px;
    color: #abb2bf;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Consolas', 'Courier New', monospace;
    overflow-y: auto;
    background-color: #21252b;
    border-radius: 8px;
    position: relative;
}

.history[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #5c6370; /* Серый для плейсхолдера */
    position: absolute;
    top: 8px;
    left: 8px;
    pointer-events: none;
    font-size: 16px;
}

.incorrect {
    color: red;
}

/* Правый контейнер: Руководство */
.right-container {
    position: fixed;
    top: 60px;
    right: 0;
    width: calc(50% - 300px - 20px);
    padding: 20px;
    max-height: calc(100vh - 60px);
    background-color: #21252b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow-y: auto;
}

.right-container h2 {
    color: #e5c07b;
    margin-bottom: 15px;
    font-weight: 600;
}

.right-container p {
    font-size: 16px;
    color: #abb2bf;
    margin-bottom: 10px;
}

/* Контейнер для подвала */
.footer-container {
    width: 100%;
    height: 40px;
    background-color: #21252b;
    position: fixed;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

footer {
    color: #abb2bf;
    font-size: 18px;
    font-weight: 600;
    padding: 10px;
    text-align: center;
}

@media (max-width: 768px) {
    .left-container, .right-container {
        position: static;
        width: 100%;
        height: auto;
        padding: 10px;
        margin-top: 0;
    }

    .center-container {
        padding: 10px;
        margin-top: 20px;
    }
}