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

body {
    font-family: 'Fredoka', Arial, sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#home {
    position: fixed;
    top: 25px;
    left: 25px;
    height: 75px;
    width: 75px;
    border-radius: 100%;
    border: 3px solid #3A3A3A;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    opacity: 0.5;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#home:hover {
    transition: 0.3s ease;
    transform: scale(1.05);
    opacity: 1;
}
#home svg {
    width: 28px;
    height: 28px;
}

.contenedor-juego {
    background: white;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    width: 100%;
    position: relative;
}

.boton-atras {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ff6b6b;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.boton-atras:hover {
    background-color: #ee5a5a;
}

h1 {
    color: #ff6b6b;
    font-size: 2em;
    margin-bottom: 20px;
    margin-top: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.mensaje {
    font-size: 2.5em;
    color: #4ecdc4;
    margin-bottom: 20px;
    margin-top: 20px;
    font-weight: bold;
    min-height: 50px;
    user-select: none;
}

.seccion-superior {
    background: #ffeaa7;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#canvasObjetivo {
    border: 4px dashed #fdcb6e;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
    user-select: none;
}

#canvasObjetivo:hover {
    transform: scale(1.05);
}

.seccion-inferior {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    width: 100%;
}

.seccion-inferior canvas {
    border: 3px solid #dfe6e9;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    user-select: none;
    -webkit-user-select: none;
}

.seccion-inferior canvas:hover {
    transform: scale(1.1);
    border-color: #74b9ff;
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.4);
}

.seccion-inferior canvas:active {
    transform: scale(0.95);
}

.boton-siguiente {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3em;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Fredoka', Arial, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    user-select: none;
    -webkit-user-select: none;
}

.boton-siguiente:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
}

.boton-siguiente:active {
    transform: translateY(0);
}

/* Animaciones */
@keyframes celebrar {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.celebrar {
    animation: celebrar 0.5s ease-in-out;
}

@keyframes celebrarLoop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.celebrar-loop {
    animation: celebrarLoop 0.8s ease-in-out infinite;
    color: #26de81 !important;
}

@keyframes temblar {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.temblar {
    animation: temblar 0.3s ease-in-out;
}

@media (max-width: 500px) {
    .seccion-inferior canvas {
        width: 70px;
        height: 70px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .mensaje {
        font-size: 1.8em;
    }
}
