html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  font-family: 'Cinzel', serif;
  cursor: url("../kunai.svg") 16 6, auto;
}

/* ================= GAME (FULLSCREEN LAYER) ================= */

#gameLayer {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #c9c89b;
}

/* ================= UI LAYER (OVERLAY) ================= */

#uiLayer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none; /* UI blockiert nicht das Game */
}

#scrollUI {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: auto; /* Buttons bleiben klickbar */
}

/* ================= SCROLL UI ================= */

#scrollWrap {
  width: 480px;
  position: relative;
}

.cap {
  width: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  position: relative;
  z-index: 3;
}

#scrollMiddle {
  background: #FFCC99;
  width: 86%;
  height: 420px;
  margin: -10px auto;
  text-align: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  transform-origin: center;
  transform: scaleY(0);
}

#scrollContent {
  opacity: 0;
  padding: 26px 0 30px;
}

#scrollTitle {
  font-size: 48px;
  color: #6a1b1b;
  margin-bottom: 12px;
}

.scrollBtn {
  display: inline-block;
  font-size: 34px;
  color: #6a1b1b;
  margin: 12px 0;
  cursor: inherit; /* keep kunai cursor */
}

#menuButtons { 
  margin-top: 70px; 
}

#settingsWrap,
#gameOverWrap,
#fameWrap { 
  display: none; 
}

#settingsText { font-size: 26px; }
#scoreLine { font-size: 28px; }

/* ================= QR ================= */

#qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 10px 0 16px;
}

/* ================= SCROLL OF FAME ================= */

#fameTitle{
  font-size: 34px;
  color: #6a1b1b;
  margin-bottom: 10px;
}

#fameListWrap{
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 6px 0 12px;
}

#fameList{
  width: 78%;
  max-height: 240px;
  overflow-y: auto;
  text-align: left;
  padding: 0;
  margin: 0;
  scrollbar-width: none; /* Firefox */
}

#fameList::-webkit-scrollbar{
  display: none; /* Chrome/Edge */
}

.fameRow{
  display: grid;
  grid-template-columns: 36px 1fr 60px;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  font-size: 22px;
}

.fameRank { 
  text-align: right; 
  opacity: 0.65; 
}

.fameName {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fameScore {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* ================= FULLSCREEN BUTTON ================= */
#fsBtn{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;                 /* über allem */
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.9);
  font-size: 26px;
  line-height: 52px;
  cursor: inherit;              /* kunai bleibt */
  pointer-events: auto;

  /* optional: leicht fancy */
  backdrop-filter: blur(3px);
}

#fsBtn:hover{
  background: rgba(0,0,0,0.45);
}
#fsBtn:active{
  transform: translateY(1px);
}
