body {
    background-color: #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    font-family: sans-serif;
    color: #fff;
}

.gameboy {
    background-color: #c0c0c0;
    width: 300px;
    height: 500px;
    border-radius: 10px 10px 40px 10px;
    box-shadow: 
        inset 3px 0 5px rgba(255,255,255,0.3), 
        inset -3px 0 5px rgba(0,0,0,0.1),
        10px 10px 20px rgba(0,0,0,0.5);
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.screen-container {
    background-color: #777;
    border-radius: 10px 10px 30px 10px;
    padding: 15px 25px;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    position: relative;
}

.screen-border {
    position: relative;
}

.power-led {
    width: 8px;
    height: 8px;
    background-color: #500; /* Off state */
    border-radius: 50%;
    position: absolute;
    left: 5px;
    top: 40%;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5);
}

.power-led.on {
    background-color: #f00;
    box-shadow: 0 0 5px #f00;
}

.screen-lens {
    background-color: #8b9726; /* Classic GB green */
    width: 180px; /* Scaled up slightly relative to container */
    height: 160px;
    margin: 0 auto;
    box-shadow: inset 3px 3px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

canvas {
    image-rendering: pixelated;
    width: 100%;
    height: 100%;
}

.brand {
    color: #330066; /* Dark blueish purple */
    font-family: sans-serif;
    font-weight: bold;
    font-style: italic;
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
    padding-left: 10px;
}

/* Controls Area */
.controls {
    flex-grow: 1;
    position: relative;
}

.d-pad {
    position: absolute;
    top: 20px;
    left: 10px;
    width: 80px;
    height: 80px;
}

.d-pad-horizontal, .d-pad-vertical {
    background-color: #333;
    position: absolute;
    border-radius: 3px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.d-pad-horizontal {
    width: 100%;
    height: 26px;
    top: 27px;
}

.d-pad-vertical {
    height: 100%;
    width: 26px;
    left: 27px;
}

.d-pad-center {
    /* Optional slight depression in center */
    position: absolute;
    width: 20px;
    height: 20px;
    top: 30px;
    left: 30px;
    background: radial-gradient(circle, #2a2a2a 0%, #333 60%);
    border-radius: 50%;
}

.action-buttons {
    position: absolute;
    top: 30px;
    right: 10px;
    width: 100px;
    height: 60px;
    display: flex;
    align-items: flex-end;
    transform: rotate(-25deg);
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button {
    width: 34px;
    height: 34px;
    background-color: #a00;
    border-radius: 50%;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.3), inset -1px -1px 2px rgba(0,0,0,0.2);
    margin-bottom: 5px;
    cursor: pointer;
}

.button:active, .button.pressed {
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.3);
    transform: translate(1px, 1px);
}

.button-b-container {
    margin-right: 15px;
}

.label {
    color: #330066;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    text-align: center;
}

.start-select {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.pill-button {
    width: 40px;
    height: 10px;
    background-color: #666;
    border-radius: 5px;
    transform: rotate(-25deg);
    box-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    margin-bottom: 5px;
    cursor: pointer;
}
.pill-button:active, .pill-button.pressed {
    transform: rotate(-25deg) translate(1px, 1px);
    box-shadow: inset 1px 1px 1px rgba(0,0,0,0.3);
}

.select-container, .start-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.speaker {
    position: absolute;
    bottom: 20px;
    right: 20px;
    transform: rotate(-25deg);
}

.slot {
    width: 50px;
    height: 6px;
    background-color: rgba(0,0,0,0.1);
    margin-bottom: 4px;
    border-radius: 3px;
    box-shadow: inset 1px 1px 1px rgba(0,0,0,0.2);
}

.instructions {
    margin-top: 20px;
    text-align: center;
    color: #aaa;
}

