/* ═══════════════════════════════════════════════════════
   BTC HONEYPOT — April Fools 2026
   Fullscreen overlay: language pick → hacking sequence → reveal
   ═══════════════════════════════════════════════════════ */

.btc-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-takeover);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, 'Space Mono', monospace);
  color: #c0c0c0;
  overflow: hidden;

  /* subtle CRT curvature */
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
    z-index: 1;
  }

  /* scanline overlay */
  &::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.15) 2px,
      rgba(0,0,0,0.15) 4px
    );
    pointer-events: none;
    z-index: 2;
    animation: btc-scanline-drift 8s linear infinite;
  }
}

@keyframes btc-scanline-drift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* ── Language Picker ── */
.btc-lang {
  text-align: center;
  z-index: 10;
  animation: btc-fadein 0.6s ease-out;

  & .btc-lang__prompt {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #555;
    margin-bottom: 1.5rem;

    & span {
      color: #888;
    }
  }

  & .btc-lang__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
  }

  & .btc-lang__btn {
    background: transparent;
    border: 1px solid #333;
    color: #c0c0c0;
    font-family: var(--font-mono, monospace);
    font-size: 0.875rem;
    padding: 0.6rem 2rem;
    cursor: pointer;
    letter-spacing: 0.1em;
    transition: all 0.15s ease;

    &:hover, &:focus-visible {
      background: #c0c0c0;
      color: #000;
      border-color: #c0c0c0;
    }
  }
}

/* ── Terminal Output Area ── */
.btc-terminal {
  width: min(90vw, 620px);
  z-index: 10;
  font-size: clamp(0.65rem, 1.6vw, 0.85rem);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  animation: btc-fadein 0.3s ease-out;
}

.btc-line {
  opacity: 0;
  animation: btc-line-in 0.15s ease-out forwards;
}

@keyframes btc-line-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes btc-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Colors ── */
.btc-sys      { color: #555; }
.btc-ok       { color: #4a4; }
.btc-warn     { color: #b84; }
.btc-accent   { color: var(--accent, #e85d30); }
.btc-green    { color: #5f5; }
.btc-dim      { color: #444; }
.btc-white    { color: #eee; }
.btc-cmd      { color: #eee; font-weight: 700; }

/* ── Progress bar ── */
.btc-progress {
  display: inline;
  color: #666;
}

/* ── Success block ── */
.btc-success {
  border: 1px solid #4a4;
  padding: 0.8rem 1rem;
  margin: 0.5rem 0;
  display: inline-block;
  animation: btc-pulse-border 1.5s ease-in-out infinite;
}

@keyframes btc-pulse-border {
  0%, 100% { border-color: #4a4; }
  50%      { border-color: #6f6; }
}

/* ── Reveal text ── */
.btc-reveal {
  margin-top: 1rem;
  font-size: clamp(0.7rem, 1.8vw, 0.9rem);
}

.btc-punchline {
  color: var(--accent, #e85d30);
  font-size: clamp(0.8rem, 2.2vw, 1.1rem);
  font-weight: 700;
  margin-top: 0.5rem;
}

.btc-subtext {
  color: #555;
  font-size: clamp(0.55rem, 1.2vw, 0.7rem);
  margin-top: 1.5rem;
}

/* ── Glitch effect on reveal ── */
.btc-glitch {
  animation: btc-glitch-fx 0.4s steps(4) 3;
}

@keyframes btc-glitch-fx {
  0%   { transform: translate(0); filter: none; }
  25%  { transform: translate(-3px, 1px); filter: hue-rotate(90deg); }
  50%  { transform: translate(2px, -2px); filter: hue-rotate(180deg); }
  75%  { transform: translate(-1px, 3px); filter: hue-rotate(270deg); }
  100% { transform: translate(0); filter: none; }
}

/* ── Fade out overlay ── */
.btc-overlay--exiting {
  animation: btc-exit 1s ease-in forwards;
}

@keyframes btc-exit {
  0%   { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* ── Cursor blink for typed text ── */
.btc-cursor::after {
  content: '█';
  animation: btc-blink 0.7s step-end infinite;
  color: #c0c0c0;
}

@keyframes btc-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── Legal link (always visible) ── */
.btc-legal {
  position: fixed;
  bottom: 0.75rem;
  right: 1rem;
  z-index: 20;
  font-size: 0.6rem;
  letter-spacing: 0.05em;

  & a {
    color: #333;
    text-decoration: none;

    &:hover { color: #666; }
  }

  & span { color: #222; }
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
  .btc-terminal {
    font-size: clamp(0.85rem, 3.2vw, 1.1rem);
    padding: 1.25rem;
    line-height: 1.8;
  }
  .btc-reveal {
    font-size: clamp(0.95rem, 3.5vw, 1.2rem);
  }
  .btc-punchline {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
  }
  .btc-subtext {
    font-size: clamp(0.75rem, 2.5vw, 0.95rem);
  }
  .btc-lang__prompt {
    font-size: 0.95rem;
  }
  .btc-lang__btn {
    font-size: 1rem;
    padding: 0.8rem 2rem;
  }
}
