html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 40%, #16331f 0%, #0a1a10 55%, #050c08 100%);
  overflow: hidden;
  overscroll-behavior: none;
}

#stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  display: block;
  background: #0d2e1e;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.04) inset, 0 25px 70px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  outline: none;
}

/* ------------------------------------------------------- account bar --- */
#account-bar {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
}

#account-status {
  color: #d9e6df;
  font-size: 13px;
  background: rgba(10, 34, 24, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#account-bar button {
  background: linear-gradient(#1c4a32, #0d2719);
  color: #f0f0eb;
  border: 1px solid #d4af37;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: bold;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

#account-bar button:hover {
  filter: brightness(1.18);
}

/* ------------------------------------------------------------ modal --- */
#auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 16px;
}

/* Any author rule setting `display` beats the browser's own `[hidden]{display:
   none}` default, so the `display:flex` above would otherwise leave this
   laid out - and eating clicks - even while "hidden". */
#auth-backdrop[hidden] {
  display: none;
}

#auth-modal {
  position: relative;
  background: #0f2e1f;
  border: 1px solid #d4af37;
  border-radius: 12px;
  padding: 26px 24px 20px;
  width: 320px;
  max-width: 100%;
  font-family: Arial, sans-serif;
  color: #f0f0eb;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
}

#auth-modal h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #f0cd5a;
  font-family: Georgia, serif;
}

#auth-modal .auth-sub {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #b0c4bc;
}

#auth-modal label {
  display: block;
  font-size: 12px;
  color: #b0c4bc;
  margin-bottom: 4px;
}

#auth-modal input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #1f5a3f;
  background: #0a2218;
  color: #f0f0eb;
  font-size: 14px;
}

#auth-modal input:focus {
  outline: none;
  border-color: #d4af37;
}

#auth-modal .auth-row {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

#auth-modal .auth-row button {
  flex: 1;
  padding: 9px 8px;
  border-radius: 7px;
  border: 1px solid #d4af37;
  background: linear-gradient(#1c4a32, #0d2719);
  color: #f0f0eb;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}

#auth-modal .auth-row button:hover {
  filter: brightness(1.15);
}

#auth-modal .auth-google {
  width: 100%;
  margin-top: 10px;
  padding: 9px 8px;
  border-radius: 7px;
  border: 1px solid #3a5a4a;
  background: #15352590;
  color: #f0f0eb;
  font-size: 13px;
  cursor: pointer;
}

#auth-modal .auth-google:hover {
  filter: brightness(1.15);
}

#auth-modal .auth-error {
  color: #e67856;
  font-size: 12px;
  min-height: 14px;
  margin: 12px 0 0;
}

#auth-modal #auth-guest-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: #b0c4bc;
  font-size: 12px;
  text-decoration: underline;
}

#auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #b0c4bc;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

#auth-close:hover {
  color: #f0f0eb;
}
