* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
}

.container {
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

input[type="file"] {
    margin-bottom: 20px;
}

#puzzle-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra las piezas */
    width: 300px;
    height: 300px; /* Ajustado para un rompecabezas de 3x3 */
    margin: 20px auto;
    position: relative;
}

#puzzle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 columnas */
    grid-template-rows: repeat(3, 1fr);     /* 3 filas */
    gap: 5px;
}

.puzzle-piece {
    background-size: 300px 300px; /* Ajusta para un 3x3 */
    border: 1px solid #333;
    cursor: pointer;
    width: 100px;
    height: 100px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
}

.puzzle-piece:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

#timer {
    margin-top: 10px; /* Colocado encima del tablero */
    font-size: 1.2em;
    color: #555;
}

#start-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Espacio superior */
}

#start-btn:hover {
    background-color: #45a049;
}

@media (max-width: 600px) {
    #puzzle-container {
        width: 90%;
        height: auto;
    }

    .puzzle-piece {
        width: 80px;
        height: 80px;
    }
}
