body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000; /* Fondo negro por seguridad */
    font-family: Arial, sans-serif;
    overflow: hidden; /* Evita barras de desplazamiento */
}

/* --- NUEVO: Estilos para el Vídeo de Fondo Fullscreen --- */
#bgVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover; /* Asegura que el vídeo cubra todo sin deformarse */
    z-index: -1; /* Lo pone detrás de todo */
    opacity: 0.6; /* Opcional: baja la opacidad si el vídeo distrae mucho */
}

.game-container {
    text-align: center;
    position: relative;
    z-index: 1; /* Asegura que el juego esté sobre el vídeo */
}

h2 {
    color: #fff; /* Cambiamos el color a blanco para que resalte sobre el vídeo */
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Sombra para legibilidad */
}

#gameWrapper {
    position: relative;
    display: inline-block;
}

#gameCanvas {
	max-width: 100%; /* Hace que no se salga de la pantalla en móviles */
    height: auto;    /* Mantiene las proporciones */
    /* IMPORTANTE: Quitamos el degradado y lo hacemos transparente */
    background: transparent; 
    border: 4px solid #3e2723; 
    border-radius: 10px;
    box-shadow: 0px 10px 20px rgba(0,0,0,0.5);
    display: block;
}



/* --- Estilos del Menú de Game Over --- */
#gameOverScreen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Un poco más oscuro */
    color: white;
    border-radius: 10px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 10;
}

.hidden { display: none !important; }
#gameOverScreen input {
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    margin-right: 5px;
}

#gameOverScreen button {
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background-color: #ff9800;
    color: white;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

#gameOverScreen button:hover {
    background-color: #e68a00;
}

.ranking-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 30px;
    border-radius: 10px;
    margin: 15px 0;
}

#rankingList {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

#rankingList li {
    margin: 5px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 5px;
}
/* --- Estilos de la Pantalla de Inicio --- */
#startScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cargamos tu imagen generada */
    background-image: url('texturas/raton-pescando.png');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Alineamos el botón hacia abajo */
    padding-bottom: 40px;  /* Separación desde abajo */
    box-sizing: border-box;
    z-index: 10; /* Aseguramos que esté por encima de todo */
}

#playBtn {
    padding: 15px 40px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background-color: #4caf50; /* Verde llamativo */
    border: 3px solid #2e7d32;
    border-radius: 50px; /* Botón redondeado */
    cursor: pointer;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    transition: transform 0.2s, background-color 0.2s;
}

#playBtn:hover {
    background-color: #45a049;
    transform: scale(1.05); /* El botón crece un poco al pasar el ratón */
}
/* --- NUEVO: Estilos de Controles Móviles --- */
#mobileControls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-sizing: border-box;
    z-index: 5;
    pointer-events: none; /* Deja que los toques pasen a través del centro vacío */
}

#joystick-bg {
    width: 60px; 
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
    pointer-events: auto; /* Hace que el joystick sea tocable */
    touch-action: none; /* Evita que la pantalla haga scroll al arrastrar */
}

#joystick-knob {
    width: 28; 
    height: 25;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    position: absolute;
    top: 18; /* Centrado (120/2 - 50/2) */
    left: 16;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#actionBtn {
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.8); /* Verde translúcido */
    border: 3px solid rgba(255, 255, 255, 0.8);
    font-size: 32px;
    pointer-events: auto;
    touch-action: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
}

#actionBtn:active {
    background: rgba(76, 175, 80, 1);
    transform: scale(0.95);
}