body {
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0f0f14;
    color: #fff;
    font-family: system-ui, Arial, sans-serif
}

h1 {
    color: #00ffa7;
    margin: 6px 0 2px
}

.instructions {
    color: #b9b9c3;
    margin: 0 0 14px;
    text-align: center
}

#game-ui {
    width: 100%;
    max-width: 700px;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    margin-bottom: 10px
}

#mult {
    font-weight: 700;
    margin-left: 8px
}

#pause-btn {
    background: #ff9f1a;
    border: 0;
    color: #111;
    font-weight: 700;
    font-size: 18px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer
}

#game-container {
    position: relative;
    margin-top: 8px
}

canvas {
    background: #16161d;
    border: 4px solid #2a2a35;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    max-width: 100%;
    height: auto;
    border-radius: 10px
}

#game-over {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    text-align: center;
    padding: 20px
}

#restart-btn {
    padding: 12px 22px;
    font-size: 18px;
    background: #00d26a;
    border: 0;
    border-radius: 10px;
    color: #071;
    padding: 12px 24px;
    color: #fff;
    cursor: pointer
}

#toast {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9;
    font-weight: 700;
    background: rgba(0, 0, 0, .6);
    padding: 6px 12px;
    border-radius: 999px;
    display: none
}

#mobile-controls {
    display: none;
    margin-top: 10px
}

.control-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 5px 0
}

.control-btn {
    background: #00d26a;
    color: #041;
    font-size: 24px;
    padding: 16px 18px;
    border: 0;
    border-radius: 12px;
    cursor: pointer
}

@media (max-width:768px) {
    #mobile-controls {
        display: block
    }

    #game-ui {
        font-size: 15px
    }
}



/* Button Style */
#rules-btn {
  background: linear-gradient(135deg, #ff9500, #ff9f1a);
  border: none;
  color: white;
  font-size: 16px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
#rules-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px #ff9f1a;
}

/* Modal Background */
#rules-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* Modal Content */
.rules-content {
  background: linear-gradient(145deg, #1a1a1a, #2c2c2c);
  padding: 20px 25px;
  border-radius: 15px;
  max-width: 420px;
  text-align: left;
  color: #fff;
  font-family: 'Press Start 2P', sans-serif; /* Retro game font */
  border: 2px solid #4facfe;
  box-shadow: 0 0 20px #4facfe;
}

/* Title */
.rules-content h2 {
  margin-top: 0;
  font-size: 18px;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 15px;
}

/* List Style */
.rules-content ul {
  list-style: none;
  padding: 0;
}
.rules-content li {
  font-size: 14px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rules-content li strong {
  color: #ff4d4d;
}

/* Close Button */
#close-rules {
  background: linear-gradient(135deg, #ff4b1f, #ff9068);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  margin: 20px auto 0;
  transition: 0.3s;
}
#close-rules:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px #ff4b1f;
}


#hud {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  font-size: 22px;
  font-family: 'Press Start 2P', sans-serif; /* Retro game font */
}

#lives {
  color: #ff4d4d; /* Heart red */
  text-shadow: 0 0 5px #ff0000;
}





