/* Game Boy Component Styles */

.gameboy {
    width: 380px;
    height: 640px;
    background: var(--gameboy-body);
    border-radius: 15px 15px 80px 15px;
    box-shadow: 
        inset 2px 2px 4px var(--gameboy-highlight),
        inset -2px -2px 4px var(--gameboy-shadow),
        0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Top Section */
.gameboy-top {
    height: 60px;
    margin-bottom: 10px;
    margin-top: 20px; /* Add space for power switch */
    position: relative;
}

.stripe-decoration {
    position: absolute;
    top: 0;
    left: -20px;
    right: -20px;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--button-purple) 0%,
        var(--button-purple) 30%,
        transparent 30%,
        transparent 70%,
        var(--button-purple) 70%,
        var(--button-purple) 100%
    );
}

.branding {
    text-align: left;
    margin-top: 15px;
    margin-left: 10px;
}

.nintendo-text {
    display: block;
    font-size: 11px;
    color: var(--text-dark);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.trenchboy-text {
    display: block;
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 900;
    letter-spacing: 2px;
    font-style: italic;
    margin-top: -2px;
}

/* Screen Container */
.screen-container {
    background: var(--gameboy-shadow);
    border-radius: 10px;
    padding: 25px 20px 20px 20px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px var(--gameboy-highlight);
}

.screen-border {
    background: #5C5C48;
    border-radius: 8px;
    padding: 15px;
    position: relative;
}

.screen {
    width: 240px;
    height: 216px;
    background: #1a1a1a; /* Dark screen when off */
    border: 2px solid #000;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease;
}

/* Screen when powered on */
.gameboy.powered-on .screen {
    background: var(--screen-green-4);
}

.screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.screen-label {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: var(--text-dark);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Power LED */
.power-led {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.power-led.on {
    background: var(--power-led);
    box-shadow: 0 0 10px var(--power-led);
}

.power-label {
    position: absolute;
    top: 10px;
    left: 28px;
    font-size: 8px;
    color: var(--text-dark);
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

/* D-Pad */
.dpad-container {
    position: relative;
}

.dpad {
    width: 90px;
    height: 90px;
    position: relative;
}

.dpad > div {
    position: absolute;
    background: var(--text-dark);
    box-shadow: 
        inset 1px 1px 2px rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.dpad-up, .dpad-down {
    width: 30px;
    height: 30px;
    left: 30px;
}

.dpad-up {
    top: 0;
    border-radius: 3px 3px 0 0;
}

.dpad-down {
    bottom: 0;
    border-radius: 0 0 3px 3px;
}

.dpad-left, .dpad-right {
    width: 30px;
    height: 30px;
    top: 30px;
}

.dpad-left {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.dpad-right {
    right: 0;
    border-radius: 0 3px 3px 0;
}

.dpad-center {
    width: 30px;
    height: 30px;
    background: var(--text-dark);
    position: absolute;
    top: 30px;
    left: 30px;
}

.dpad > div:active {
    /* Remove the transform effect */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Action Buttons */
.buttons-container {
    position: relative;
}

.button-group {
    display: flex;
    gap: 15px;
    transform: rotate(-25deg);
}

.action-button {
    width: 45px;
    height: 45px;
    background: var(--button-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    box-shadow: 
        inset 2px 2px 3px rgba(255, 255, 255, 0.3),
        inset -2px -2px 3px var(--button-purple-dark),
        0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.1s ease;
}

.action-button:active {
    /* Remove the transform effect */
    box-shadow: 
        inset -1px -1px 2px rgba(255, 255, 255, 0.3),
        inset 1px 1px 2px var(--button-purple-dark),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.option-button {
    width: 60px;
    height: 15px;
    background: var(--gameboy-shadow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    color: var(--text-dark);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 1px 1px var(--gameboy-highlight);
    transform: rotate(-25deg);
    cursor: pointer;
}

.option-button:active {
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.4);
}

/* Speaker Grille */
.speaker-grille {
    position: absolute;
    bottom: 30px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transform: rotate(-30deg);
}

.speaker-line {
    width: 40px;
    height: 3px;
    background: var(--gameboy-shadow);
    border-radius: 1px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3);
}

/* Power Switch */
.power-switch-container {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.power-switch {
    width: 50px;
    height: 25px;
    background: var(--gameboy-shadow);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 1px 2px var(--gameboy-highlight);
}

.switch-slider {
    width: 20px;
    height: 20px;
    background: var(--text-dark);
    border-radius: 10px;
    position: absolute;
    top: 2.5px;
    left: 3px;
    transition: left 0.2s ease;
    box-shadow: 
        inset 1px 1px 2px rgba(255, 255, 255, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.power-switch.on .switch-slider {
    left: 27px;
}

.switch-label {
    font-size: 8px;
    font-weight: bold;
    color: var(--text-dark);
}

.off-label {
    order: -1;
}

.on-label {
    order: 1;
}

/* Menu Styles */
.boot-screen, .menu-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--screen-green-4);
    color: var(--screen-green-2);
    font-family: var(--pixel-font);
    transition: background 0.3s ease, color 0.3s ease;
}

.nintendo-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--screen-green-2);
    text-shadow: 2px 2px 0 var(--screen-green-3);
    margin-bottom: 30px;
}

.boot-instructions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.instruction-line {
    font-size: 10px;
    color: var(--screen-green-1);
    letter-spacing: 1px;
    font-family: var(--pixel-font);
    text-align: center;
}

.menu-title {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--screen-green-1);
    letter-spacing: 2px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}

.game-slot {
    width: 60px;
    height: 60px;
    border: 2px solid var(--screen-green-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--screen-green-4);
}

.game-slot.active {
    border-color: var(--screen-green-1);
    background: var(--screen-green-3);
    box-shadow: 0 0 10px var(--screen-green-2);
}

.game-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.game-icon-text {
    font-size: 18px;
    font-weight: bold;
    font-family: monospace;
    letter-spacing: 2px;
    color: var(--screen-green-1);
}

.game-name {
    font-size: 8px;
    text-align: center;
    color: var(--screen-green-2);
}

.menu-hint {
    position: absolute;
    bottom: 10px;
    font-size: 8px;
    color: var(--screen-green-2);
    text-align: center;
    letter-spacing: 1px;
}

/* Submenu Styles */
.submenu-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--screen-green-4);
    color: var(--screen-green-2);
    font-family: var(--pixel-font);
}

.submenu-title {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--screen-green-1);
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 var(--screen-green-3);
}

.submenu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 140px;
}

.submenu-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border: 2px solid var(--screen-green-3);
    background: var(--screen-green-4);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    letter-spacing: 1px;
}

.submenu-option.active {
    border-color: var(--screen-green-1);
    background: var(--screen-green-3);
    box-shadow: 0 0 10px var(--screen-green-2);
}

.option-arrow {
    width: 10px;
    color: var(--screen-green-1);
    font-size: 10px;
}

.option-text {
    color: var(--screen-green-2);
}