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

body {
  font-family: 'Comic Sans MS', 'Chalkboard', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#container {
  position: relative;
  width: 400px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game {
  width: 100%;
  height: 600px;
  max-height: 70vh;
  background: #1a1a2e;
  border-radius: 20px;
  border: 4px solid #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

#keys {
  display: flex;
  width: 100%;
  justify-content: space-around;
  padding: 0 10px;
  margin-bottom: 5px;
}

.key {
  width: 80px;
  height: 80px;
  background: linear-gradient(145deg, #ffd93d, #ff9500);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: bold;
  color: #1a1a2e;
  border: 4px solid #fff;
  box-shadow: 0 6px 0 #c77800, 0 8px 20px rgba(0,0,0,0.3);
  text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
  transition: transform 0.1s, box-shadow 0.1s;
  flex: 0 0 auto;
}

.key.pressed {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #c77800, 0 4px 10px rgba(0,0,0,0.3);
}

.key.correct {
  background: linear-gradient(145deg, #4ade80, #22c55e);
  box-shadow: 0 6px 0 #16a34a, 0 8px 20px rgba(0,0,0,0.3);
}

#score {
  background: rgba(255,255,255,0.9);
  padding: 8px 25px;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: bold;
  color: #1a1a2e;
  margin-bottom: 10px;
}

#start-screen, #game-over {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 46, 0.95);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 20px;
}

#start-screen h1, #game-over h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 3px 3px 0 #764ba2;
}

#start-screen p, #game-over p {
  font-size: 1.3rem;
  margin-bottom: 10px;
  opacity: 0.9;
}

button {
  margin-top: 20px;
  padding: 15px 50px;
  font-size: 1.5rem;
  font-family: inherit;
  font-weight: bold;
  background: linear-gradient(145deg, #4ade80, #22c55e);
  color: white;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0 6px 0 #16a34a;
  transition: transform 0.1s, box-shadow 0.1s;
}

button:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #16a34a;
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #16a34a;
}

.hidden {
  display: none !important;
}

/* Speed indicator */
#speed-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 8px;
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
  overflow: hidden;
}

#speed-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #ffd93d, #ff6b6b);
  border-radius: 4px;
  transition: width 0.3s;
}
