:root {
  color-scheme: dark;
  --game-shell-focus: #60a5fa;
}

body {
  position: relative;
  isolation: isolate;
  background-attachment: fixed;
}

.back-btn {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 1px solid #404040;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(10, 10, 10, 0.96));
  color: #f5f5f5;
  text-decoration: none;
  font-family:
    "Segoe UI",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.45),
    0 4px 6px -4px rgba(0, 0, 0, 0.45);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease,
    box-shadow 0.25s ease;
}

.back-btn:hover {
  background: linear-gradient(180deg, rgba(38, 38, 38, 0.98), rgba(22, 22, 22, 0.98));
  border-color: #525252;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 14px 20px -6px rgba(0, 0, 0, 0.5),
    0 6px 10px -6px rgba(0, 0, 0, 0.5);
}

.back-btn:active {
  transform: translateY(0);
}

h1,
h2,
.card h1,
.card h2,
.menu-box h1,
.menu-box h2 {
  text-wrap: balance;
}

a:focus-visible,
button:focus-visible,
[role='button']:focus-visible {
  outline: 2px solid var(--game-shell-focus);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .back-btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.8125rem;
  }
}
