*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
}

body {
  background: #020617;
  overflow: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  /* background-image set in HTML via url_for so the URL is always correct */
  background-size: cover;
  background-position: center;
  filter: grayscale(0.2) brightness(0.4);
  z-index: -2;
}

.overlay {
  position: fixed;
  inset: 0;
  /* Slightly reduce opacity so the background image is clearly visible */
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
  z-index: -1;
}

.game-shell {
  position: relative;
  max-width: 900px;
  height: 100vh;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.game-header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-header p {
  margin: 0.25rem 0 0;
  color: #9ca3af;
  font-size: 0.95rem;
}

.game-output {
  flex: 1;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.98));
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 25px 40px rgba(15, 23, 42, 0.9);
}

.game-output p {
  margin: 0.2rem 0;
  white-space: pre-wrap;
}

.game-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.game-input-row input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 1rem;
}

.game-input-row input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.5);
}

.game-input-row button {
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  border: none;
  background: linear-gradient(to right, #f97316, #facc15);
  color: #111827;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
}

.game-input-row button:hover {
  filter: brightness(1.05);
  box-shadow: 0 12px 25px rgba(249, 115, 22, 0.5);
}

.game-input-row button:active {
  transform: translateY(1px);
  box-shadow: none;
}

@media (max-width: 768px) {
  .game-shell {
    padding: 1.5rem 0.75rem;
  }

  .game-output {
    padding: 1rem;
  }
}

