:root{
  --panel-bg: url("assets/bg-plate.png");
  --bg-y: 30%;
  --drop: 280px;
  --iconReserve: 150px; /* was 120px - only to make room for signature line under socials */

  --frame: rgba(120,255,210,.35);
  --frame2: rgba(120,255,210,.14);

  --orange: #ff9b3d;
  --blue: rgba(120,255,255,.95);
  --blueGlow: rgba(0,255,255,.22);
  --white: rgba(235,255,250,.92);

  --bg-brightness: 1.12;
  --bg-contrast: 1.06;
  /* Mobile-consistent rounding */
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 16px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; }

[hidden]{ display:none !important; }

body{
  background:#050b09;
  font-family:"Press Start 2P", monospace;
  color: var(--white);
  overflow-y:auto;
  padding: 40px 0;
}

.panel{
  width: min(980px, 92vw);
  margin: 0 auto;
  position: relative;

  padding: 34px 34px calc(var(--iconReserve) + 24px) 34px;
  border-radius: var(--r-lg);
  overflow: hidden;

  background:
    linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.52)),
    var(--panel-bg);
  background-size: cover;
  background-position: center var(--bg-y);
  background-repeat: no-repeat;

  filter: brightness(var(--bg-brightness)) contrast(var(--bg-contrast));

  box-shadow:
    0 0 0 1px rgba(120,255,210,.22),
    0 0 34px rgba(0,255,170,.14),
    inset 0 0 120px rgba(0,0,0,.72);
}

/* banner */
.banner{
  border: 2px solid var(--frame);
  background: rgba(0,0,0,.10);
  box-shadow: none;
  padding: 16px 16px 14px;
  text-align:center;
  position:relative;
  border-radius: var(--r-md);
}

.banner::before{
  content:none;
}

.banner-title{
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--orange);
  line-height: 1.05;
}

.banner-stars{
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  opacity: .95;
  color: var(--white);
}

/* ticker */
.banner-ticker{
  margin-top: 10px;
  overflow:hidden;
  white-space: nowrap;
  color: var(--white);
  opacity: .95;
  border-top: 0;
  padding-top: 10px;
}

.ticker-track{
  display:inline-flex;
  gap: 0;
  align-items:center;
  will-change: transform;
  animation: ticker 55.5s linear infinite; /* LEFT -> RIGHT */
}

.ticker-item{
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  margin-right: 6px;   /* ← THIS controls flow spacing */
}

@keyframes ticker{
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}

/* HUD */
.hud{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items:start;
}

.hud-block.right{
  justify-self: end;
  transform: translateY(6px);
}

.hud-label{
  color: var(--orange);
  letter-spacing: 2px;
  font-size: 16px;
}

.hud-value{
  margin-top: 6px;
  color: var(--white);
  letter-spacing: 1px;
  font-size: 16px;
}

.hud-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

.hud-link:hover{
  text-shadow: 0 0 6px rgba(0,255,255,.6);
}

.hud-block.right .hud-label{ text-align:right; }
.hud-block.right .hud-value{ display:block; width:100%; text-align:center; }

.hud-center{
  text-align:center;
  padding-top: 2px;
  min-width: 220px;
}

/* spacing */
.drop-zone{ height: var(--drop); }
.center{ text-align:center; }

/* ===== GAME OVER (mobile-style) ===== */
.game-over{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;

  width: max-content;
  margin: 0 auto 60px; /* spacing: GAME OVER -> first button */
  padding: 0 10px;

  font-weight: 700;
  color: var(--blue);
  letter-spacing: 1px;
  text-transform: uppercase;

  font-size: 56px;
  line-height: 1.05;

  text-shadow:
    0 0 6px rgba(100,230,255,.35),
    0 0 12px rgba(100,230,255,.15);
}

.game-over.glitch .glitch-word{
  position: relative;
  display: inline-block;
}

.game-over.glitch .glitch-word::before,
.game-over.glitch .glitch-word::after{
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: .75;
}

.game-over.glitch .glitch-word::before{
  clip-path: inset(0 0 55% 0);
  transform: translate(-2px, 0);
  animation: glitchTop 4.4s infinite steps(10);
}

.game-over.glitch .glitch-word::after{
  clip-path: inset(55% 0 0 0);
  transform: translate(2px, 0);
  animation: glitchBot 2.8s infinite steps(10);
}

.game-over.glitch-burst{
  position: relative;
}

.game-over.glitch-burst::before,
.game-over.glitch-burst::after{
  content:"";
  position:absolute;
  inset:-6px -10px;
  pointer-events:none;
  opacity:0;
  mix-blend-mode: screen;
}

.game-over.glitch-burst::before{
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.0) 0px,
    rgba(255,255,255,.0) 6px,
    rgba(255,255,255,.22) 7px
  );
  animation: burstScan 5.8s infinite;
}

.game-over.glitch-burst::after{
  background: radial-gradient(circle at 50% 50%, rgba(100,230,255,.35), rgba(0,0,0,0) 55%);
  animation: burstGlow 5.8s infinite;
}

.game-over.glitch-burst .glitch-word{
  animation: burstShake 5.8s infinite;
}

@keyframes burstScan{
  0%, 72% { opacity: 0; transform: translateY(0); }
  74%    { opacity: .55; transform: translateY(-2px); }
  76%    { opacity: 0;  transform: translateY(0); }
  83%    { opacity: .65; transform: translateY(2px); }
  85%    { opacity: 0;  transform: translateY(0); }
  100%   { opacity: 0; }
}

@keyframes burstGlow{
  0%, 72% { opacity: 0; transform: scale(1); }
  74%    { opacity: .35; transform: scale(1.02); }
  76%    { opacity: 0; transform: scale(1); }
  83%    { opacity: .45; transform: scale(1.03); }
  85%    { opacity: 0; transform: scale(1); }
  100%   { opacity: 0; }
}

@keyframes burstShake{
  0%, 72% { transform: translate(0,0) skewX(0deg); filter:none; }
  74% { transform: translate(-3px,1px) skewX(-6deg); filter: contrast(1.2) saturate(1.2); }
  75% { transform: translate(3px,-1px) skewX(6deg); }
  76% { transform: translate(0,0) skewX(0deg); filter:none; }
  83% { transform: translate(-4px,-1px) skewX(-7deg); filter: contrast(1.25) saturate(1.25); }
  84% { transform: translate(4px,1px) skewX(7deg); }
  85% { transform: translate(0,0) skewX(0deg); filter:none; }
  100% { transform: translate(0,0) skewX(0deg); }
}

@keyframes glitchTop{
  0%{ transform: translate(-2px,0); }
  10%{ transform: translate(-4px,-1px); }
  20%{ transform: translate(3px,1px); }
  30%{ transform: translate(-3px,0); }
  40%{ transform: translate(4px,-1px); }
  50%{ transform: translate(-2px,1px); }
  60%{ transform: translate(3px,0); }
  70%{ transform: translate(-4px,1px); }
  80%{ transform: translate(2px,-1px); }
  90%{ transform: translate(-3px,0); }
  100%{ transform: translate(-2px,0); }
}
@keyframes glitchBot{
  0%{ transform: translate(2px,0); }
  10%{ transform: translate(4px,1px); }
  20%{ transform: translate(-3px,-1px); }
  30%{ transform: translate(3px,0); }
  40%{ transform: translate(-4px,1px); }
  50%{ transform: translate(2px,-1px); }
  60%{ transform: translate(-3px,0); }
  70%{ transform: translate(4px,-1px); }
  80%{ transform: translate(-2px,1px); }
  90%{ transform: translate(3px,0); }
  100%{ transform: translate(2px,0); }
}

@media (prefers-reduced-motion: reduce){
  .game-over.glitch .glitch-word::before,
  .game-over.glitch .glitch-word::after,
  .game-over.glitch-burst::before,
  .game-over.glitch-burst::after,
  .game-over.glitch-burst .glitch-word{
    animation: none !important;
  }
}

/* LAUNCH ROW (original layout) */
.launch-row{
  width: min(760px, 100%);
  margin: 18px auto 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
}

.btn-launch{
  flex: 1;
  max-width: 720px;
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 20px;
  margin: 0 auto;

  padding: 22px 24px;

  text-decoration:none;
  color: var(--white);

  font-size: 20px;
  letter-spacing: 2px;

  border: 2px solid var(--frame);
  box-shadow: inset 0 0 0 1px var(--frame2);
  background: rgba(0,0,0,.18);
  border-radius: var(--r-md);

  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btn-launch:hover{ background: rgba(0,255,255,.06); }

.btn-coin{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0 16px;
}

.btn-coin-img{
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
  display:block;
}

.btn-text{ white-space: nowrap; }

/* Subcopy */
.subcopy{
  margin-top: 14px;
  margin-bottom: 22px;
}

.mmme{
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--blue);
  text-shadow: 0 0 10px rgba(0,255,255,.14);
}

.decentralized{
  margin-top: 10px;
  letter-spacing: 2px;
  font-size: 13px;
  color: var(--white);
}

/* SOUND toggle */
.sound-toggle{
  margin-top: 16px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  color: var(--white);
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.sound-yes, .sound-no{ display:inline-block; }

.sound-toggle:not(.locked) .sound-yes{ animation: yesWig 2.4s infinite steps(1); }
.sound-toggle:not(.locked) .sound-no{  animation: noWig 2.4s infinite steps(1); }

@keyframes yesWig{
  0%, 49%  { color: var(--orange); }
  50%,100% { color: var(--white); }
}
@keyframes noWig{
  0%, 49%  { color: var(--white); }
  50%,100% { color: var(--orange); }
}

.sound-toggle.locked .sound-yes,
.sound-toggle.locked .sound-no{ animation: none !important; }

.sound-toggle.on .sound-yes{ color: var(--orange); }
.sound-toggle.on .sound-no { color: var(--white); }
.sound-toggle.off .sound-yes{ color: var(--white); }
.sound-toggle.off .sound-no { color: var(--orange); }

/* Automation (Accordion like mobile) */
.automation{
  margin-top: 0; /* keep vertical spacing driven by .launch-row like other buttons */
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.automation .btn-launch{
  width: 100%;
}

.auto-toggle{
  /* keep the exact same frame as other .btn-launch buttons */
  font-family: "Press Start 2P", monospace;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;

  /* subtle green tint (doesn't change border color) */
  box-shadow: inset 0 0 0 1px var(--frame2), inset 0 0 18px rgba(120,255,210,.08);
  background: rgba(0,0,0,.18);
}

/* Desktop: coin | centered text | coin */
/* Desktop: coin + text + coin (tight, tapered) */
.btn-launch.auto-toggle{
  justify-content: center;
  gap: 18px; /* space between coin <-> text */
}

.btn-launch.auto-toggle .coin{
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}

.btn-launch.auto-toggle .auto-toggle-label{
  flex: 0 0 auto;      /* do NOT stretch */
  text-align: center;
  white-space: nowrap;
  text-transform: none !important; /* show "Automations" exactly */
  color: var(--white);
}

.auto-toggle:hover{
  background: rgba(120,255,210,.06);
}

.auto-box{
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px 20px;

  border: 2px solid var(--frame);
  box-shadow: inset 0 0 0 1px var(--frame2);
  background: rgba(0,0,0,.18);
  border-radius: var(--r-md);

  font-family: "Press Start 2P", monospace;
}

.auto-box:not([hidden]){
  display:block;
  margin-top: 14px; /* space below AUTOMATIONS button */
}
/* Terminal output */
.auto-term{
  margin: 0;
  width: 100%;
  white-space: pre;
  line-height: 1.35;
  letter-spacing: 2px;
  font-size: 16px; /* smaller again */
  color: var(--white);
  min-height: 5.6em; /* fits 4 lines at this size */
  font-family: "Press Start 2P", monospace;
  text-align: center;
}

/* hide fallback UL list so old text never leaks */
.auto-box .col{ display:none !important; }
.auto-box .col li{ display:none !important; }

.cursor{
  display:inline-block;
  vertical-align: baseline;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.cursor.blink{
  animation: cursorBlink 1.6s steps(2, end) infinite;
}
@keyframes cursorBlink{
  0%,49%{ opacity: 1; }
  50%,100%{ opacity: 0; }
}


/* FOOTER STACK (socials + signature) */
.footer-stack{
  position:absolute;
  left:0; right:0;
  bottom: 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
}

.footer-row{
  display:flex;
  justify-content:center;
  gap: 12px;
}

.footbtn{
  border: 2px solid var(--frame);
  box-shadow:
    inset 0 0 0 1px var(--frame2),
    0 0 18px rgba(0,255,255,.06);
  background: rgba(0,0,0,.16);
  text-decoration:none;
  color: var(--white);
  padding: 10px 12px;
  border-radius: var(--r-md);
  display:grid;
  place-items:center;
  transition: transform .12s ease, background .12s ease;
}

.footbtn:hover{
  transform: translateY(-1px);
  background: rgba(0,255,255,.06);
}

.footicon{
  font-size: 10px;
  letter-spacing: 1px;
}

.footer-legal{
  width: 100%;
  text-align:center;
  font-size: 10px;
  letter-spacing: 2px;
  opacity: .75;
  line-height: 1.2;
}

/* Mobile tweaks */
@media (max-width: 680px){
  body{ padding: 18px 0; }

  .panel{
    padding: 20px 14px calc(var(--iconReserve) + 18px) 14px;
  }

  .banner-title{ font-size: 14px; }
  .banner-stars, .ticker-item{ font-size: 10px; }
  .ticker-track{ animation-duration: 44s; }

  .hud{
    grid-template-columns: 1fr;
    text-align:center;
  }
  .hud-block.right{ justify-self:center; transform:none; }
  .hud-center{ min-width: unset; }

  :root{ --drop: 140px; }
  .game-over{ font-size: 34px; }

  .launch-row{ width: 100%; gap: 10px; }

  .btn-launch{
    font-size: 24px;
    padding: 16px 12px;
    gap: 12px;
  }

  .btn-coin-img{ width: 22px; height: 22px; }

    .auto-toggle{
  /* sizing + visuals come from .btn-launch */
  font-family: "Press Start 2P", monospace;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border: 0;


  /* give Automations its own green vibe */
  background: rgba(120,255,210,.06);
  box-shadow: inset 0 0 0 1px rgba(120,255,210,.25);
}

.auto-toggle:hover{
  background: rgba(120,255,210,.10);
}
