/* Responsive game canvas container and canvas for all devices */
#game-canvas-container {
  width: 100vw;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-canvas {
  width: 100%;
  height: auto;
  max-width: 600px;
  max-height: 240px;
  display: block;
  background: #e0e7ff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(99,102,241,0.10);
  border: 2px solid #6366f1;
}

@media (max-width: 600px) {
  #game-canvas-container {
    max-width: 99vw;
    padding: 0;
  }
  #game-canvas {
    max-width: 99vw;
    max-height: 40vw;
    min-height: 120px;
    min-width: 0;
  }
}
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(120deg, #6366f1 0%, #a5b4fc 100%);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin-top: 32px;
  font-size: 2.2rem;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 12px rgba(99,102,241,0.18);
  font-weight: 900;
}

#game-container {
  margin: 32px auto 0 auto;
  width: 100vw;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game {
  position: relative;
  width: 360px;
  height: 180px;
  background: rgba(255,255,255,0.95);
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(99,102,241,0.10);
  border: 2px solid #6366f1;
  overflow: hidden;
}

#character {
  position: absolute;
  left: 40px;
  bottom: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1 60%, #a5b4fc 100%);
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(99,102,241,0.18);
  border: 2.5px solid #4f46e5;
}

.obstacle {
  position: absolute;
  bottom: 0;
  width: 28px;
  height: 48px;
  background: linear-gradient(135deg, #fbbf24 60%, #f59e42 100%);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(251,191,36,0.18);
  border: 2.5px solid #f59e42;
}

#scoreboard {
  margin: 16px 0 0 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  color: #6366f1;
  font-weight: 700;
  font-size: 1.1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.08);
  padding: 6px 18px;
  gap: 12px;
}

#gameover {
  margin-top: 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(99,102,241,0.10);
  padding: 18px 24px;
  text-align: center;
}

#gameover h2 {
  color: #e11d48;
  margin: 0 0 8px 0;
}

#gameover p {
  color: #222;
  margin: 0 0 12px 0;
}

#restart-btn {
  padding: 10px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.10);
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
}
#restart-btn:hover {
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
}

.instructions {
  color: #fff;
  font-size: 1rem;
  margin-top: 18px;
  text-shadow: 0 1px 8px #a5b4fc44;
}

.hidden {
  display: none;
}

@media (max-width: 500px) {
  #game {
    width: 98vw;
    min-width: 0;
    max-width: 99vw;
    height: 38vw;
    min-height: 120px;
    max-height: 60vw;
  }
  #scoreboard {
    max-width: 99vw;
    font-size: 1rem;
    padding: 6px 8px;
  }
}
