/* AutoGames shared base styles. Games layer their own theme on top. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid #ffbf3c;
  outline-offset: 2px;
}

/* Floating home / mute buttons */
.ag-chrome {
  position: fixed;
  z-index: 1000;
  display: flex;
  gap: 6px;
  top: calc(8px + env(safe-area-inset-top, 0px));
}
.ag-chrome.ag-tl {
  left: calc(8px + env(safe-area-inset-left, 0px));
}
.ag-chrome.ag-tr {
  right: calc(8px + env(safe-area-inset-right, 0px));
}
.ag-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0;
}
.ag-btn:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* Toast */
.ag-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  z-index: 1001;
  max-width: min(90vw, 480px);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(20, 20, 28, 0.92);
  color: #fff;
  font: 600 15px/1.35 system-ui, sans-serif;
  text-align: center;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.ag-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ag-hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
