﻿:root {
  --bg-top: #7fe6ff;
  --bg-bottom: #d7fff4;
  --panel: rgba(255, 250, 235, 0.92);
  --panel-border: #ffb84d;
  --accent: #ff8f3d;
  --accent-strong: #ff6d1f;
  --text: #23404d;
  --shadow: rgba(35, 64, 77, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.65), transparent 35%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  touch-action: none;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: min(100vw, 500px);
  height: 100vh;
  max-height: 960px;
  overflow: hidden;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hud {
  position: absolute;
  top: 14px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 4;
}

.pill,
.icon-button {
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(35, 64, 77, 0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 12px;
  font-size: 0.95rem;
  box-shadow: 0 10px 20px var(--shadow);
}

.icon-button {
  cursor: pointer;
}

.overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 5;
  background: rgba(19, 59, 54, 0.22);
}

.overlay.visible {
  display: flex;
}

.panel {
  width: min(100%, 380px);
  background: var(--panel);
  border: 4px solid var(--panel-border);
  border-radius: 28px;
  padding: 24px 22px;
  text-align: center;
  box-shadow: 0 20px 40px var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
}

h1,
h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1;
}

.lead {
  margin: 14px 0 18px;
  font-size: 1rem;
  line-height: 1.5;
}

.tutorial {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.tip {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 12px;
  text-align: left;
}

.tip-icon {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff3a6, #ffd05f);
  font-size: 1.25rem;
}

.primary-button {
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 26px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(255, 109, 31, 0.28);
}

.primary-button:active,
.icon-button:active {
  transform: translateY(1px);
}

@media (max-width: 520px) {
  .app-shell {
    width: 100vw;
  }

  .pill,
  .icon-button {
    font-size: 0.88rem;
    padding: 8px 10px;
  }

  .panel {
    padding: 20px 18px;
  }
}
