body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin-top: 20px;
    background: #f5f5f5;
    touch-action: none;
}

h1 {
    margin-bottom: 10px;
}

#board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 5px;
    justify-content: center;
    max-width: 310px;
    margin: 0 auto;
    user-select: none;
}

.highlight {
  background-color: yellow;
  transition: background-color 0.3s ease;
}


.cell {
    transition: background-color 0.2s ease;
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s, background 0.3s, border-color 0.3s;
    position: relative;
}

.cell.dragging {
    z-index: 10;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cell.valid-drop {
    background: #e6f0ff;
    border-color: #007bff;
}

.winner {
    background: #ffe066 !important;
    border-color: #ff9800 !important;
}

#moves {
    font-size: 18px;
    margin-top: 15px;
}

#resetBtn {
    padding: 8px 16px;
    font-size: 16px;
    margin: 10px 0;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#resetBtn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

#instructions {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    margin: 20px auto;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#instructions h2 {
    margin-top: 0;
    color: #007bff;
}

#instructions ol {
    padding-left: 20px;
}

#instructions button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.hidden {
    display: none;
}

/* Contenedor centrado para el botón */
#shareButtons {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Botón único de compartir */
#shareButton {
    padding: 10px 20px;
    font-size: 16px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#shareButton:hover {
    background: #20b358;
    transform: scale(1.03);
}

#shareButton:active {
    transform: scale(0.97);
}

  #shareContainer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center; /* CENTRAR botones */
  }
  #shareContainer button, #shareContainer a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background-color: #007bff;
    transition: background-color 0.2s ease;
    user-select: none;
  }
  #shareContainer button:hover, #shareContainer a:hover {
    background-color: #0056b3;
  }

  /* Colores específicos */
  #twitterBtn {
    background-color: #1DA1F2;
  }
  #twitterBtn:hover {
    background-color: #0d8ddb;
  }

  #facebookBtn {
    background-color: #3b5998;
  }
  #facebookBtn:hover {
    background-color: #2d4373;
  }

  #telegramBtn {
    background-color: #0088cc;
  }
  #telegramBtn:hover {
    background-color: #006699;
  }

  #whatsappBtn {
    background-color: #25D366;
    color: white;
  }
  #whatsappBtn:hover {
    background-color: #128c24;
  }

  #mailBtn {
    background-color: #dd4b39;
  }
  #mailBtn:hover {
    background-color: #b03a2a;
  }