* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    overflow: hidden;
    touch-action: none;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* wyśrodkuj poziomo, ale przesuń w górę */
    padding-top: 60px; /* miejsce na UI z punktami */
}

canvas {
    display: block;
    background: #2c3e50;
    border: 2px solid #34495e;
    border-radius: 8px;
    max-width: 95vw;
    max-height: 95vh;
    margin-top: 20px; /* przesuń canvas w dół, by było miejsce na UI */
}

.ui {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 100;
}

.joystick {
    position: absolute;
    bottom: 80px;
    left: 80px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 4px solid rgba(255,255,255,0.4);
    z-index: 100;
    transition: all 0.1s;
}

.joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    transition: all 0.1s;
}

.bomb-btn {
    position: absolute;
    bottom: 80px;
    right: 80px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff4444, #cc0000);
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 90;
    cursor: pointer;
    transition: all 0.1s;
}

.bomb-btn:active {
    transform: scale(0.95);
    background: radial-gradient(circle, #ff6666, #ff4444);
}

.level-complete,
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,255,0,0.95);
    color: black;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    z-index: 200;
    display: none;
}

.game-over {
    background: rgba(255,0,0,0.95);
    color: white;
}

.d-pad {
  position: absolute;
  bottom: 80px;
  left: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 100;
}

.d-pad button {
  width: 60px;
  height: 60px;
  font-size: 24px;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 10px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.1s;
}

.d-pad button:active {
  background: rgba(255,255,255,0.4);
  transform: scale(0.95);
}

