@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Manrope:wght@500;700;800&display=swap");

:root {
  --bg-a: #fff9ec;
  --bg-b: #eaf6ff;
  --surface: #ffffff;
  --surface-2: #f7fbff;
  --text: #10213a;
  --muted: #51627c;
  --line: #d3e2f3;
  --brand: #0f6fff;
  --brand-2: #00a8a8;
  --accent: #ff8a3d;
  --danger: #d83f57;
  --shadow: 0 16px 40px rgba(16, 33, 58, 0.14);
}

body,
body.bg-light {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(42rem 30rem at 110% -10%, rgba(255, 138, 61, 0.24), transparent 65%),
    radial-gradient(34rem 26rem at -10% 110%, rgba(15, 111, 255, 0.22), transparent 62%),
    linear-gradient(145deg, var(--bg-a), var(--bg-b));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  letter-spacing: 0.01em;
  color: #0b2341;
}

.btn-link {
  color: #0d4ec0;
  text-decoration: none;
}

.btn-link:hover {
  color: #093a90;
}

.card {
  border: 1px solid rgba(211, 226, 243, 0.9);
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: card-in 280ms ease-out;
}

.card-body {
  padding: 1.6rem !important;
}

.alert {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.alert-info {
  background: #e8f5ff;
  color: #0f426f;
}

.alert-danger {
  background: #ffecee;
  color: #7f2034;
  border-color: #ffc8d1;
}

.masked-word {
  display: inline-block;
  letter-spacing: 0.18rem;
  font-weight: 800;
  font-size: 1.34rem;
  color: #0f2850;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(9, minmax(40px, 1fr));
  gap: 0.48rem;
}

.keyboard button {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #b8cfe8;
  background: linear-gradient(180deg, #ffffff, #e9f4ff);
  color: #0e3057;
  font-weight: 700;
  transition: transform 110ms ease, box-shadow 110ms ease, background 110ms ease;
}

.keyboard button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 15px rgba(15, 111, 255, 0.22);
  background: linear-gradient(180deg, #ffffff, #dceeff);
}

.keyboard button:disabled {
  opacity: 0.86;
}

.btn {
  border-radius: 12px;
  font-weight: 700;
  border-width: 1px;
}

.btn-primary,
.btn-success {
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.btn-primary:hover,
.btn-success:hover {
  filter: saturate(1.08) brightness(0.97);
}

.btn-outline-primary {
  color: #0f5dde;
  border-color: #98beff;
}

.btn-outline-primary:hover {
  background: #edf4ff;
  color: #0b3f9a;
  border-color: #77a7ff;
}

.btn-outline-secondary {
  color: #2e506f;
  border-color: #b8cbdd;
}

.btn-outline-secondary:hover {
  background: #edf3f9;
  color: #203950;
}

.btn-outline-success {
  color: #087765;
  border-color: #73d0be;
}

.btn-outline-success:hover {
  background: #e8fbf6;
  color: #045e50;
}

.hangman-image {
  width: 88px;
  max-width: 24vw;
  border: 1px solid #d7e4f5;
  border-radius: 12px;
  background: #ffffff;
  padding: 4px;
}

.hangman-svg {
  width: 100%;
  height: auto;
  display: block;
}

.hangman-base {
  stroke: #15335f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.hangman-part {
  stroke: var(--danger);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.form-control,
.form-select {
  border-radius: 12px;
  border: 1px solid #c3d8ee;
}

.form-control:focus,
.form-select:focus {
  border-color: #6ca7ff;
  box-shadow: 0 0 0 0.2rem rgba(15, 111, 255, 0.18);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .keyboard {
    grid-template-columns: repeat(6, minmax(40px, 1fr));
  }

  .hangman-image {
    width: 78px;
    max-width: 28vw;
  }

  .masked-word {
    font-size: 1.2rem;
  }
}
