* {
    box-sizing: border-box;
    font-family: "Press Start 2P", monospace;
}

body {
    margin: 0;
    height: 100vh;
    background: linear-gradient(#7ec0ee 60%, #5a913c 60%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.app {
    background: #c6c6c6;
    border: 4px solid #3b3b3b;
    padding: 20px;
    width: 500px;
    box-shadow: 6px 6px 0 #2b2b2b;
}

h1 {
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
}

input {
    width: 100%;
    padding: 12px;
    font-size: 10px;
    border: 3px solid #3b3b3b;
    background: #e0e0e0;
    outline: none;
    margin-bottom: 12px;
}

.bits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.bit {
    width: 54px;
    height: 64px;
    border: 3px solid #3b3b3b;
    box-shadow: inset -3px -3px 0 rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: place .2s steps(2);
}

.bit.one {
    background: #4CAF50;
}

.bit.zero {
    background: #8B5A2B;
    color: #fff;
}

.bit.active {
    outline: 3px solid #fff200;
    box-shadow: 0 0 10px #fff200;
}

.value {
    font-size: 7px;
    margin-top: 4px;
}

.sum {
    margin-top: 10px;
    font-size: 10px;
    text-align: center;
}

/* info panel */
.info {
    margin-top: 12px;
    background: #9e9e9e;
    border: 3px solid #3b3b3b;
    padding: 8px;
    font-size: 8px;
    line-height: 1.6;
}

@keyframes place {
    from { transform: scale(0.6); }
    to { transform: scale(1); }
}

.break {
    animation: breakBlock .15s steps(2) forwards;
}

@keyframes breakBlock {
    to { transform: scale(0.3); opacity: 0; }
}