body {
  margin: 0;
  background: #1e1e1e;
  color: white;
  font-family: "VT323", monospace;
  text-align: center;
}

h1 {
  margin-top: 24px;
}

canvas {
  border: 4px solid white;
  image-rendering: pixelated;
}

.start {
  display: block;
  width: fit-content;
  margin: 16px auto;
  padding: 12px 24px;
  background: #3cb043;
  color: white;
  font-family: "VT323", monospace;
  font-size: 22px;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

.start:hover {
  background: #2f8f36;
}

.start:active {
  background: #256e2a;
}

#hud-panel {
  max-width: 100%;
  margin: 10px auto 0;
  padding: 10px 16px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  font-family: "VT323", monospace;
  color: #ffffff;
  text-align: center;
  user-select: none;
}

#hud-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 10px 24px;
  font-size: 22px;
  line-height: 1;
  color: #ffffff;

  width: 100%; /* ép chiếm trọn 1 hàng, không dính hàng khác */
}

#hud-stats span {
  line-height: 1;
}

#hud-hint {
  display: block;   /* ép xuống dòng riêng, không phụ thuộc flex cha */
  width: 100%;
  font-size: 26px;
  color: #ffffff;
}

#hud-powerup {
  display: block;
  width: 100%;
  font-size: 18px;
  font-weight: bold;
  min-height: 22px;
  line-height: 1.4;
}

.heart {
  color: #ff4d6d;
  font-size: 1em;
}

.effect-dunk {
  color: #ff6a00;
}

.effect-split {
  color: #9c27b0;
}

.effect-rush {
  color: #00c853;
}

.effect-perfect {
  color: #ffd54a;
}

.shield-icon {
  display: none;
  vertical-align: middle;
  margin-left: 4px;
}
/* =====================================================
   MOBILE / RESPONSIVE GAME
===================================================== */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
}

#game {
    display: block;

    /* Co game theo màn hình điện thoại */
    width: 100% !important;
    max-width: 100vw;

    /* Giữ đúng tỉ lệ canvas gốc */
    height: auto !important;

    margin: 0 auto;

    image-rendering: pixelated;

    /* Không cho điện thoại scroll/zoom khi chơi */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}


/* =====================================================
   HÀNG NÚT NỐT NHẠC
===================================================== */

#aa-mobile-note-bar {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 6px;

    width: 100%;
    max-width: 100vw;

    padding: 7px 5px;

    box-sizing: border-box;

    background: rgba(18, 13, 25, 0.96);

    touch-action: manipulation;

    position: relative;
    z-index: 100;
}

.aa-note-button {
    flex: 1 1 0;

    max-width: 70px;
    min-width: 38px;

    height: 48px;

    border: 2px solid #c7a86b;
    border-radius: 8px;

    background:
        linear-gradient(
            180deg,
            #3e3046,
            #1f1826
        );

    color: white;

    font-family: "VT323", monospace;
    font-size: 25px;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.08),
        0 3px 0 #100b14;

    touch-action: manipulation;

    cursor: pointer;
}

.aa-note-button:active {
    transform: translateY(2px);

    background:
        linear-gradient(
            180deg,
            #705270,
            #35263d
        );

    box-shadow:
        inset 0 0 10px rgba(255,255,255,.18);
}


/* Hướng dẫn mobile */

#aa-mobile-help {
    display: none;

    width: 100%;

    padding: 5px;

    box-sizing: border-box;

    text-align: center;

    color: #ddd;

    background: #16111c;

    font-family: "VT323", monospace;
    font-size: 16px;
}


/* Chỉ hiện hướng dẫn trên màn hình cảm ứng */

@media (pointer: coarse) {

    #aa-mobile-help {
        display: block;
    }

    .aa-note-button {
        height: 50px;
        font-size: 26px;
    }
}


/* Mobile rất nhỏ */

@media (max-width: 450px) {

    #aa-mobile-note-bar {
        gap: 3px;
        padding: 5px 3px;
    }

    .aa-note-button {
        min-width: 0;
        height: 46px;

        font-size: 22px;

        padding: 0;
    }
}