#loadingOverlay {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(circle at 50% 15%, rgba(232,255,60,0.12), transparent 26%), #060504;
  display: none; align-items: center; justify-content: center;
  flex-direction: column;
  transition: opacity .7s ease, transform .7s ease;
  overflow: hidden;
}
#loadingOverlay.hidden { opacity: 0; pointer-events: none; transform: scale(1.03); }
#loadingOverlay::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen; opacity: .14; pointer-events: none; z-index: 2;
  animation: loadingScan 4.5s linear infinite;
}
#loadingOverlay::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(255,107,53,.2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 75% 100%, rgba(232,255,60,.14) 0%, transparent 55%);
  pointer-events: none; z-index: 1;
  animation: loadingPulse 3s ease-in-out infinite;
}
.ls-inner {
  position: relative; z-index: 3;
  width: min(92vw, 520px);
  display: flex; flex-direction: column; align-items: center;
  padding: 2.3rem 2rem 2.2rem;
  border: 2px solid rgba(232,255,60,0.22);
  background: linear-gradient(180deg, rgba(20,18,14,0.97) 0%, rgba(8,7,5,0.98) 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.06), inset 0 -3px 0 rgba(0,0,0,0.26), 0 20px 50px rgba(0,0,0,0.35);
  clip-path: polygon(0.8rem 0%, 100% 0%, 100% calc(100% - 0.8rem), calc(100% - 0.8rem) 100%, 0 100%, 0 0.8rem);
  overflow: hidden;
}
.ls-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1.2rem, 4vw, 2.4rem);
  letter-spacing: .16em; text-transform: uppercase;
  color: #e8ff3c; line-height: 1.2; text-align: center;
  margin-bottom: .8rem; position: relative;
  text-shadow: 0 0 18px rgba(232,255,60,0.22);
  animation: ls-flicker 3.8s ease-in-out infinite;
}
.ls-title::before, .ls-title::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; animation: ls-glitch 3.6s steps(2,end) infinite; }
.ls-title::before { color: #ff4d4f; clip-path: polygon(0 20%,100% 20%,100% 42%,0 42%); transform: translate(-2px,1px); }
.ls-title::after  { color: #4dc9ff; clip-path: polygon(0 60%,100% 60%,100% 82%,0 82%); transform: translate(2px,-1px); }
@keyframes ls-flicker { 0%,100%{opacity:1}92%{opacity:1}93%{opacity:.7}94%{opacity:1}96%{opacity:.85}97%{opacity:1} }
@keyframes loadingPulse { 0%,100%{transform:scale(1);opacity:.8}50%{transform:scale(1.03);opacity:1} }
@keyframes loadingScan { from{transform:translateY(-4%)} to{transform:translateY(4%)} }
@keyframes ls-glitch { 0%,100%{opacity:0;transform:translate(0,0)}10%{opacity:.8;transform:translate(-2px,1px)}20%{opacity:0}40%{opacity:.7;transform:translate(2px,-1px)}55%{opacity:0}70%{opacity:.9;transform:translate(-1px,1px)}85%{opacity:0} }
.ls-tagline {
  font-family: 'Space Mono', monospace;
  font-size: .62rem; letter-spacing: .5em; text-transform: uppercase;
  color: rgba(232,255,60,.5); margin-bottom: 2rem;
}
.ls-phases { display: flex; gap: 6px; margin-bottom: 1.4rem; }
.ls-phase-dot { width: 6px; height: 6px; background: rgba(232,255,60,.15); transition: background .3s, transform .3s; }
.ls-phase-dot.active { background: #e8ff3c; box-shadow: 0 0 8px rgba(232,255,60,.6); transform: scaleX(3); }
.ls-phase-dot.done { background: rgba(232,255,60,.45); }
.ls-progress-wrap { width: 100%; height: 3px; background: rgba(232,255,60,.08); margin-bottom: 1rem; position: relative; overflow: hidden; border: 1px solid rgba(232,255,60,.14); }
.ls-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg,#f9ff70 0%,#d9e640 100%); transition: width .15s ease; box-shadow: 0 0 12px rgba(232,255,60,.7); }
.ls-progress-bar::after { content:''; position:absolute; top:0; right:0; bottom:0; width:60px; background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent); animation:ls-shimmer 1.2s ease-in-out infinite; }
@keyframes ls-shimmer { from{transform:translateX(-120px)} to{transform:translateX(60px)} }
.ls-status { font-family: 'Space Mono', monospace; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(240,237,230,.58); margin-bottom: .5rem; min-height: 1.2em; text-align: center; }
.ls-sub    { font-family: 'Space Mono', monospace; font-size: .62rem; color: rgba(255,255,255,.23); letter-spacing: .18em; text-transform: uppercase; text-align: center; }
.ls-ping { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 3; font-family: 'Space Mono', monospace; font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; color: rgba(232,255,60,.38); display: flex; align-items: center; gap: .6rem; }
.ls-ping-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(232,255,60,.3); animation: ls-pulse 1.6s ease-in-out infinite; }
@keyframes ls-pulse { 0%,100%{opacity:.3;transform:scale(1)}50%{opacity:1;transform:scale(1.4)} }
.ls-corner { position: absolute; width: 20px; height: 20px; z-index: 3; }
.ls-corner::before, .ls-corner::after { content: ''; position: absolute; background: rgba(232,255,60,.4); }
.ls-corner::before { width: 100%; height: 1px; top: 0; left: 0 }
.ls-corner::after  { width: 1px; height: 100%; top: 0; left: 0 }
.ls-corner-tl { top: 1.5rem; left: 1.5rem }
.ls-corner-tr { top: 1.5rem; right: 1.5rem; transform: scaleX(-1) }
.ls-corner-bl { bottom: 1.5rem; left: 1.5rem; transform: scaleY(-1) }
.ls-corner-br { bottom: 1.5rem; right: 1.5rem; transform: scale(-1) }

#botCheck {
  position: fixed; inset: 0; z-index: 10000;
  background: radial-gradient(circle at 50% 10%, rgba(232,255,60,0.12), transparent 24%), #060504;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  transition: opacity .5s ease;
  overflow: hidden;
}
#botCheck.hidden { opacity: 0; pointer-events: none; }
#botCheck::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.18) 3px, rgba(0,0,0,0.18) 4px);
  pointer-events: none; z-index: 2;
}
.bc-inner { position: relative; z-index: 3; width: min(94vw, 460px); display: flex; flex-direction: column; align-items: center; padding: 1.8rem 1.4rem 1.6rem; border: 2px solid rgba(232,255,60,0.22); background: linear-gradient(180deg, rgba(20,18,14,0.97) 0%, rgba(10,8,6,0.98) 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,0.05), inset 0 -3px 0 rgba(0,0,0,0.28), 0 20px 50px rgba(0,0,0,0.34); clip-path: polygon(0.8rem 0%, 100% 0%, 100% calc(100% - 0.8rem), calc(100% - 0.8rem) 100%, 0 100%, 0 0.8rem); }
.bc-badge { font-family: 'Space Mono', monospace; font-size: .58rem; letter-spacing: .38em; text-transform: uppercase; color: rgba(232,255,60,.55); margin-bottom: 1rem; border: 1px solid rgba(232,255,60,.18); padding: .4rem .8rem; background: rgba(232,255,60,.05); }
.bc-question { font-family: 'Press Start 2P', monospace; font-size: clamp(0.9rem, 3vw, 1.25rem); color: #f0ede6; text-align: center; margin-bottom: .6rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6; }
.bc-sub { font-family: 'Space Mono', monospace; font-size: .66rem; color: rgba(255,255,255,.34); letter-spacing: .16em; text-transform: uppercase; text-align: center; margin-bottom: 1.2rem; }
.bc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin-bottom: 1.2rem; }
.bc-tile { aspect-ratio: 1; border: 2px solid rgba(232,255,60,.16); background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(0,0,0,.2) 100%); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; transition: border-color .2s, background .2s, transform .1s; user-select: none; -webkit-user-select: none; box-shadow: inset 0 2px 0 rgba(255,255,255,.08), inset 0 -2px 0 rgba(0,0,0,.22); padding: 0; cursor: pointer; }
.bc-tile:hover { border-color: rgba(232,255,60,.35); background: rgba(232,255,60,.07); }
.bc-tile.selected { border-color: #e8ff3c; background: rgba(232,255,60,.15); transform: scale(.96); }
.bc-tile.selected::after { content: '✓'; position: absolute; top: 4px; right: 6px; font-size: .65rem; color: #e8ff3c; font-family: 'Space Mono', monospace; }
.bc-tile.wrong { border-color: #ff4d4f; background: rgba(255,77,79,.12); animation: bc-shake .35s ease; }
.block-icon { position: relative; display: block; width: 56%; height: 56%; border: 2px solid rgba(0,0,0,.32); box-shadow: inset 0 2px 0 rgba(255,255,255,.2), inset 0 -2px 0 rgba(0,0,0,.2); }
.block-icon::before, .block-icon::after { content: ''; position: absolute; }
.block-icon.block-dirt { background: linear-gradient(180deg, #8a4e1f 0%, #633518 100%); }
.block-icon.block-stone { background: linear-gradient(180deg, #8b8b8b 0%, #5b5b5b 100%); }
.block-icon.block-grass { background: linear-gradient(180deg, #4c8c2f 0%, #2d5d20 100%); }
.block-icon.block-torch { background: linear-gradient(180deg, #7a4d1c 0%, #3e2a10 100%); }
.block-icon.block-torch::before { width: 44%; height: 56%; background: linear-gradient(180deg, #ffcf4d 0%, #ff7a00 100%); left: 28%; top: 8%; }
.block-icon.block-torch::after { width: 24%; height: 24%; background: #3d1f09; left: 38%; top: 60%; }
.block-icon.block-diamond { background: linear-gradient(180deg, #6de7ff 0%, #3fbce4 100%); transform: rotate(45deg); }
.block-icon.block-creeper { background: linear-gradient(180deg, #5bb23b 0%, #2d7c21 100%); }
.block-icon.block-creeper::before { width: 24%; height: 24%; background: #1c1b1a; left: 20%; top: 24%; box-shadow: 24px 0 #1c1b1a; }
.block-icon.block-creeper::after { width: 52%; height: 16%; background: #1c1b1a; left: 24%; bottom: 20%; }
.block-icon.block-tnt { background: linear-gradient(180deg, #ff5a43 0%, #a31a17 100%); }
.block-icon.block-tnt::before { width: 54%; height: 18%; background: #ffe9a6; left: 22%; top: 20%; }
.block-icon.block-tnt::after { width: 18%; height: 42%; background: #f0dd8f; left: 41%; top: 36%; }
.block-icon.block-sword { background: linear-gradient(180deg, #b0b0b0 0%, #777777 100%); transform: rotate(45deg); }
.block-icon.block-sword::before { width: 24%; height: 70%; background: #d2d2d2; left: 38%; top: 10%; transform: rotate(-45deg); }
.block-icon.block-sword::after { width: 10%; height: 40%; background: #5c5c5c; left: 45%; top: 4%; transform: rotate(-45deg); }
@keyframes bc-shake { 0%,100%{transform:translateX(0)}20%{transform:translateX(-6px)}60%{transform:translateX(6px)} }
.bc-confirm-btn { font-family: 'Space Mono', monospace; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #060504; background: linear-gradient(180deg, #f9ff70 0%, #d9e640 100%); border: 2px solid rgba(232,255,60,.24); padding: .75rem 2.2rem; cursor: pointer; transition: opacity .2s, transform .1s; clip-path: polygon(0.7rem 0%,100% 0%,calc(100% - 0.7rem) 100%,0% 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,0.16), inset 0 -3px 0 rgba(0,0,0,0.22); }
.bc-confirm-btn:hover { opacity: .9; }
.bc-confirm-btn:active { transform: scale(.97); }
.bc-confirm-btn:disabled { opacity: .3; cursor: not-allowed; }
.bc-error { font-family: 'Space Mono', monospace; font-size: .64rem; color: #ff4d4f; letter-spacing: .12em; text-transform: uppercase; margin-top: .75rem; min-height: 1rem; text-align: center; opacity: 0; transition: opacity .2s; }
.bc-error.show { opacity: 1; }
.bc-attempts { font-family: 'Space Mono', monospace; font-size: .6rem; color: rgba(255,255,255,.2); letter-spacing: .2em; text-transform: uppercase; margin-top: .8rem; }
*, *::before, *::after { cursor: none !important; }

#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  background: #22d3ee;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: background 0.2s ease, width 0.15s ease, height 0.15s ease;
  box-shadow: 0 0 10px rgba(34,211,238,0.7), 0 0 20px rgba(34,211,238,0.3);
  will-change: left, top;
}

#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(34,211,238,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
  will-change: left, top;
}

#cursor.hovered { width: 8px; height: 8px; background: #fff; }
#cursor-ring.hovered { width: 44px; height: 44px; border-color: rgba(255,255,255,0.4); }

@media (max-width: 768px) {
  #cursor, #cursor-ring { display: none; }
  *, *::before, *::after { cursor: auto !important; }
}
