/* ══════════ CRYPTO HACK ENGINE ══════════ */
#ch-overlay .overlay-topbar {
  background: #020802;
  border-bottom: 1px solid #00ff4130;
}
#ch-overlay .overlay-back {
  color: #00ff41;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
  border: 1px solid #00ff4140;
  background: transparent;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
#ch-overlay .overlay-back:hover { background: #00ff4115; }
#ch-overlay .overlay-title {
  color: #00ff41;
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
  font-size: 0.72rem;
  text-shadow: 0 0 10px #00ff4180;
}

#ch-wrap {
  background: #030903;
  min-height: 100%;
  font-family: 'Courier New', monospace;
  color: #00ff41;
  position: relative;
}
#ch-wrap::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.06) 3px, rgba(0,0,0,0.06) 4px);
  pointer-events: none;
  z-index: 5;
}

/* ── Screens ── */
.ch-screen {
  display: none;
  flex-direction: column;
  min-height: calc(100vh - 52px);
  padding: 2.5rem 2rem;
  box-sizing: border-box;
}
.ch-screen.active { display: flex; }

/* ── Code Select ── */
.ch-logo {
  text-align: center;
  font-size: 1.9rem;
  font-weight: bold;
  letter-spacing: 5px;
  color: #00ff41;
  text-shadow: 0 0 24px #00ff41, 0 0 60px #00ff4140;
  margin-bottom: 0.4rem;
}
.ch-blink { animation: ch-blink 1.1s step-end infinite; }
@keyframes ch-blink { 50% { opacity: 0; } }

.ch-tagline {
  text-align: center;
  font-size: 0.62rem;
  color: #00ff4170;
  letter-spacing: 4px;
  margin-bottom: 0.75rem;
}
.ch-divider {
  text-align: center;
  color: #00ff4130;
  font-size: 0.6rem;
  letter-spacing: 6px;
  margin-bottom: 2.5rem;
}

.ch-code-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  flex: 1;
  align-items: center;
}
.ch-code-card {
  background: #060f06;
  border: 1px solid #00ff4145;
  border-radius: 3px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  min-width: 190px;
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: ch-flicker 6s infinite;
}
.ch-code-card:nth-child(2) { animation-delay: 2s; }
.ch-code-card:nth-child(3) { animation-delay: 4s; }
@keyframes ch-flicker {
  0%,94%,96%,100% { opacity: 1; }
  95% { opacity: 0.85; }
}
.ch-code-card:hover {
  border-color: #00ff41;
  box-shadow: 0 0 24px #00ff4130, inset 0 0 20px #00ff4108;
}
.ch-code-icon {
  font-size: 2rem;
  color: #00ff41;
  text-shadow: 0 0 12px #00ff41;
}
.ch-code-val {
  font-size: 1.05rem;
  letter-spacing: 4px;
  color: #00ff41;
  text-shadow: 0 0 8px #00ff4170;
}
.ch-code-label {
  font-size: 0.55rem;
  color: #00ff4160;
  letter-spacing: 3px;
}
.ch-code-select {
  background: transparent;
  border: 1px solid #00ff41;
  color: #00ff41;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  padding: 0.5rem 1.75rem;
  cursor: pointer;
  letter-spacing: 3px;
  border-radius: 2px;
  transition: background 0.15s, box-shadow 0.15s;
}
.ch-code-select:hover {
  background: #00ff4118;
  box-shadow: 0 0 12px #00ff4130;
}

/* ── Game HUD ── */
.ch-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #00ff4225;
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.ch-hud-id {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.ch-hud-label {
  font-size: 0.5rem;
  color: #00ff4260;
  letter-spacing: 3px;
}
#ch-my-code {
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: #00ff42;
  text-shadow: 0 0 8px #00ff4270;
}
.ch-hud-stats { display: flex; gap: 1.75rem; }
.ch-stat { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.ch-stat-label {
  font-size: 0.5rem;
  color: #00ff4260;
  letter-spacing: 2px;
}
.ch-stat-val {
  font-size: 1.15rem;
  color: #00ff42;
  text-shadow: 0 0 8px #00ff4260;
}
.ch-lives-val { color: #ff6b6b !important; text-shadow: 0 0 6px #ff414160 !important; }
.ch-q-count {
  font-size: 0.6rem;
  color: #00ff4250;
  letter-spacing: 3px;
}

/* ── Question ── */
.ch-q-wrap {
  background: #060f06;
  border: 1px solid #00ff4225;
  border-radius: 3px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.ch-q-num {
  font-size: 0.6rem;
  color: #00ff4270;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}
.ch-q-text {
  font-size: 1rem;
  line-height: 1.65;
  color: #b8f0b8;
}

/* ── Answers ── */
.ch-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
@media (max-width: 520px) { .ch-answers { grid-template-columns: 1fr; } }

.ch-ans-btn {
  background: #060f06;
  border: 1px solid #00ff4235;
  color: #a8e8a8;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.45;
}
.ch-ans-btn:hover:not(:disabled) {
  border-color: #00ff42;
  background: #00ff4210;
}
.ch-ans-letter {
  color: #00ff42;
  font-size: 0.7rem;
  min-width: 14px;
  padding-top: 1px;
}
.ch-ans-btn.correct { border-color: #00ff42; background: #00ff4220; color: #00ff42; }
.ch-ans-btn.wrong   { border-color: #ff4141; background: #ff000012; color: #ff6b6b; }

/* ── Feedback ── */
.ch-feedback {
  min-height: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 2px;
  padding: 0.25rem;
  transition: opacity 0.2s;
}
.ch-fb-ok  { color: #00ff42; text-shadow: 0 0 10px #00ff42; }
.ch-fb-bad { color: #ff5555; }

/* ── Lives bar ── */
.ch-lives-bar {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  color: #ff6b6b70;
  letter-spacing: 2px;
}

/* ── Reward Screen ── */
#ch-screen-reward {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0;
}
.ch-reward-header {
  font-size: 1.15rem;
  color: #00ff42;
  letter-spacing: 5px;
  text-shadow: 0 0 20px #00ff42;
  margin-bottom: 0.5rem;
}
.ch-reward-pts {
  font-size: 1.8rem;
  color: #00ff42;
  text-shadow: 0 0 30px #00ff42;
  margin-bottom: 0.25rem;
}
.ch-reward-sub {
  font-size: 0.6rem;
  color: #00ff4260;
  letter-spacing: 3px;
  margin-bottom: 2.5rem;
}
.ch-reward-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.ch-reward-card {
  background: #060f06;
  border: 1px solid #00ff4250;
  border-radius: 3px;
  padding: 1.75rem 1.5rem;
  min-width: 155px;
  max-width: 200px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.ch-reward-card:hover {
  border-color: #00ff42;
  box-shadow: 0 0 24px #00ff4230;
  transform: translateY(-5px);
}
.ch-reward-card.ch-rc-chosen {
  border-color: #00ff42;
  box-shadow: 0 0 36px #00ff4250;
  background: #00ff4212;
  transform: translateY(-5px);
}
.ch-reward-card[data-type="mult"].ch-danger { border-color: #ffaa0050; }
.ch-reward-card[data-type="mult"].ch-danger:hover {
  border-color: #ffaa00;
  box-shadow: 0 0 24px #ffaa0030;
}
.ch-rc-icon { font-size: 2.25rem; }
.ch-rc-label {
  color: #00ff42;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.4;
}
.ch-rc-label.ch-danger-label { color: #ffaa00; }
.ch-rc-sub {
  color: #00ff4265;
  font-size: 0.6rem;
  letter-spacing: 1px;
}
.ch-rc-sub.ch-danger-sub { color: #ffaa0070; }

/* ── Hack Screen ── */
#ch-screen-hack {
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
}
.ch-hack-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.1rem 2.5rem;
  border: 1px solid #ff414130;
  background: #110505;
  border-radius: 3px;
  animation: ch-target-pulse 2s ease-in-out infinite;
}
@keyframes ch-target-pulse {
  0%,100% { box-shadow: 0 0 8px #ff414120; }
  50%      { box-shadow: 0 0 24px #ff414140; }
}
.ch-ht-label { font-size: 0.55rem; color: #ff6b6b; letter-spacing: 3px; }
.ch-ht-code  { font-size: 0.95rem; color: #ff4141; letter-spacing: 3px; }
.ch-ht-name  { font-size: 1.15rem; color: #ff7070; letter-spacing: 4px; font-weight: bold; }
.ch-ht-score { font-size: 0.6rem; color: #ff414175; letter-spacing: 2px; }

.ch-hack-terminal {
  background: #020602;
  border: 1px solid #00ff4228;
  border-radius: 3px;
  width: 100%;
  max-width: 500px;
  height: 190px;
  overflow-y: auto;
  padding: 1rem;
  font-size: 0.72rem;
  line-height: 1.85;
  scrollbar-width: none;
}
.ch-hack-terminal::-webkit-scrollbar { display: none; }
.ch-terminal-line { color: #00ff42; animation: ch-appear 0.08s ease; }
.ch-terminal-line.ch-t-red { color: #ff6b6b; }
.ch-terminal-line.ch-t-dim { color: #00ff4250; }
@keyframes ch-appear { from { opacity: 0; } to { opacity: 1; } }

.ch-hack-bar-wrap {
  width: 100%;
  max-width: 500px;
  background: #060f06;
  border: 1px solid #00ff4228;
  height: 8px;
  border-radius: 2px;
  overflow: hidden;
}
.ch-hack-bar {
  height: 100%;
  width: 0%;
  background: #00ff42;
  box-shadow: 0 0 8px #00ff42;
  transition: width 0.18s linear;
}

.ch-hack-result {
  text-align: center;
  font-size: 0.85rem;
  color: #b8f0b8;
  line-height: 1.9;
  min-height: 3rem;
}
.ch-hack-success {
  display: block;
  font-size: 1.05rem;
  color: #00ff42;
  letter-spacing: 4px;
  text-shadow: 0 0 18px #00ff42;
  margin-bottom: 0.25rem;
}
.ch-hack-fail {
  display: block;
  font-size: 1.05rem;
  color: #ff5555;
  letter-spacing: 4px;
  text-shadow: 0 0 18px #ff5555;
  margin-bottom: 0.25rem;
}

.ch-hack-continue {
  background: transparent;
  border: 1px solid #00ff42;
  color: #00ff42;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  padding: 0.7rem 2.5rem;
  cursor: pointer;
  letter-spacing: 3px;
  border-radius: 2px;
  transition: background 0.15s, box-shadow 0.15s;
  display: none;
}
.ch-hack-continue:hover {
  background: #00ff4215;
  box-shadow: 0 0 14px #00ff4230;
}

/* ── Game Over Screen ── */
#ch-screen-gameover {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}
.ch-go-skull {
  font-size: 3rem;
  animation: ch-go-pulse 1.5s ease-in-out infinite;
}
@keyframes ch-go-pulse {
  0%,100% { text-shadow: 0 0 10px #ff414150; }
  50%      { text-shadow: 0 0 30px #ff4141; }
}
.ch-go-title {
  font-size: 1.4rem;
  color: #ff4141;
  letter-spacing: 5px;
  text-shadow: 0 0 18px #ff4141;
}
.ch-go-code {
  font-size: 0.7rem;
  color: #00ff4250;
  letter-spacing: 4px;
}
.ch-go-stats {
  background: #060f06;
  border: 1px solid #00ff4225;
  border-radius: 3px;
  padding: 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 280px;
}
.ch-go-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #a8e8a8;
  letter-spacing: 1px;
  border-bottom: 1px solid #00ff4215;
  padding-bottom: 0.4rem;
}
.ch-go-row:last-child { border-bottom: none; padding-bottom: 0; }
.ch-go-row-label { color: #00ff4265; }
.ch-go-row-val   { color: #00ff42; }

.ch-go-btn {
  background: transparent;
  border: 1px solid #00ff42;
  color: #00ff42;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  padding: 0.7rem 2.5rem;
  cursor: pointer;
  letter-spacing: 3px;
  border-radius: 2px;
  width: 220px;
  transition: background 0.15s, box-shadow 0.15s;
}
.ch-go-btn:hover {
  background: #00ff4215;
  box-shadow: 0 0 14px #00ff4230;
}
.ch-go-exit { border-color: #ff414155; color: #ff7070; }
.ch-go-exit:hover { background: #ff000012; box-shadow: 0 0 14px #ff414130; }
