/* KOF duck climb — simple styles for kids to read */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0b1a2a;
  color: #fff;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
}

#game-wrap {
  position: relative;
  width: 480px;
  max-width: 100vw;
  height: 720px;
  max-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #123;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #4a90c8;
  image-rendering: pixelated;
}

/* HUD */
#hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 5;
}

#timer {
  font-size: 1.4rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

#btn-pause {
  pointer-events: auto;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #123;
  cursor: pointer;
}

#btn-pause:hover {
  background: #fff;
}

/* Overlay screens */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: rgba(8, 20, 36, 0.88);
  z-index: 10;
}

.screen.hidden,
.hidden {
  display: none !important;
}

h1 {
  margin: 0 0 8px;
  font-size: 2.2rem;
  letter-spacing: 0.02em;
}

h1 .sub {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.75;
}

.site {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: #8ec8ff;
}

.hint {
  margin: 0 0 24px;
  line-height: 1.5;
  opacity: 0.9;
}

.win-time {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 8px 0 20px;
}

label {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

input[type="text"] {
  width: min(260px, 90%);
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 2px solid #4a90c8;
  border-radius: 8px;
  font-size: 1.1rem;
  text-align: center;
}

button.big {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 12px 36px;
  border: none;
  border-radius: 12px;
  background: #f5c542;
  color: #1a1a1a;
  cursor: pointer;
  box-shadow: 0 4px 0 #c99412;
}

button.big:hover {
  filter: brightness(1.05);
}

button.big:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #c99412;
}

button.secondary {
  margin-top: 12px;
  font-size: 1rem;
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

#bests-box {
  margin-top: 28px;
  width: min(320px, 100%);
  text-align: left;
}

#bests-box h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  text-align: center;
}

#bests-list {
  margin: 0;
  padding-left: 1.4rem;
  line-height: 1.6;
}

#bests-list:empty,
#bests-empty.hidden {
  display: none;
}

.muted {
  text-align: center;
  opacity: 0.65;
  font-size: 0.95rem;
}
