* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Trebuchet MS', 'Arial', sans-serif;
  color: #fff;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1a1a2e;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(10, 10, 30, 0.85);
  backdrop-filter: blur(4px);
}

.hidden { display: none !important; }

.menu-content {
  text-align: center;
  padding: 40px;
  max-width: 520px;
}

.title {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.6), 4px 4px 0 #000;
  color: #fff;
}

.title-accent {
  color: #00e5ff;
  text-shadow: 0 0 30px rgba(0, 229, 255, 0.9), 4px 4px 0 #000;
}

.level-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(0, 229, 255, 0.4);
  border-radius: 12px;
  padding: 18px 24px;
  margin: 28px auto;
  max-width: 380px;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}

.level-icon {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  flex-shrink: 0;
}

.cube-icon {
  background: linear-gradient(135deg, #00e5ff 0%, #0091ea 100%);
  border: 3px solid #fff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.7);
}

.level-info { text-align: left; }

.level-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

.level-author {
  font-size: 13px;
  opacity: 0.7;
  margin: 2px 0;
}

.difficulty {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

.difficulty.easy {
  background: #00c853;
  color: #fff;
}

.btn {
  display: block;
  width: 280px;
  margin: 14px auto;
  padding: 16px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: transform 0.08s, box-shadow 0.08s;
  border-bottom: 4px solid rgba(0,0,0,0.4);
}

.btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.play-btn {
  background: linear-gradient(180deg, #00e5ff 0%, #0091ea 100%);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
}

.practice-btn {
  background: linear-gradient(180deg, #ff4081 0%, #c2185b 100%);
  box-shadow: 0 0 25px rgba(255, 64, 129, 0.4);
}

.controls-hint {
  margin-top: 22px;
  font-size: 13px;
  opacity: 0.6;
  letter-spacing: 1px;
}

.gameover-title {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ff1744;
  text-shadow: 0 0 25px rgba(255, 23, 68, 0.7), 4px 4px 0 #000;
  margin-bottom: 16px;
}

.win-title {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffd600;
  text-shadow: 0 0 30px rgba(255, 214, 0, 0.8), 4px 4px 0 #000;
  margin-bottom: 16px;
}

#gameover-progress, #gameover-attempts,
#win-attempts, #win-jumps {
  font-size: 20px;
  margin: 6px 0;
  letter-spacing: 1px;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

#attempts {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.85;
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
}

#progress-bar {
  flex: 1;
  max-width: 420px;
  height: 16px;
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00e5ff, #76ff03);
  transition: width 0.1s linear;
  border-radius: 6px;
}

#progress-text {
  font-size: 14px;
  font-weight: 700;
  text-shadow: 2px 2px 0 #000;
  min-width: 40px;
}

h2 {
  font-size: 48px;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(0,229,255,0.5), 4px 4px 0 #000;
}
