* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  overflow: hidden;
}

.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #05080c;
}

.sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #060a10 0%, #0b121c 45%, #101c28 75%, #172633 100%);
}

.haze {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(90, 120, 150, 0.18) 0%, rgba(90, 120, 150, 0) 70%),
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(70, 100, 130, 0.10) 0%, rgba(70, 100, 130, 0) 70%);
  pointer-events: none;
}

.stars {
  position: absolute;
  inset: 0;
}

.star {
  --u: 3px;
  position: absolute;
  width: var(--u);
  height: var(--u);
  background: #dceeff;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 #dceeff,
    0 var(--u) 0 0 #dceeff,
    calc(-1 * var(--u)) 0 0 0 #dceeff,
    var(--u) 0 0 0 #dceeff;
  animation: twinkle 3s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

.moon {
  position: absolute;
  top: 10%;
  right: 18%;
  width: 90px;
  height: 90px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 25px rgba(140, 190, 230, 0.45));
}

.clouds {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 2;
}

.cloud-sprite {
  --sway: 20vw;
  position: absolute;
  image-rendering: pixelated;
  will-change: transform;
  animation-name: sway;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@keyframes sway {
  from { transform: translateX(calc(-1 * var(--sway))); }
  to { transform: translateX(var(--sway)); }
}

.navbar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 0px));
  left: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  color: #dceeff;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-x-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #dceeff;
  background: #16202c;
  border: 2px solid #7fa8c9;
  text-decoration: none;
  transition: color 0.1s ease-out, border-color 0.1s ease-out;
}

.nav-x-link:hover {
  color: #ffffff;
  border-color: #a9cbe6;
}

.stage {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pixel-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  color: #dceeff;
  background: #16202c;
  padding: 18px 40px;
  border: 4px solid #7fa8c9;
  box-shadow:
    4px 4px 0 #0a0f16,
    inset 0 0 0 2px #0a0f16;
  cursor: pointer;
  transition: transform 0.05s ease-out;
}

.pixel-btn:hover {
  color: #ffffff;
  border-color: #a9cbe6;
  background: #1d2c3c;
}

.pixel-btn:active {
  transform: translate(4px, 4px);
  box-shadow:
    0 0 0 #0a0f16,
    inset 0 0 0 2px #0a0f16;
}

.pixel-btn:disabled {
  cursor: default;
  opacity: 0.6;
  transform: none;
}

.pixel-btn.small {
  font-size: 11px;
  padding: 10px 18px;
  border-width: 3px;
  box-shadow:
    3px 3px 0 #0a0f16,
    inset 0 0 0 2px #0a0f16;
}

.task-panel {
  font-family: "Press Start 2P", monospace;
  width: min(90vw, 480px);
  background: rgba(10, 15, 22, 0.85);
  border: 4px solid #7fa8c9;
  box-shadow: 6px 6px 0 #0a0f16;
  padding: 24px 20px;
  color: #dceeff;
}

.task-title {
  font-size: 16px;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 2px;
  color: #ffffff;
}

.task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 2px solid #223245;
  flex-wrap: wrap;
}

.task:last-of-type {
  border-bottom: none;
}

.task-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.task-num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16202c;
  border: 2px solid #7fa8c9;
  font-size: 10px;
}

.task-label {
  font-size: 10px;
  line-height: 1.6;
}

.task.completed .task-num {
  background: #1f3a2a;
  border-color: #6fbf8a;
  color: #a9e6bf;
}

.task.completed .task-label {
  color: #9fd6b0;
}

.task.locked {
  opacity: 0.45;
}

.wallet-row {
  display: flex;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

#walletInput {
  flex: 1 1 160px;
  min-width: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  padding: 10px 12px;
  background: #16202c;
  border: 3px solid #7fa8c9;
  color: #dceeff;
}

#walletInput:disabled {
  opacity: 0.5;
}

#walletInput::placeholder {
  color: #5c7a95;
}

.status-msg {
  margin-top: 16px;
  font-size: 10px;
  text-align: center;
  min-height: 14px;
}

.status-msg.success {
  color: #9fe6b0;
}

.status-msg.error {
  color: #e69f9f;
}

.already-text {
  font-size: 10px;
  text-align: center;
  line-height: 1.8;
  color: #cddfee;
}

.already-wallet {
  margin-top: 14px;
  font-size: 10px;
  text-align: center;
  word-break: break-all;
  color: #9fe6b0;
  background: #16202c;
  border: 2px solid #7fa8c9;
  padding: 12px;
}
