/* ── Reset & variables ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

:root {
  /* Overridden at runtime for floor theme segments (see UI.applyFloorTheme) */
  --floor-bg-image: url('../assets/DungeonBackground.png');
  --bg-dark:       #0f0f1a;
  --bg-panel:      #13131f;
  --stone-mid:     #3a3a4f;
  --stone-light:   #4a4a65;
  --torch-orange:  #e8841a;
  --torch-yellow:  #f5c518;
  --gold:          #ffd700;
  --hp-red:        #c0392b;
  --hp-bright:     #e74c3c;
  --mana-blue:     #2471a3;
  --mana-bright:   #2e86c1;
  --text-primary:  #ddd8c8;
  --text-dim:      #7a7060;
  --radius:        8px;
  --hud-bar-bg:    linear-gradient(180deg, #1e1e2d 0%, #12121c 100%);
  --color-back:    #1a2535;
  --btn-text:      #d0a756;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  background-image: var(--floor-bg-image);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: Georgia, 'Times New Roman', serif;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* Cheat: in-run skip floor (testing) */
.skip-floor-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  padding: 8px 10px;
  font-size: 0.68rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f5c518;
  background: rgba(8, 6, 14, 0.94);
  border: 1px solid rgba(245, 197, 24, 0.5);
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  max-width: 96px;
  line-height: 1.2;
  text-align: center;
}

.skip-floor-btn:active {
  opacity: 0.9;
}

/* Must be explicit: project has no global `.hidden` rule */
.skip-floor-btn.hidden,
#skip-floor-btn.hidden {
  display: none !important;
}

/* ── Header ── */
#header {
  padding: 10px 12px 6px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #080810 0%, transparent 100%);
  position: relative;
  z-index: 15;
}

#header-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 4px;
}

.header-spacer {
  width: 44px;
  pointer-events: none;
}

#header-title-block {
  text-align: center;
  min-width: 0;
}

.header-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 40px;
}

#title {
  font-size: 1.35rem;
  color: var(--torch-yellow);
  text-shadow: 0 0 18px var(--torch-orange), 0 0 40px rgba(232,132,26,0.3);
  letter-spacing: 3px;
  text-transform: uppercase;
}

#floor-info {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 1px;
  font-style: italic;
}
