/* =========================================
   STYLES POUR INDEX.HTML (PAGE D'ACCUEIL)
   =========================================== */

/* Conteneur principal de la page d'accueil */
.home-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 10px;
  position: relative;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Titre GOLFINO */
.game-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 32px;
  color: var(--text-white);
  text-shadow: 
    2px 2px 0px var(--text-shadow),
    0 0 10px var(--primary-green),
    0 0 20px var(--secondary-green);
  margin-bottom: 30px;
  animation: titlePulse 2s ease-in-out infinite;
  text-align: center;
  letter-spacing: 4px;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Conteneur des boutons du menu */
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

/* Boutons du menu */
.menu-button {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  padding: 12px 32px;
  border: 3px solid var(--border-dark);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--primary-green), var(--secondary-green));
  color: var(--text-white);
  text-shadow: 2px 2px 0px var(--text-shadow);
  cursor: url('../images/cursors/click.png') 16 16, crosshair;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  min-width: 200px;
  box-shadow: 
    0 4px 0 var(--border-dark),
    0 6px 12px rgba(0, 0, 0, 0.3);
}

.menu-button:hover {
  background: linear-gradient(145deg, var(--button-hover), var(--primary-green));
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 6px 0 var(--border-dark),
    0 8px 16px rgba(0, 0, 0, 0.4);
}

.menu-button:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 
    0 2px 0 var(--border-dark),
    0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Bouton Play spécial */
.play-button {
  background: linear-gradient(145deg, #28a745, #1e7e34);
  animation: playButtonPulse 2s ease-in-out infinite;
}

.play-button:hover {
  background: linear-gradient(145deg, #34ce57, #28a745);
}

@keyframes playButtonPulse {
  0%, 100% { box-shadow: 0 4px 0 var(--border-dark), 0 6px 12px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 4px 0 var(--border-dark), 0 6px 12px rgba(40, 167, 69, 0.5); }
}

/* Bouton Multijoueur désactivé */
.multiplayer-button {
  background: linear-gradient(145deg, #6c757d, #495057);
  cursor: url('../images/cursors/no.png'), not-allowed;
  opacity: 0.7;
}

.multiplayer-button:hover {
  transform: none;
  box-shadow: 0 4px 0 var(--border-dark), 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Bouton Connexion/Profil */
.connection-button {
  background: linear-gradient(145deg, #17a2b8, #138496);
  font-size: 14px;
}

.connection-button:hover {
  background: linear-gradient(145deg, #1fc8e3, #17a2b8);
}

.profile-button {
  background: linear-gradient(145deg, #ffc107, #e0a800);
  color: var(--text-shadow) !important;
}

.profile-button:hover {
  background: linear-gradient(145deg, #ffcd39, #ffc107);
}

/* Conteneur des meilleurs scores */
.best-scores-container {
  background: var(--ui-bg);
  border: 3px solid var(--border-dark);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  max-width: 350px;
  width: 100%;
}

/* Titre des meilleurs scores */
.best-scores-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  color: var(--text-white);
  text-shadow: 1px 1px 0px var(--text-shadow);
  text-align: center;
  margin-bottom: 15px;
  animation: scoresGlow 3s ease-in-out infinite;
}

@keyframes scoresGlow {
  0%, 100% { color: var(--text-white); }
  50% { color: var(--sand-yellow); }
}

/* Tableau des scores */
.scores-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
}

.scores-table th,
.scores-table td {
  padding: 6px 8px;
  text-align: center;
  border: 2px solid var(--border-dark);
  background: var(--hole-dark);
}

.scores-table th {
  background: var(--primary-green);
  color: var(--text-white);
  text-shadow: 1px 1px 0px var(--text-shadow);
}

.scores-table td {
  background: var(--secondary-green);
  color: var(--text-white);
}

.best-score {
  background: var(--sand-yellow) !important;
  color: var(--text-shadow) !important;
  font-weight: bold;
}

.no-score {
  background: var(--hole-dark) !important;
  color: #888 !important;
}

.player-name {
  background: var(--primary-green) !important;
  color: var(--text-white) !important;
  font-size: 7px;
}

.new-record-badge {
  position: relative;
  animation: recordBlink 1s ease-in-out infinite;
}

@keyframes recordBlink {
  0%, 100% { background: var(--sand-yellow) !important; }
  50% { background: #ffd700 !important; }
}

/* Indicateur de statut de connexion */
.connection-status {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: var(--ui-bg);
  border: 2px solid var(--border-dark);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  color: var(--text-white);
  text-shadow: 1px 1px 0px var(--text-shadow);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.connection-status.online {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.2);
}

.connection-status.offline {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .game-title {
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 20px;
  }
  
  .menu-button {
    font-size: 10px;
    padding: 8px 20px;
    min-width: 150px;
    letter-spacing: 1px;
  }
  
  .best-scores-container {
    max-width: 280px;
    padding: 12px;
  }
  
  .best-scores-title {
    font-size: 8px;
  }
  
  .scores-table {
    font-size: 6px;
  }
  
  .scores-table th,
  .scores-table td {
    padding: 4px 6px;
  }
  
  .connection-status {
    font-size: 6px;
    padding: 4px 8px;
    bottom: 10px;
    right: 10px;
  }
}
