/* ======================================================
   ESTILOS GAME BOY RETRO - POKÉMON ROJO WEB REPLICA
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: #1a1a24;
    color: #e0e0e0;
    font-family: 'Press Start 2P', monospace, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* CARCASA FISICA GAME BOY DMG-01 */
.gameboy-console {
    background: #c4c4c4;
    border: 4px solid #8d8d8d;
    border-radius: 20px 20px 60px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 2px 5px #ffffff;
    width: 680px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* PANTALLA GAME BOY CON DETALLE DE LÍNEAS DE MARCO */
.screen-housing {
    background: #77787b;
    border-radius: 12px 12px 40px 12px;
    padding: 25px 25px 15px 25px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4);
    position: relative;
}

.screen-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 10px;
    color: #b8b8b8;
    text-transform: uppercase;
}

.battery-led {
    width: 10px;
    height: 10px;
    background-color: #ff3838;
    border-radius: 50%;
    box-shadow: 0 0 6px #ff3838;
    display: inline-block;
    margin-right: 5px;
}

/* CANVAS DE JUEGO (GAME BOY LCD MATRIX MONOCHROME) */
.canvas-wrapper {
    background: #8b956d;
    border: 4px solid #303030;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

#gameCanvas {
    display: block;
    width: 600px;
    height: 540px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* PANEL DE CONTROLADORES GAME BOY */
.controls-panel {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding: 0 20px;
}

/* D-PAD VIRTUAL GRID 3x3 */
.dpad {
    width: 108px;
    height: 108px;
    display: grid;
    grid-template-columns: 36px 36px 36px;
    grid-template-rows: 36px 36px 36px;
}

.dpad-btn {
    background: #333333;
    border: 2px solid #1a1a1a;
    cursor: pointer;
    box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.2);
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    display: block;
}

.dpad-btn:active {
    background: #111111;
}

.dpad-up { border-radius: 6px 6px 0 0; border-bottom: none; }
.dpad-down { border-radius: 0 0 6px 6px; border-top: none; }
.dpad-left { border-radius: 6px 0 0 6px; border-right: none; }
.dpad-right { border-radius: 0 6px 6px 0; border-left: none; }
.dpad-center { background: #222222; border: none; }

/* BOTONES CENTRALES SELECT Y START */
.center-buttons {
    display: flex;
    gap: 12px;
    align-self: flex-end;
    margin-bottom: 8px;
}

.btn-pill {
    background: #555555;
    color: #cccccc;
    border: 2px solid #222222;
    border-radius: 12px;
    padding: 5px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    cursor: pointer;
    transform: rotate(-25deg);
    box-shadow: 0 3px 0 #111111;
}

.btn-pill:active {
    transform: rotate(-25deg) translateY(2px);
    box-shadow: 0 1px 0 #111111;
}

/* BOTONES A / B */
.action-buttons {
    display: flex;
    gap: 18px;
    transform: rotate(-15deg);
}

.btn-round {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #9b104b;
    border: 3px solid #5d062a;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #42021c, inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.btn-round:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #42021c;
}

/* HEADER INFO DISPLAY (SCORE / USER) */
.hud-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #0f380f;
    color: #9bbc0f;
    font-size: 9px;
    margin-top: 10px;
    border: 2px solid #306230;
    border-radius: 4px;
}

/* MODALES DE LOGIN Y STARTER */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.retro-modal {
    background: #8b956d;
    border: 6px solid #0f380f;
    padding: 30px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 0 20px rgba(15, 56, 15, 0.8);
    color: #0f380f;
    text-align: center;
}

.retro-modal h2 {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.retro-input {
    width: 100%;
    padding: 12px;
    background: #9bbc0f;
    border: 3px solid #0f380f;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #0f380f;
    margin-bottom: 20px;
    outline: none;
    text-align: center;
}

.retro-btn {
    width: 100%;
    padding: 14px;
    background: #306230;
    color: #9bbc0f;
    border: 3px solid #0f380f;
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.1s;
}

.retro-btn:hover {
    background: #0f380f;
}

.starter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.starter-card {
    padding: 15px 10px;
    text-align: center;
    line-height: 1.5;
}
