
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  display: flex;
  justify-content: center;
  padding: 24px 8px;
}

#seo-runner-wrapper {
  max-width: 980px;
  width: 100%;
}

.headline {
  margin: 0 0 8px;
  font-size: 24px;
}

.subline {
  margin: 0 0 16px;
  font-size: 14px;
  color: #cbd5f5;
}

#game-container {
  position: relative;
  background: #020617;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.8);
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #1e293b;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(15,23,42,0.98));
  color: #e5e7eb;
}

.screen.active {
  display: flex;
}

.start-text {
  font-size: 18px;
  margin-bottom: 12px;
}

.hint {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 20px;
  text-align: center;
  max-width: 520px;
}

.btn {
  border-radius: 999px;
  border: none;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-start {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 10px 20px rgba(34,197,94,0.4);
}

.btn-finish {
  background: #3b82f6;
  color: white;
}

.btn-restart {
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid #1e293b;
}

.finish-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.privacy {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  max-width: 520px;
}

/* HUD */
#hud {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 760px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.progress-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.8);
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.6);
}

.progress-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #a3e635);
  transition: width 0.15s linear;
}

#score-label {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.7);
}

/* Touch / mouse controls — уменьшенная кнопка прыжка */
#touchControls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}


.ctrl-btn {
  pointer-events: auto;
  width: 32%;
  max-width: 160px;
  height: 46px;              /* ниже/на уровне зелёной полоски */
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  box-shadow: 0 3px 10px rgba(0,0,0,0.55);
  user-select: none;
}


.ctrl-btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}


@media (max-width: 768px) and (orientation: portrait) {
  #touchControls {
    bottom: 12px;
  }
  .ctrl-btn {
    width: 40%;
    max-width: 180px;
    height: 48px;
    font-size: 24px;
  }
}

  
.ctrl-btn {
  pointer-events: auto;
  width: 32%;
  max-width: 160px;
  height: 46px;              /* ниже/на уровне зелёной полоски */
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  box-shadow: 0 3px 10px rgba(0,0,0,0.55);
  user-select: none;
}

}


@media (max-width: 768px) and (orientation: landscape) {
  #touchControls {
    bottom: 6px;
  }
  .ctrl-btn {
    width: 35%;
    max-width: 170px;
    height: 44px;
    font-size: 22px;
  }
}

  
.ctrl-btn {
  pointer-events: auto;
  width: 32%;
  max-width: 160px;
  height: 46px;              /* ниже/на уровне зелёной полоски */
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  box-shadow: 0 3px 10px rgba(0,0,0,0.55);
  user-select: none;
}

}

@media (min-width: 1024px) {
  #touchControls {
    bottom: 16px;
    max-width: 820px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .headline {
    font-size: 20px;
  }
  .subline {
    font-size: 13px;
  }
}
