*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #4ec0ca 0%, #038794 45%, #024a52 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
}

.arcadebox-page {
  width: 100%;
  max-width: 660px;
  padding: 12px 16px 20px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.back-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.back-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-switch button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button.active {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hud-pill {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 600;
}

.hud-medal {
  min-width: 36px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
}

.hud-medal:empty {
  display: none;
}

#myCanvas {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  margin: 0 auto;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  background: url("https://s2js.com/img/etc/flappyback.png") center / 100% 100% no-repeat;
  touch-action: manipulation;
}

#myCanvas:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

#myCanvas.touch-play-active {
  touch-action: none;
}
