/* Retro Monochromatic Theme */
body {
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    user-select: none;
}

/* Gameboy Chassis */
.gameboy-body {
    width: 360px;
    height: 600px;
    background-color: #9b9b9b;
    border-radius: 10px 10px 50px 10px;
    box-shadow: 10px 10px 0px #555;
    padding: 25px;
    box-sizing: border-box;
    position: relative;
}

/* Screen Bezel Frame */
.screen-bezel {
    background-color: #777b7e;
    width: 100%;
    height: 280px;
    border-radius: 10px 10px 10px 10px;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.battery-led {
    width: 8px;
    height: 8px;
    background-color: #ff0000;
    border-radius: 50%;
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 4px #ff0000;
}

/* LCD Screen Play Area */
#game-screen {
    width: 100%;
    height: 100%;
    background-color: #9bbc0f; /* Matrix Green-Yellow Tint */
    border: 4px solid #0f380f;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Top Viewport split */
#map-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    color: #0f380f;
}

#location-name {
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-bottom: 2px solid #0f380f;
}

#visual-area {
    font-size: 3rem;
    text-align: center;
    margin-top: 5px;
}

/* Classic Gen 1 Border Box (Double line look) */
#dialogue-box {
    height: 85px;
    background-color: #9bbc0f;
    border: 4px double #0f380f;
    margin: 4px;
    padding: 6px;
    box-sizing: border-box;
    position: relative;
}

#message-text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #0f380f;
    text-transform: uppercase; /* Gen 1 was historically capitalized */
}

#blink-arrow {
    position: absolute;
    right: 5px;
    bottom: 2px;
    color: #0f380f;
    font-size: 0.8rem;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Hardware Inputs: D-PAD */
.d-pad {
    position: relative;
    width: 90px;
    height: 90px;
    margin-top: 40px;
    margin-left: 10px;
    float: left;
}

.d-btn {
    position: absolute;
    background-color: #222;
    border: none;
    color: #555;
    font-weight: bold;
    cursor: pointer;
}

.up { width: 30px; height: 35px; top: 0; left: 30px; border-radius: 3px 3px 0 0; }
.down { width: 30px; height: 35px; bottom: 0; left: 30px; border-radius: 0 0 3px 3px; }
.d-center { width: 30px; height: 30px; top: 30px; left: 30px; background-color: #222; position: absolute; }

/* Hardware Inputs: A/B Buttons */
.action-buttons {
    float: right;
    margin-top: 55px;
    margin-right: 10px;
    transform: rotate(-25deg);
}

.btn-action {
    width: 45px;
    height: 45px;
    background-color: #a91942;
    border: 3px solid #222;
    border-radius: 50%;
    color: #222;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    margin: 5px;
    box-shadow: 2px 2px 0px #555;
}
.btn-action:active { box-shadow: none; transform: translate(2px, 2px); }

/* System Utility Bars */
.system-buttons {
    clear: both;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 40px;
}

.sys-btn {
    width: 60px;
    height: 12px;
    background-color: #777;
    border-radius: 10px;
    transform: rotate(-25deg);
    font-size: 0.65rem;
    color: #222;
    text-align: center;
    line-height: 35px;
}