#home {
    position: fixed;
    top: 20px;       
    right: 20px; 
    cursor: pointer;
}

body{
    background-color: #6cc26f;
}


.grid {
    display: grid;                      
    grid-template-columns: repeat(3, 150px);
    grid-template-rows: repeat(3, 150px);   
    gap: 15px;                          
    justify-content: center;            
    align-items: center;                 
    margin: 0 auto;                      
    width: 495px;                     
    height: 495px;                     
}


.square {
    width: 150px;                       
    height: 150px;                                
    border-radius: 15px; 
    background-color: rgba(255, 255, 255, 0.8); 
    border: 2px solid #8B4513;         
    display: flex;                       
    justify-content: center;             
    align-items: center;                
    cursor: pointer;                   
    transition: background-color 0.3s ease, transform 0.2s ease; 
}


.square:hover {
    background-color: #d1d1d1;          
    transform: scale(1.05);            
}

.square.mole {
    background-color: #3b3636;         
    transition: background-color 0.3s ease;
}

.mole {
    background-image: url("../img/mole-2d-cartoon-vector-illustration-on-white-background-hi-free-photo.jpg");
    background-size: cover;
}

#game {

    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#menu {
    background: linear-gradient(to bottom right, #388e3c, #a5d6a7);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    color: white;
    font-family: 'Segoe UI', sans-serif;
}

#menu h2 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.botones-dificultat {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn.facil {
    background-color: #66bb6a;
}
.btn.mitja {
    background-color: #fbc02d;
    color: #333;
}
.btn.dificil {
    background-color: #e53935;
}

.btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

#botostart {
    background-color: #1e88e5;
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: transform 0.2s, background-color 0.3s;
    display: block;
    margin: 0 auto;  
    text-align: center;
}

#botostart:hover {
    transform: scale(1.05);
    background-color: #1565c0;
}

.btn:active {
    filter: brightness(0.9);
    transform: scale(0.98); 
}

#puntuacio {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}


#puntuacio h3 {
    background-color: #388e3c;
    border: 4px solid #1b5e20;
    border-radius: 20px;
    padding: 15px 25px; 
    font-size: 24px;
    color: white;
    font-weight: bold;
    margin: 0;
}


#puntuacio span {
    font-size: 24px;
    font-weight: normal;
}


#titol {
    font-family: 'Pacifico', cursive;
    font-size: 54px;
    text-align: center;
    margin-top: 40px;
    color: #f9a825; 
    -webkit-text-stroke: 2px #2e7d32;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}