* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Quicksand", sans-serif;
  background: #222f3d;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

button {
  font-family: "Quicksand", sans-serif;
}

.game-container {
  text-align: center;
  background: #222f3d;
  padding: 10px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.game-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-header h1 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 0px;
}

.game-instructions {
  color: #999;
}

.game-info {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: normal;
  margin-top: 10px;
}

#gameCanvas {
  border: 3px solid #293847;
  border-radius: 10px;
  background: #2c3e50;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}

.game-controls {
  margin-top: 10px;
  font-size: 1.1rem;
}

.game-controls p {
  margin: 5px 0;
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 5px 10px;
  margin-bottom: 20px;
}

.difficulty-btn {
  padding: 5px 15px;
  font-size: 1rem;
  /* background: linear-gradient(45deg, #95a5a6, #7f8c8d); */
  border: 1px solid #999;
  background: transparent;
  color: #999;
  /* border: none; */
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.difficulty-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.difficulty-btn.active {
  background: linear-gradient(45deg, #2b2929, #1b1c1b);
  /* box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4); */
  color: white;
}

.game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.game-over h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #e74c3c;
}

.game-over p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

#restart-btn {
  padding: 15px 30px;
  font-size: 1.2rem;
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

.lane-change-btn {
  margin-top: 20px;
  padding: 12px 28px;
  font-size: 1.1rem;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.1s, transform 0.1s;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
.lane-change-btn:hover {
  background: linear-gradient(45deg, #764ba2, #667eea);
  transform: translateY(-2px);
}
.lane-change-btn:active {
  transform: translateY(0px);
  transition: transform 0.05s;
}

@media (max-width: 768px) {
  .game-container {
    padding: 15px;
    margin: 10px;
  }

  .game-header h1 {
    font-size: 2rem;
  }

  #gameCanvas {
    width: 100%;
    max-width: 400px;
    /* height: auto; */
    height: 500px;
  }
}

/* Desktop styles - limit max width to 400px */
@media (min-width: 769px) {
  .game-container {
    max-width: 600px;
    margin: 0 auto;
  }

  #gameCanvas {
    max-width: 600px;
    width: 100%;
    height: 500px;
  }
}
