/* Dawnfell — global styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: #0a0a12;
  overflow: hidden;
  font-family: "Courier New", monospace;
  /* Mobile: no text selection, no tap highlight, no scroll/zoom bounce */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: none;
}

#game-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #1a1a2e 0%, #07070d 100%);
}

#game {
  /* Crisp pixel-art scaling */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

#loading {
  position: absolute;
  color: #d8c690;
  font-size: 20px;
  letter-spacing: 2px;
}

.hidden { display: none !important; }

/* ---- Account: title button + overlay form ---- */
#acc-open {
  display: none;            /* shown only on the title screen (see [data-state]) */
  position: fixed; top: 14px; left: 14px; z-index: 30;
  font-family: Georgia, serif; font-weight: 700; font-size: 14px;
  color: #ffe9a8; background: rgba(10,12,24,0.55);
  border: 1px solid rgba(231,185,78,0.7); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#acc-open:hover { background: rgba(231,185,78,0.18); }
body[data-state="title"] #acc-open { display: block; }

#account-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,8,16,0.82);
  font-family: Georgia, serif;
}
.acc-panel {
  position: relative; width: min(92vw, 380px);
  background: linear-gradient(180deg, #2a2748, #171530);
  border: 2px solid #d9a93a; border-radius: 16px;
  padding: 26px 24px 22px; color: #e9e7f2;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.acc-panel h2 { font-size: 26px; color: #ffe9a8; text-align: center; margin-bottom: 12px; letter-spacing: 1px; }
.acc-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none; color: #cfcde0; font-size: 26px; cursor: pointer; line-height: 1;
}
.acc-close:hover { color: #ffe9a8; }
.acc-status { text-align: center; color: #b9b6d0; font-size: 14px; margin-bottom: 16px; min-height: 1.2em; }
#acc-form { display: flex; flex-direction: column; gap: 10px; }
#account-overlay input {
  font-family: inherit; font-size: 16px; color: #fff;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 12px 14px; outline: none; width: 100%;
}
#account-overlay input:focus { border-color: #d9a93a; }
.acc-actions { display: flex; gap: 10px; margin-top: 4px; }
.abtn {
  flex: 1; font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  border-radius: 10px; padding: 12px 10px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06); color: #e9e7f2; transition: background .15s, transform .1s;
}
.abtn:hover { background: rgba(255,255,255,0.12); }
.abtn:active { transform: translateY(1px); }
.abtn:disabled { opacity: .5; cursor: default; }
.abtn.gold { background: linear-gradient(180deg, #e7b94e, #d9a93a); color: #2a1d05; border: none; }
#acc-loggedin { display: flex; justify-content: center; }
.acc-msg { text-align: center; min-height: 1.2em; margin-top: 12px; font-size: 14px; }
.acc-msg.err { color: #ff8a8a; }
.acc-msg.ok { color: #9fe6b0; }
