body {
  font-family: Inter, sans-serif;
}
.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
.score-pill {
  background: #1f2937;
  border-radius: 8px;
  padding: 5px 10px;
  text-align: center;
  min-width: 52px;
}
.score-pill .label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9ca3af;
  text-transform: uppercase;
}
.score-pill .value {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.mode-btn {
  border: 1px solid #e5e7eb;
  border-radius: 99px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.mode-btn:hover {
  border-color: #6ee7b7;
  color: #065f46;
  background: #f0fdf4;
}
.mode-btn.active {
  border-color: #059669;
  color: #065f46;
  background: #ecfdf5;
}

#question-card {
  background: linear-gradient(135deg, #059669, #047857);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 16px;
}
#q-region {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}
#q-text {
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}
#q-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
}

#options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.option-btn {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.option-btn:hover:not(:disabled) {
  border-color: #6ee7b7;
  background: #f0fdf4;
  color: #065f46;
}
.option-btn.correct {
  border-color: #059669;
  background: #ecfdf5;
  color: #065f46;
}
.option-btn.wrong {
  border-color: #dc2626;
  background: #fef2f2;
  color: #dc2626;
}
.option-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

#type-input {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  outline: none;
  transition: border-color 0.15s;
}
#type-input:focus {
  border-color: #059669;
}
#type-input.correct {
  border-color: #059669;
  background: #ecfdf5;
}
#type-input.wrong {
  border-color: #dc2626;
  background: #fef2f2;
}

#result-badge {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  display: none;
}
#result-badge.correct {
  background: #ecfdf5;
  color: #065f46;
  display: block;
}
#result-badge.wrong {
  background: #fef2f2;
  color: #dc2626;
  display: block;
}

.life {
  font-size: 18px;
  transition: all 0.2s;
}
.life.lost {
  filter: grayscale(1);
  opacity: 0.3;
}

#gameover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#gameover-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.go-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem 2rem;
  text-align: center;
  max-width: 300px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: winSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes winSlide {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.go-stat {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 10px;
}
.go-stat .glabel {
  font-size: 9px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.go-stat .gvalue {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 999;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}
.related-game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.related-game-card:hover {
  border-color: #6ee7b7;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}
.related-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
