* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body {
    background-color: #111;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    padding: 10px;
    overflow: hidden;
}

/* BOTÓN VOLVER FLOTANTE SUPERIOR */
.floating-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #c43b26 0%, #7d1f11 50%, #c43b26 100%);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    border-radius: 6px;
    border: 2px solid #4a1008;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}
@media (max-width: 768px) {
    .floating-btn {
        padding: 6px 12px;
        font-size: 10px;
        top: 5px;
        right: 5px;
    }
}
.floating-btn:active {
    transform: scale(0.96);
}

/* CONTENEDOR MULTIPLATAFORMA */
.console-wrapper {
    width: 100%;
    max-width: 820px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(min(calc(95vw / 820), calc(95vh / 490)));
    transform-origin: center center;
}

/* CARCASA PRINCIPAL DE LA CONSOLA */
.game-and-watch {
    background: linear-gradient(180deg, #f7f7f5 0%, #e1e1dc 100%);
    width: 820px; 
    height: 490px;
    border-radius: 20px;
    border: 6px solid #d4af37;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 25px;
    flex-shrink: 0;
}

.game-title-top {
    position: absolute;
    top: 22px;
    font-weight: 900;
    font-size: 34px;
    color: #222;
    letter-spacing: 3px;
}

/* RECUADRO LOGO SUPERIOR DERECHO */
.gw-logo-box {
    position: absolute;
    top: 26px;
    right: 45px;
    border: 2px solid #333;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #222;
    letter-spacing: 1px;
}

/* BISEL DE LA PANTALLA METÁLICA */
.screen-bezel {
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 50%, #999999 100%);
    padding: 15px 15px; 
    border-radius: 8px;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.4);
    position: absolute;
    top: 85px;
}

/* INTERIOR DE LA PANTALLA LCD */
.screen {
    background-color: #b0b9a7;
    width: 560px; 
    height: 250px;
    border: 7px solid #111;
    position: relative;
    box-shadow: inset 0 6px 14px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* ESTILOS DE LA CAPA EXCLUSIVA DEL RELOJ DIGITAL */
.clock-layout {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #b0b9a7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.clock-digits {
    font-family: monospace;
    font-size: 80px;
    font-weight: bold;
    color: #111;
    letter-spacing: 2px;
    filter: grayscale(1) contrast(140%) brightness(0.9);
}

.clock-subdata {
    display: flex;
    border-top: 3px solid rgba(17, 17, 17, 0.8);
    width: 80%;
    margin-top: 5px;
}

.clock-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
}

.clock-cell:first-child {
    border-right: 3px solid rgba(17, 17, 17, 0.8);
}

.cell-label {
    font-size: 9px;
    font-weight: bold;
    color: rgba(17, 17, 17, 0.6);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.cell-value {
    font-family: monospace;
    font-size: 26px;
    font-weight: bold;
    color: #111;
    filter: grayscale(1) contrast(140%);
}

.hidden-clock {
    display: none !important;
}

/* ESCENOGRAFÍA DE FONDO RETRO */
.kitchen-background {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
.left-shelf {
    position: absolute;
    left: 0; top: 90px; width: 65px; height: 10px;
    background-color: #b85a38; border-bottom: 3px solid #6e331c;
}

.right-stove-container {
    position: absolute;
    right: 0;
    bottom: 35px;
    width: 70px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}
.stove-roof {
    width: 60px;
    height: 6px;
    background-color: #555;
    border-radius: 2px;
    margin-bottom: 5px;
}
.kettle {
    font-size: 24px;
    line-height: 1;
    margin-bottom: -2px;
    filter: sepia(1) saturate(10) hue-rotate(-45deg) drop-shadow(1px 1px 0px rgba(0,0,0,0.3));
}
.right-stove {
    width: 100%;
    height: 55px;
    background: repeating-linear-gradient(0deg, #b85a38, #b85a38 10px, #82381e 10px, #82381e 13px);
    border-left: 2px solid #6e331c;
}

.kitchen-floor {
    position: absolute;
    bottom: 0; width: 100%; height: 35px;
    border-top: 3px solid #85371b;
    background: repeating-linear-gradient(90deg, transparent, transparent 45px, rgba(133,55,27,0.2) 45px, rgba(133,55,27,0.2) 47px);
}

/* SCORE / MARCADOR */
.score-display {
    position: absolute; top: 14px; left: 45px;
    font-family: monospace; font-weight: bold; font-size: 36px;
    color: rgba(15, 15, 15, 0.9); letter-spacing: 2px;
    z-index: 5;
}

/* PANEL MISS */
.miss-container {
    position: absolute; top: 14px; right: 35px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
    z-index: 5;
}
.miss-txt { font-size: 15px; font-weight: 900; color: #111; font-family: sans-serif; position: relative !important; }
.miss-mice { display: flex; gap: 5px; }
.mouse-life { font-size: 20px; position: relative !important; filter: grayscale(1) contrast(150%); }

/* SEGMENTOS LCD GENERALES */
.lcd-element { 
    position: absolute; 
    z-index: 10; 
    color: #111; 
    filter: grayscale(1) contrast(140%) brightness(0.9); 
}

.hidden { 
    display: none !important; 
}

/* POSICIONAMIENTO DE LOS 4 CHEFS */
.chef { bottom: 32px; display: flex; align-items: center; }
#chef-0 { left: 45px; }
#chef-1 { left: 175px; }
#chef-2 { left: 285px; }
#chef-3 { left: 375px; }

.chef-sprite { font-size: 46px; }
.pan-sprite { font-size: 32px; margin-top: 14px; }
.pan-right { margin-left: -5px; }
.pan-left { margin-right: -5px; }

/* CONFIGURACIÓN DE LAS COLUMNAS DE COMIDA */
.food { 
    font-size: 30px; 
    width: 36px; 
    height: 36px; 
    text-align: center; 
    filter: grayscale(1) contrast(140%);
    /* Transición suave para que la comida parezca que se desliza cuando el ratón la arrastra */
    transition: transform 0.3s steps(3, end); 
}

#food-0-0 { left: 108px; bottom: 70px; }
#food-0-1 { left: 110px; bottom: 120px; }
#food-0-2 { left: 118px; bottom: 165px; }
#food-0-3 { left: 135px; bottom: 195px; }

#food-1-0 { left: 215px; bottom: 70px; }
#food-1-1 { left: 210px; bottom: 120px; }
#food-1-2 { left: 198px; bottom: 165px; }
#food-1-3 { left: 180px; bottom: 195px; }

#food-2-0 { left: 325px; bottom: 70px; }
#food-2-1 { left: 330px; bottom: 120px; }
#food-2-2 { left: 340px; bottom: 165px; }
#food-2-3 { left: 360px; bottom: 195px; }

#food-3-0 { left: 405px; bottom: 70px; }
#food-3-1 { left: 422px; bottom: 120px; }
#food-3-2 { left: 442px; bottom: 165px; }
#food-3-3 { left: 468px; bottom: 195px; }

/* ENEMIGOS Y EFECTOS */
.cat { left: 18px; top: 48px; font-size: 40px; position: absolute; z-index: 4; opacity: 0.15; filter: grayscale(1) brightness(0.7) contrast(150%); }
.cat.active { opacity: 1 !important; filter: grayscale(1) contrast(250%) brightness(0.3); }

.fork-attack { position: absolute; left: 58px; top: 55px; font-size: 32px; z-index: 10; opacity: 0; filter: grayscale(1) brightness(0.2) contrast(300%); }
.fork-attack.active { opacity: 1 !important; }

.mouse-floor { left: 20px; bottom: 35px; font-size: 32px; position: absolute; z-index: 4; opacity: 0.15; filter: grayscale(1) brightness(0.7) contrast(150%); }
.mouse-floor.active { opacity: 1 !important; filter: grayscale(1) contrast(250%) brightness(0.3); }
.mouse-floor.hidden-lcd { opacity: 0.15 !important; filter: grayscale(1) brightness(0.7) contrast(150%); }

.mouse-center { position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%); font-size: 36px; z-index: 10; opacity: 0; filter: grayscale(1) brightness(0.2) contrast(300%); }
.mouse-center.active { opacity: 1 !important; }

/* GAME OVER TEXT */
.game-over-text {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 46px;
    font-weight: 900;
    color: #111;
    font-family: 'Impact', 'Courier New', Courier, monospace;
    letter-spacing: 5px;
    z-index: 99;
    text-align: center;
    white-space: nowrap;
    filter: grayscale(1) contrast(250%) brightness(0.2);
}

/* CONTROLES FÍSICOS */
.controls-layout { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 45px; }
.side-control { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.btn-label { font-size: 13px; font-weight: bold; color: #333; letter-spacing: 1px; }

.game-btn {
    width: 76px; height: 76px; border-radius: 50%; cursor: pointer;
    background: radial-gradient(circle, #e62535 0%, #a8131f 70%, #61040b 100%); border: 5px solid #2b0204;
    box-shadow: 0 8px 12px rgba(0,0,0,0.4), inset 0 -4px 5px rgba(0,0,0,0.4);
    -webkit-tap-highlight-color: transparent;
}
.game-btn:active { transform: translateY(2px); box-shadow: 0 3px 5px rgba(0,0,0,0.4); }

.center-control { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-bottom: 5px; }
.bottom-branding { font-size: 13px; font-weight: bold; color: #445; letter-spacing: 2px; }
.mode-buttons { display: flex; gap: 24px; }
.mode-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.mode-item span { font-size: 10px; font-weight: bold; color: #222; }

.small-btn { 
    width: 36px; height: 16px; 
    background: linear-gradient(180deg, #999 0%, #444 100%); 
    border: 1px solid #111; border-radius: 6px; cursor: pointer; 
    -webkit-tap-highlight-color: transparent;
}

/*======================================================
RESPONSIVE
======================================================*/

/* Evita scroll horizontal */

html,
body{

    width:100%;
    height:100%;

    overflow-x:hidden;

}

/* Imágenes */

img{

    max-width:100%;
    height:auto;

}

/*==========================================
LAPTOP
==========================================*/

@media (max-width:1200px){

.console-wrapper{

    transform:scale(.90);

}

}

/*==========================================
TABLET
==========================================*/

@media (max-width:992px){

.console-wrapper{

    transform:scale(.75);

}

.game-title-top{

    font-size:28px;

}

}

/*==========================================
CELULAR VERTICAL
==========================================*/

@media (max-width:768px) and (orientation:portrait){

body{

    flex-direction:column;

    background:#111;

}

/* Mensaje para girar */

body::before{

    content:"📱 Gira tu teléfono para una mejor experiencia";

    position:fixed;

    top:50%;

    left:50%;

    transform:translate(-50%,-50%);

    color:white;

    font-size:22px;

    text-align:center;

    z-index:99999;

    width:90%;

    font-weight:bold;

}

.console-wrapper{

    display:none;

}

}

/*==========================================
CELULAR HORIZONTAL
==========================================*/

@media (max-width:950px) and (orientation:landscape){

body::before{

    display:none;

}

.console-wrapper{

    display:flex;

    transform:scale(.62);

}

.floating-btn{

    top:5px;

    right:5px;

}

}

/*==========================================
CELULARES MUY PEQUEÑOS
==========================================*/

@media (max-width:480px) and (orientation:landscape){

.console-wrapper{

    transform:scale(.52);

}

}

/*==========================================
MONITORES 2K Y 4K
==========================================*/

@media (min-width:1800px){

.console-wrapper{

    transform:scale(1.2);

}

}