* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: #0b0b0b;
  color: #f2f2f2;

  -webkit-user-select: none;
  user-select: none;

  touch-action: manipulation;
  overscroll-behavior: none;
}


/* === LAYOUT === */
.wrap {
  width: 100%;
  max-width: 420px;     /* истински телефонен размер */
  margin: 0 auto;
  padding: 14px 14px 24px;
}

h1 {
  margin: 6px 0 4px;
  font-size: 26px;
  text-align: center;
}

h2 {
  font-size: 18px;
}

.muted {
  opacity: 0.75;
  text-align: center;
}

.small {
  font-size: 13px;
}

.footer {
  margin-top: 16px;
  text-align: center;
  opacity: 0.5;
}

/* === CARD === */
.card {
  background: linear-gradient(180deg, #151515, #101010);
  border: 1px solid #222;
  border-radius: 16px;
  padding: 14px;
  margin-top: 14px;
}

/* === FORM === */
label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  opacity: 0.9;
}

input, button {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #2a2a2a;
  background: #0f0f0f;
  color: #fff;
  font-size: 16px;
}

button {
  margin-top: 10px;
  cursor: pointer;
  min-height: 52px;
  font-size: 17px;
  font-weight: 500;
  border-radius: 14px;
  transition: transform 0.05s ease, background 0.2s;
}

button:active {
  transform: scale(0.97);
}


button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.secondary {
  background: #101010;
}

/* === BUTTON ROW === */
.row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.row button {
  flex: 1;
}

/* === RESULT TEXT (НАЙ-ВАЖНОТО) === */
.result {
  margin-top: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed #333;

  font-size: 17px;
  line-height: 1.45;
  text-align: center;

  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;

  max-height: 40vh;
  overflow-y: auto;

  background: rgba(0,0,0,0.35);
}


/* Hardcore текст */
.result.hardcore-text {
  font-size: 18px;
  border-color: #e91e63;
}

/* === TOAST (замества alert) === */
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 16px;
  max-width: 92%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  z-index: 9999;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(16px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hardcore toast */
.toast.hardcore {
  background: linear-gradient(135deg, #e91e63, #ff5722);
}

/* === DESKTOP ONLY (по избор) === */
@media (min-width: 700px) {
  .wrap {
    max-width: 560px;
  }
}
