/* Import Google font (aligné avec le site) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

/* Page Snake */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0a0f1a;
}

/* Wrapper principal */
.wrapper {
  width: 65vmin;
  height: 70vmin;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  background: #151d2e;
  border: 1px solid #1e293b;
  box-shadow: 0 20px 40px rgba(0, 188, 212, 0.15);
}

/* Score */
.game-details {
  color: #8892a4;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 20px 27px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

/* Plateau */
.play-board {
  height: 100%;
  width: 100%;
  display: grid;
  background: #0f1525;
  grid-template: repeat(30, 1fr) / repeat(30, 1fr);
}

/* Nourriture */
.play-board .food {
  background: #ff3b3b;
  border-radius: 4px;
}

/* Tête du snake */
.play-board .head {
  background: #00bcd4;
  border-radius: 4px;
}

/* Contrôles mobiles */
.controls {
  display: none;
  justify-content: space-between;
  background: #0f1525;
  border-top: 1px solid #1e293b;
}

.controls i {
  padding: 20px 0;
  text-align: center;
  font-size: 1.2rem;
  color: #f0f4f8;
  width: calc(100% / 4);
  cursor: pointer;
  transition: background 0.3s;
}

.controls i:hover {
  background: rgba(0, 188, 212, 0.1);
}

/* Responsive */
@media screen and (max-width: 800px) {
  .wrapper {
    width: 90vmin;
    height: 115vmin;
  }

  .game-details {
    font-size: 1rem;
    padding: 15px 27px;
  }

  .controls {
    display: flex;
  }

  .controls i {
    font-size: 1rem;
  }
}

/* Bouton retour */
.back-button {
  position: absolute;
  top: 20px;
  right: 20px;
}

.back-button a {
  display: inline-block;
  padding: 10px 22px;
  background: #00bcd4;
  color: #0a0f1a;
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s;
}

.back-button a:hover {
  background: #00a5bb;
  transform: translateY(-2px);
}
