/* GIPITY DOOM — fullscreen software-rendered FPS.
   Water.css/gipity-theme load first; we deliberately override their page
   layout because this is an immersive full-viewport canvas game, not a
   document. */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  /* cancel Water.css's centered max-width article layout */
  max-width: none;
  display: block;
}

#screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: #000;
  /* keep the upscaled 320x200 frame crisp, not blurred */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}

/* --- overlays (title / pause) --------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.2rem;
  z-index: 10;
  font-family: "Trebuchet MS", "Arial Black", system-ui, sans-serif;
  color: #d8cfc4;
  background:
    radial-gradient(circle at 50% 35%, rgba(60, 8, 4, 0.55), rgba(0, 0, 0, 0.92) 70%),
    #000;
}

.overlay.hidden { display: none; }

.overlay h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #b9b2a7;
  text-shadow:
    0 0 2px #000,
    3px 3px 0 #2a0a06,
    6px 6px 0 #150402;
  line-height: 0.95;
}

.overlay h1 span {
  color: #e23a22;
  text-shadow:
    0 0 14px rgba(226, 58, 34, 0.7),
    3px 3px 0 #3a0a04;
}

.overlay h2 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #e23a22;
  text-shadow: 0 0 12px rgba(226, 58, 34, 0.6), 3px 3px 0 #2a0a06;
}

.overlay .tagline {
  margin: 0;
  font-size: clamp(0.9rem, 2.2vw, 1.3rem);
  color: #9a8f82;
  font-style: italic;
}

.overlay .controls {
  margin: 0;
  max-width: 44rem;
  padding: 0 1rem;
  font-size: clamp(0.7rem, 1.6vw, 0.95rem);
  color: #8a8076;
  letter-spacing: 0.04em;
}

.overlay button {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  color: #1a0c08;
  background: linear-gradient(#e6b24a, #b9842a);
  border: 3px solid #3a0a04;
  border-radius: 4px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  box-shadow: 0 0 0 2px #6e5018, 0 6px 18px rgba(0, 0, 0, 0.6);
  transition: transform 0.08s ease, filter 0.12s ease;
}

.overlay button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.overlay button:active {
  transform: translateY(1px);
}

.overlay button.ghost {
  background: transparent;
  color: #d8a24a;
  border-color: #6e5018;
  box-shadow: none;
}
.overlay button.ghost:hover { background: rgba(110, 80, 24, 0.2); }

.overlay button:disabled {
  filter: grayscale(0.7) brightness(0.7);
  cursor: not-allowed;
}

.menu {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- lobby screens -------------------------------------------------------- */

.overlay.lobby {
  justify-content: flex-start;
  padding-top: 4vh;
  gap: 1rem;
  overflow-y: auto;
}

.lobby-card {
  background: rgba(20, 14, 12, 0.85);
  border: 2px solid #5a3a1a;
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  width: min(92vw, 30rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}
.lobby-card.wide { width: min(94vw, 40rem); }

.lobby-card label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #c9a373;
  font-weight: 700;
}

.lobby-card input {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.55rem 0.7rem;
  color: #f0e6d8;
  background: #0c0806;
  border: 2px solid #6e5018;
  border-radius: 4px;
  text-transform: uppercase;
}
.lobby-card input:focus { outline: none; border-color: #e6b24a; }

.lobby-card .row { display: flex; gap: 0.6rem; align-items: center; }
.lobby-card .row.create { margin-top: 0.4rem; }
.lobby-card .row.create input { flex: 1; }
.lobby-card .row button { font-size: 1rem; padding: 0.55rem 1rem; }

.loc { margin: 0.2rem 0; color: #9ad0a0; font-size: 0.95rem; }
.muted { color: #8a8076; }
.small { font-size: 0.8rem; }
.muted b, .small b { color: #d8a24a; }

.room-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 56vh;
  overflow-y: auto;
}

.room {
  background: rgba(40, 28, 22, 0.7);
  border: 1px solid #5a3a1a;
  border-radius: 5px;
  padding: 0.6rem 0.8rem;
}
.room-head { display: flex; align-items: center; gap: 0.7rem; }
.room-name { flex: 1; font-weight: 800; letter-spacing: 0.04em; color: #f0e6d8; text-transform: uppercase; }
.room-count { font-weight: 800; color: #9ad0a0; }
.room-count.full { color: #e23a22; }
.room-head button { font-size: 0.85rem; padding: 0.35rem 0.9rem; }

.roster { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.2rem; }
.roster-row { display: flex; justify-content: space-between; gap: 0.8rem; font-size: 0.82rem; }
.roster-name { color: #e6c98a; font-weight: 700; }
.roster-loc { color: #8a8076; text-align: right; }
