:root {
  --sa-ink: #eaf6ff;
  --sa-accent: #5ee0ff;
  --sa-accent2: #2fb8ff;
}

#screen-slither-agama * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#screen-slither-agama {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #05070f;
  font-family: 'Trebuchet MS', 'Segoe UI Rounded', Verdana, sans-serif;
  touch-action: none;
}

#sa-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

#sa-game {
  display: block;
  width: 100%;
  height: 100%;
  background: #0a0e1a;
}

#sa-hud {
  position: absolute;
  top: 10px;
  left: 70px;
  color: var(--sa-ink);
  z-index: 5;
  pointer-events: none;
  background: rgba(10, 14, 26, .55);
  border: 1px solid rgba(94, 224, 255, .3);
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: bold;
}

#sa-hud .sa-big {
  font-size: 20px;
  color: var(--sa-accent);
}

#sa-hud .sa-small {
  font-size: 12px;
  opacity: .8;
}

#sa-leaderboard {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 180px;
  color: var(--sa-ink);
  z-index: 5;
  background: rgba(10, 14, 26, .55);
  border: 1px solid rgba(94, 224, 255, .3);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
}

#sa-leaderboard h3 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--sa-accent);
  letter-spacing: 1px;
}

#sa-leaderboard ol {
  margin: 0;
  padding-left: 18px;
}

#sa-leaderboard li {
  margin: 2px 0;
  font-weight: bold;
}

#sa-leaderboard li.sa-me {
  color: var(--sa-accent);
}

#sa-leaderboard li.sa-hunt {
  color: #ff5e7e;
}

#screen-slither-agama .sa-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(20, 25, 45, .85), rgba(4, 6, 12, .95));
  z-index: 20;
  padding: 14px;
}

#screen-slither-agama .sa-hidden {
  display: none !important;
}

#screen-slither-agama .sa-card {
  background: rgba(15, 20, 35, .94);
  border: 1.5px solid rgba(94, 224, 255, .45);
  border-radius: 24px;
  padding: clamp(16px, 3vh, 26px) clamp(20px, 4vw, 32px);
  max-width: min(480px, 92%);
  width: 100%;
  text-align: center;
  color: var(--sa-ink);
  box-shadow: 0 0 40px rgba(94, 224, 255, .2);
  max-height: 92vh;
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

#screen-slither-agama .sa-card h1 {
  margin: 6px 0;
  font-size: clamp(24px, 6vw, 36px);
  background: linear-gradient(90deg, var(--sa-accent), #7fffb0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#screen-slither-agama .sa-card p {
  font-size: clamp(12px, 3vw, 15px);
  opacity: .85;
  margin: 6px 0 14px;
}

#sa-nameInput {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(94, 224, 255, .4);
  border-radius: 30px;
  padding: 10px 18px;
  color: var(--sa-ink);
  font-size: 15px;
  text-align: center;
  width: 220px;
  max-width: 80vw;
  margin-bottom: 12px;
  outline: none;
}

#screen-slither-agama .sa-bigBtn {
  background: linear-gradient(180deg, var(--sa-accent), var(--sa-accent2));
  border: none;
  color: #04121a;
  font-weight: bold;
  font-size: clamp(15px, 4vw, 19px);
  padding: 13px 30px;
  border-radius: 40px;
  box-shadow: 0 5px 0 #0d6f96;
  cursor: pointer;
  margin: 6px;
}

#screen-slither-agama .sa-bigBtn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #0d6f96;
}

#screen-slither-agama .sa-statLine {
  font-size: 14px;
  margin: 4px 0;
  font-weight: bold;
  color: var(--sa-accent);
}

#sa-boostBtn {
  position: absolute;
  bottom: 180px;
  right: 60px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(94, 224, 255, .9), rgba(47, 184, 255, .5));
  border: 3px solid rgba(255, 255, 255, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #04121a;
  z-index: 8;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .3);
}

#sa-boostBtn:active {
  filter: brightness(1.2);
}

#sa-hint {
  position: absolute;
  bottom: 14px;
  left: 14px;
  color: rgba(234, 246, 255, .6);
  font-size: 11px;
  z-index: 5;
  pointer-events: none;
}

/* Quiz modal */
#sa-quizModal .sa-card {
  max-width: 420px;
}

#sa-quizModal .sa-giftEmoji {
  font-size: 50px;
  display: block;
  margin-bottom: 4px;
}

.sa-quizOpt {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, .06);
  border: 2px solid rgba(94, 224, 255, .3);
  border-radius: 14px;
  padding: 11px 16px;
  margin: 7px 0;
  font-size: 15px;
  cursor: pointer;
  font-weight: bold;
  color: var(--sa-ink);
}

.sa-quizOpt:active {
  background: rgba(94, 224, 255, .25);
}

.sa-quizOpt.sa-correct {
  background: rgba(127, 255, 176, .35) !important;
  border-color: #7fffb0;
}

.sa-quizOpt.sa-wrong {
  background: rgba(255, 94, 126, .3) !important;
  border-color: #ff5e7e;
}

#sa-challengeToast {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 90vw;
  padding: 11px 16px;
  border-radius: 16px;
  color: var(--sa-ink);
  z-index: 12;
  background: rgba(15, 20, 35, .94);
  border: 1px solid rgba(255, 210, 63, .55);
  box-shadow: 0 0 28px rgba(255, 210, 63, .18);
  pointer-events: none;
  animation: sa-challengeIn .28s ease-out;
}

#sa-challengeToast.sa-hidden {
  display: none !important;
}

.sa-challengeIcon {
  font-size: 24px;
  line-height: 1;
}

.sa-challengeTitle {
  font-size: 13px;
  font-weight: 900;
  color: #ffd23f;
  letter-spacing: 1px;
}

.sa-challengeText {
  font-size: 12px;
  margin-top: 2px;
  opacity: .9;
}

@keyframes sa-challengeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -14px) scale(.95)
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1)
  }
}

.sa-challengeBadge {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  color: #ffd23f;
  background: rgba(10, 14, 26, .65);
  border: 1px solid rgba(255, 210, 63, .35);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: bold;
  z-index: 5;
  pointer-events: none;
}

#sa-quitBtn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 30;
  width: 50px;
  height: 50px;
  background: none;
  border: none;
  cursor: pointer;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.4));
}

#sa-quitBtn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sa-skin-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sa-skin-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, border-color 0.2s;
}
.sa-skin-option:hover {
  transform: scale(1.1);
}
.sa-skin-option.selected {
  border-color: #fff;
  transform: scale(1.25);
}
#sa-joystickZone {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 140px;
  height: 140px;
  z-index: 10;
  touch-action: none;
}
#sa-joystickBase {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
#sa-joystickKnob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(94, 224, 255, 0.7);
  box-shadow: 0 3px 6px rgba(0,0,0,0.5);
  pointer-events: none;
}
