body {
    background-color: #8c9094;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: sans-serif;
}

.calculator {
    background-color: #c8c1ad;
    /* Бежевый советский пластик */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.5);
    width: 420px;
    border-bottom: 5px solid #a39c88;
}

.display-container {
    background-color: #0a0a0a;
    padding: 15px 10px;
    border-radius: 5px;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.9);
    margin-bottom: 20px;
}

.display {
    display: flex;
    justify-content: flex-end;
    /* Цифры прижимаются вправо */
    gap: 4px;
    /* Расстояние между лампами */
}

/* Стили стеклянной колбы ИН-14 */
.tube {
    width: 32px;
    height: 55px;
    background-color: rgba(255, 255, 255, 0.03);
    /* Легкий блик стекла */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 2px 2px;
    /* Форма лампы */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.digit {
    font-family: 'Courier New', Courier, monospace;
    font-size: 42px;
    font-weight: normal;
    /* У ламп цифры тонкие, нитьевые */
    color: #ff6600;
    text-shadow: 0 0 5px #ff6600, 0 0 15px #d32f2f, 0 0 20px #ff3300;
}

.comma {
    font-family: 'Courier New', Courier, monospace;
    font-size: 42px;
    font-weight: bold;
    color: #ff6600;
    text-shadow: 0 0 5px #ff6600, 0 0 15px #d32f2f, 0 0 20px #ff3300;
    position: absolute;
    bottom: -8px;
    right: -2px;
    opacity: 0;
    /* По умолчанию запятая выключена */
    transition: opacity 0.1s;
}

/* Класс включения запятой */
.comma.on {
    opacity: 1;
}

#screen {
    font-family: 'Courier New', Courier, monospace;
    /* Имитация ИН-14 */
    font-size: 40px;
    font-weight: bold;
    color: #ff6600;
    /* Оранжевый газ */
    text-shadow: 0 0 5px #ff6600, 0 0 15px #d32f2f, 0 0 20px #ff3300;
    letter-spacing: 5px;
}

.brand {
    color: #938c77;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.3);
}

.control-panel {
    display: flex;
    gap: 20px;
}

/* Сетки кнопок */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-auto-rows: 50px;
    gap: 10px;
}

.ops-pad {
    display: grid;
    grid-template-columns: repeat(2, 50px);
    grid-auto-rows: 50px;
    gap: 10px;
}

.left-controls {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 50px;
}

/* Кнопки */
.btn {
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.3), inset -1px -2px 2px rgba(0, 0, 0, 0.1);
    color: #333;
    transition: transform 0.1s;
    background-color: #e8deb8;
}

.btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.red-btn {
    background-color: #d32f2f;
    color: white;
}

.tall {
    grid-row: span 2;
}

.zero {
    grid-column: span 2;
}

.equals {
    grid-column: span 2;
}

/* Тумблер */
.switch-container {
    text-align: center;
    margin-top: 10px;
}

.switch-label {
    font-size: 12px;
    color: #333;
    margin-bottom: 5px;
    background: white;
    padding: 2px 5px;
    border: 1px solid #999;
}

.switch-knob {
    width: 30px;
    height: 40px;
    background-color: #222;
    border-radius: 5px;
    margin: 0 auto;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    position: relative;
}

.switch-knob::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 13px;
    width: 4px;
    height: 15px;
    background-color: #ccc;
    border-radius: 2px;
}

.left-controls .clear {
    width: 100%;
    height: 50px;
    font-size: 22px;
}

.display-container {
    background-color: #111;
    padding: 15px;
    border-radius: 5px;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    position: relative;
    /* Нужно для позиционирования лампочки */
}

/* Выключенная лампочка ошибки */
.error-indicator {
    position: absolute;
    top: 8px;
    left: 15px;
    width: 12px;
    height: 12px;
    background-color: #330000;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Включенная лампочка ошибки (горит) */
.error-indicator.on {
    background-color: #ff3300;
    box-shadow: 0 0 10px #ff0000, 0 0 20px #ff3300, inset 0 0 2px #fff;
}

/* --- Стили для тумблера питания --- */
.power-switch-container {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.power-switch {
    width: 32px;
    height: 18px;
    background-color: #111;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 4px 0 #000, 0 5px 5px rgba(0, 0, 0, 0.5);
    /* Выключен (нажат вниз) */
    position: relative;
    transition: all 0.1s;
    border: 1px solid #333;
}

.power-switch.on {
    box-shadow: 0 -4px 0 #000, 0 2px 5px rgba(0, 0, 0, 0.5);
    /* Включен (нажат вверх) */
    transform: translateY(2px);
}

.power-switch::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 2px;
    background-color: #fff;
    /* Белая метка на кнопке */
    opacity: 0.5;
}