/* html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #a2d2ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  cursor: pointer;
}

#hud-dashboard {
  position: absolute;
  top: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 35px rgba(0, 119, 182, 0.08);
  z-index: 10;
}

.hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
}

.hud-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}

#score, #best-score, #petal-count {
  font-size: 1.9em;
  font-weight: 300;
  color: #1e293b;
}

#score { color: #059669; }
#petal-count { color: #fb8500; font-weight: 600; }

.hud-divider {
  width: 1px;
  height: 32px;
  background: rgba(0, 0, 0, 0.08);
  margin: 0 16px;
}

#combo-badge {
  position: absolute;
  top: 110px;
  right: 30px;
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #ffffff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 6px 15px rgba(251, 133, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

#combo-badge.active {
  opacity: 1;
  transform: translateY(0);
}

#cosmetic-shop {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 12px 16px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shop-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #475569;
}
.shop-options {
  display: flex;
  gap: 8px;
}
.shop-btn {
  border: 1px solid rgba(0,0,0,0.1);
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.shop-btn.active {
  background: #23a06f;
  color: #ffffff;
  border-color: #23a06f;
}

#control-panel {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 360px;
  z-index: 10;
  pointer-events: none;
}

#instruction-text {
  font-weight: 500;
  font-size: 0.95em;
  line-height: 1.6;
  text-align: center;
  color: #334155;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 18px 28px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#restart-action {
  margin-top: 20px;
  width: 100%;
  padding: 16px 0;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  border: none;
  font-weight: 600;
  font-size: 0.85em;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(45, 106, 79, 0.25);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
}

#restart-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(45, 106, 79, 0.35);
  filter: brightness(1.15);
}

#perfect-toast {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  font-size: 0.85em;
  font-weight: 800;
  letter-spacing: 4px;
  color: #059669;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 10px 24px;
  border-radius: 30px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.1);
}

#perfect-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
} */











html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #a2d2ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  cursor: pointer;
}

/* Premium Light Glassmorphic HUD Dashboard */
#hud-dashboard {
  position: absolute;
  top: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 35px rgba(0, 119, 182, 0.08);
  z-index: 10;
}

.hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
}

.hud-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}

#score, #best-score, #petal-count {
  font-size: 1.9em;
  font-weight: 300;
  color: #1e293b;
}

#score { color: #059669; }
#petal-count { color: #fb8500; font-weight: 600; }

.hud-divider {
  width: 1px;
  height: 32px;
  background: rgba(0, 0, 0, 0.08);
  margin: 0 16px;
}

/* Combo Streak Tracker Pill */
#combo-badge {
  position: absolute;
  top: 110px;
  right: 30px;
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #ffffff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 6px 15px rgba(251, 133, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

#combo-badge.active {
  opacity: 1;
  transform: translateY(0);
}

/* Interactive Cosmetic Unlock Shop Panel */
#cosmetic-shop {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 12px 16px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shop-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #475569;
}
.shop-options {
  display: flex;
  gap: 8px;
}
.shop-btn {
  border: 1px solid rgba(0,0,0,0.1);
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.shop-btn.active {
  background: #23a06f;
  color: #ffffff;
  border-color: #23a06f;
}

/* Sophisticated Minimalist Instruction Layout */
#control-panel {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 360px;
  z-index: 10;
  pointer-events: none;
}

#instruction-text {
  font-weight: 500;
  font-size: 0.95em;
  line-height: 1.6;
  text-align: center;
  color: #334155;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 18px 28px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#restart-action {
  margin-top: 20px;
  width: 100%;
  padding: 16px 0;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  border: none;
  font-weight: 600;
  font-size: 0.85em;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(45, 106, 79, 0.25);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
}

#restart-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(45, 106, 79, 0.35);
  filter: brightness(1.15);
}

#perfect-toast {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  font-size: 0.85em;
  font-weight: 800;
  letter-spacing: 4px;
  color: #059669;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 10px 24px;
  border-radius: 30px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.1);
}

#perfect-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ==========================================================================
   MOBILE-ONLY RESPONSIVE BREAKPOINT
   ========================================================================== */
@media (max-width: 768px) {
  /* Pull Scorebar higher up towards top boundary margin edge */
  #hud-dashboard {
    top: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 14px;
    width: max-content;
    max-width: 92%;
    box-shadow: 0 6px 20px rgba(0, 119, 182, 0.06);
  }

  .hud-stat {
    min-width: 46px;
  }

  .hud-label {
    font-size: 8px;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
  }

  #score, #best-score, #petal-count {
    font-size: 1.25em;
  }

  .hud-divider {
    height: 18px;
    margin: 0 8px;
  }

  /* Compacted Combo Indicator Badge position */
  #combo-badge {
    top: 70px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-10px);
    padding: 3px 10px;
    font-size: 9px;
    letter-spacing: 1px;
  }

  #combo-badge.active {
    transform: translateX(-50%) translateY(0);
  }

  /* Center shop display cleanly along the lower edge grid */
  #cosmetic-shop {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 14px;
    align-items: center;
    width: max-content;
    gap: 6px;
  }

  .shop-title {
    font-size: 8px;
    letter-spacing: 1px;
  }

  .shop-btn {
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 8px;
  }

  /* Push mid text lower down so it sits clean below the resized scores */
  #control-panel {
    top: 32%;
    width: 85%;
  }

  #instruction-text {
    font-size: 0.82em;
    padding: 12px 18px;
    border-radius: 14px;
  }

  #restart-action {
    margin-top: 12px;
    padding: 10px 0;
    font-size: 0.78em;
    letter-spacing: 1px;
    border-radius: 10px;
  }

  #perfect-toast {
    font-size: 0.75em;
    letter-spacing: 1.5px;
    padding: 6px 16px;
  }
}