:root {
  --juniora-h: 56px
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--jn-font)
}
html,
body {
  -webkit-tap-highlight-color: transparent
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px 12px calc(var(--juniora-h) + 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #227c70
}
.container {
  width: 100%;
  max-width: 400px;
  border-radius: 1rem;
  background: #eee;
  text-align: center
}
.container h2 {
  font-size: clamp(20px, 5vw, 32px);
  font-weight: bold;
  padding: 22px 20px 12px;
  border-bottom: 1px dashed #ccc;
  text-transform: uppercase
}
.container .content {
  margin: 22px 18px 28px
}
.content .word {
  user-select: none;
  font-size: clamp(26px, 7vw, 33px);
  font-weight: bold;
  text-align: center;
  letter-spacing: 10px;
  margin-right: -10px;
  word-break: break-all;
  text-transform: uppercase
}
.content .details {
  margin: 22px 0 18px
}
.details p {
  font-size: clamp(14px, 4vw, 16px);
  color: gray
}
.details p b {
  font-weight: 500
}
.content input {
  width: 100%;
  height: 56px;
  outline: none;
  padding: 0 14px;
  font-size: 17px;
  border-radius: 6px;
  border: 1px solid #bfbfbf;
  background: #fff;
  -webkit-appearance: none;
  appearance: none
}
.content input:focus {
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.08);
  border-color: #3333ff
}
.content input::placeholder {
  color: #aaa
}
.content .buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: space-between
}
.buttons button {
  flex: 1;
  border: none;
  outline: none;
  color: #fff;
  cursor: pointer;
  padding: 14px 0;
  font-size: clamp(14px, 4vw, 17px);
  border-radius: 6px;
  transition: background 0.2s ease,transform 0.1s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent
}
.buttons button:active {
  transform: scale(0.97)
}
.buttons .refresh-word {
  background: #141414
}
.buttons .refresh-word:hover {
  background: #282828
}
.buttons .check-word {
  background: #3333ff
}
.buttons .check-word:hover {
  background: #2c52ed
}
@media (max-width: 480px) {
  :root {
    --juniora-h: 52px
  }
  .container {
    border-radius: 14px
  }
  .container h2 {
    padding: 16px 16px 10px
  }
  .container .content {
    margin: 18px 14px 22px
  }
  .content .word {
    letter-spacing: 8px;
    margin-right: -8px
  }
  .content input {
    height: 52px;
    font-size: 16px
  }
  .buttons button {
    padding: 13px 0
  }
}
@media (max-height: 560px) {
  .container .content {
    margin: 14px 14px 18px
  }
  .content .details {
    margin: 14px 0 12px
  }
  .content input {
    height: 46px
  }
}

.juniora-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--juniora-h);
  background: #292929;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0 16px
}
.juniora-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: var(--jn-font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.9
}
.juniora-logo {
  width: 28px;
  height: auto;
  display: block
}
.juniora-text {
  letter-spacing: normal
}
@media (max-width: 480px) {
  .juniora-link {
    font-size: 12.5px
  }
  .juniora-logo {
    width: 24px
  }
}

.jn-msg {
  margin: 14px 0 0;
  min-height: 22px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center
}
.jn-msg[data-kind="good"] {
  color: #16a34a
}
.jn-msg[data-kind="bad"] {
  color: #dc2626
}
.jn-msg[data-kind="warn"] {
  color: #b45309
}

.content .word {
  letter-spacing: 4px;
  direction: rtl
}

@media (max-height: 500px) {
  .container {
    padding: 5px 12px;
    zoom: 0.72
  }
  .container h2 {
    font-size: 17px;
    padding-bottom: 8px;
    margin-bottom: 8px
  }
  .content .word {
    font-size: 26px;
    letter-spacing: 3px;
    margin-bottom: 6px
  }
  .content input {
    height: 42px;
    margin-bottom: 8px
  }
  .jn-msg {
    margin-top: 6px;
    min-height: 18px;
    font-size: 13px
  }
}

.juniora-overlay {
  height: var(--juniora-h)
}
.juniora-link {
  font-family: var(--jn-font);
  font-size: clamp(12px, 3.4vw, 15px);
  font-weight: 700;
  line-height: 1.9;
  letter-spacing: normal;
  gap: 8px;
  white-space: nowrap
}
.juniora-logo {
  width: 22px;
  height: auto
}
.juniora-text {
  letter-spacing: normal
}
@media (max-height: 520px) {
  .juniora-link {
    font-size: 12px
  }
  .juniora-logo {
    width: 18px
  }
}

.mc-btn, .jump-btn, #jumpBtn, #controls button, .mc-fire {
  font-family: var(--jn-font);
  font-weight: 700;
}
.content .details { flex-wrap: wrap; gap: 4px 14px; }
.content .score b, .content .best b { color: #5372f0; }
.content .best { color: #16a34a; }
