body {
    background-color: #f7f5f0;
    color: #4a3e3d;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    overflow-y: auto;
    box-sizing: border-box;

    background-image:
        linear-gradient(to right, rgba(140,122,107,0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(140,122,107,0.2) 1px, transparent 1px);

    background-size: 40px 40px;
    background-attachment: fixed
}

.terminal {
    background-color: #443b33;
    border: 1px solid #b5a895;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    color: #8c7a6b;
    text-align: center;
}
.terminal::before {
    content: "● ● ●";
    color: #e3dac5;
    word-spacing: 4px;
    display: block;
    margin-bottom: 20px;
    font-size: 12px;
    letter-spacing: 2px;
    position: absolute;
    line-height: 1px;
}

.menu-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
}

.card {
    background-color: #f2ebd9;
    border: 2px solid #b5a895;
    border-radius: 12px;
    padding: 15px 10px;
    margin: 5px;
    flex: 1%;
    max-width: 140px;
    min-width: 110px;
    cursor: pointer;
    font-family: monospace;
    color: #4a3f35;

    box-shadow:
        inset 0 4px 0 rgba(255,255,255,0.6),
        0 8px #b5a895,
        0 12px 10px rgba(0, 0, 0, 0.15);

    transition: all 0.1 ease;
    position: relative;
    top: 0;
}

.card::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    bottom: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.4);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.07));
    pointer-events: none;
    z-index: 1;
}

.card h3, .card p {
    position: relative;
    z-index: 2;
    margin: 5px 0;
}
.card h3 {
    color: #8c7a6b;
    font-size: 1.2em;
}
.card p {
    font-size: 0.8em;
    color: #8c7a6b;
}

.card.highlighted {
    top: 6px;
    background-color: #e3dac5;
    box-shadow:
        inset 0 2px 3px rgba(0, 0, 0, 0.1),
        0 2px #b5a895,
        0 4px 4px rgba(0, 0, 0, 0.1);
}



.instructions {
    color: #8c7a6b;
    margin-top: 20px;
    font-size: 0.9em;
    font-weight: bold;
    line-height: 1.5;
}

.game-screen {
    display: none;
    font-size: 1.5em;
    margin-top: 20px;
}

#key-binder-overlay {
    position: fixed;
    top: 0;
    left: 0; 
    width: 100%;
    height: 100%;
    background-color: rgba(247, 245, 240, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#binder-box {
    border: 2px dashed #4a3e3d;
    padding: 40px;
    background-color: #fffdf9;
    text-align: center;
    box-shadow: 0 10px 40px rgba(74, 62, 61, 0.15);
}

#key-display {
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: bold; 
    border: 1px solid #8c7a6b;
    padding: 15px;
    background-color: #f7f5f0;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0.4; }
}

#controller-input {
    margin-top: 20px;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    border: 2px solid #8c7a6b;
    background-color: #fffdf9;
    color: #4a3e3d;
    width: 80%;
    display: none;
}

.keycap {
    color: #8c7a6b;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    background-color: #f2ebd9;


    box-shadow:
        inset 0 4px 0 rgba(255,255,255,0,0.6),
        0 6px #b5a895,
        0 8px 6px rgba(0,0,0,0.15);
    position: relative;
    text-transform: uppercase;

}

.keycap::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 8px;
    left: 5px;
    right: 5px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.4);
    background: linear-gradient(to bottom, rgba(0,0,0,0.01), rgba(0,0,0,0.05));
    pointer-events: none;
}

.keycap.pressed {
    box-shadow: 
        inset 0 2px 0 rgba(255,255,255,0.6),
        0 2px #b5a895 !important;
    transform: translateY(4px);
}

.title-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
    width: 100%;
}