:root{
  --bg:#040506;
  --green:#22ff88;
  --amber:#ffcc66;
  --red:#ff3b4e;
  --line:rgba(34,255,136,.16);

  --glow:
    0 0 10px rgba(34,255,136,.45),
    0 0 26px rgba(34,255,136,.22),
    0 0 60px rgba(34,255,136,.10);

  --glowSoft:
    0 0 8px rgba(34,255,136,.22),
    0 0 18px rgba(34,255,136,.10);

  --shadow:0 18px 60px rgba(0,0,0,.55);
  --mono:"Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(900px 600px at 50% 18%, rgba(34,255,136,.06), transparent 68%),
    radial-gradient(900px 700px at 50% 85%, rgba(34,255,136,.04), transparent 70%),
    var(--bg);
  color:var(--green);
  font-family:var(--mono);
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

.wrap{
  width:min(1100px, 96vw);
  margin:0 auto;
  padding:18px 0 28px;
  display:grid;
  gap:16px;
}

/* ad slots */
.ad-slot{
  border:1px dashed rgba(57,255,154,.18);
  border-radius:14px;
  background:rgba(10,12,16,.35);
  height:88px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:rgba(57,255,154,.35);
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  user-select:none;
}

.ad-slot small{
  opacity:.7;
}

/* header */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border:1px solid rgba(34,255,136,.10);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(5,8,8,.72), rgba(5,8,8,.28));
  box-shadow:var(--shadow);
}

.brand{
  display:flex;
  flex-direction:column;
  gap:4px;
  cursor:pointer;
}

.brand .title{
  font-size:20px;
  letter-spacing:.34em;
  text-transform:uppercase;
  text-shadow:var(--glowSoft);
}

.brand .sub{
  font-size:10px;
  letter-spacing:.30em;
  text-transform:uppercase;
  color:rgba(34,255,136,.52);
}

.right-controls{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.pill{
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(8,9,12,.45);
  font-size:12px;
  color:rgba(57,255,154,.75);
}

.toggle{
  display:inline-flex;
  gap:8px;
  align-items:center;
  cursor:pointer;
  user-select:none;
}

.switch{
  width:44px;
  height:24px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(57,255,154,.12);
  position:relative;
}

.knob{
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:rgba(57,255,154,.85);
  box-shadow:0 0 14px rgba(57,255,154,.35);
  transition:transform .18s ease;
}

.switch.on .knob{
  transform:translateX(20px);
}

/* main layout */
main{
  width:100%;
  display:flex;
  justify-content:center;
}

.game-wrapper{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

/* cards */
.card{
  border:1px solid rgba(57,255,154,.10);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(0,0,0,.22), rgba(9,10,14,.35));
  box-shadow:var(--shadow);
  overflow:hidden;
}

.card.game{
  width:100%;
  max-width:440px;
  height:720px;
  overflow:hidden;
  position:relative;
  border:1px solid rgba(34,255,136,.12);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(2,6,6,.88), rgba(3,7,7,.60));
  box-shadow:
    0 0 0 1px rgba(34,255,136,.04) inset,
    0 18px 60px rgba(0,0,0,.55);
}

.game{
  padding:24px 18px 22px;
  display:flex;
  flex-direction:column;
  gap:18px;
  position:relative;
}

/* top micro badges */
.micro{
  position:absolute;
  top:18px;
  right:18px;
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(57,255,154,.55);
  display:flex;
  gap:6px;
  align-items:center;
}

.badge{
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(34,255,136,.14);
  background:rgba(0,0,0,.18);
}

.badge.warn{
  border-color:rgba(255,204,102,.28);
  color:rgba(255,204,102,.85);
}

.badge.danger{
  border-color:rgba(255,59,78,.28);
  color:rgba(255,59,78,.85);
}

/* objective */
.objective{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:14px;
  border:1px solid rgba(34,255,136,.13);
  border-radius:16px;
  background:rgba(0,0,0,.16);
  margin-top:4px;
}

.objective .o1{
  letter-spacing:.18em;
  text-transform:uppercase;
  font-size:13px;
  line-height:1.3;
  color:rgba(57,255,154,.9);
}

.objective .o2{
  font-size:11px;
  color:rgba(34,255,136,.64);
  letter-spacing:.08em;
  line-height:1.5;
}

/* stats */
.stats{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:12px 0 16px;
  border-bottom:1px solid rgba(34,255,136,.10);
  border-top:1px solid rgba(34,255,136,.08);
}

.stat{
  padding:0;
  border:none;
  background:transparent;
  text-align:center;
  flex:1;
}

.stat .k{
  font-size:10px;
  letter-spacing:.30em;
  text-transform:uppercase;
  opacity:.48;
  margin-bottom:10px;
  line-height:1.2;
}

.stat .v{
  font-size:20px;
  letter-spacing:.08em;
  text-shadow:0 0 18px rgba(34,255,136,.18);
}

/* center */
.center{
  display:grid;
  place-items:center;
  gap:14px;
  padding:8px 0 2px;
  position:relative;
}

.big{
  font-size:118px;
  line-height:1;
  letter-spacing:.06em;
  text-shadow:
    0 0 12px rgba(34,255,136,.55),
    0 0 34px rgba(34,255,136,.32),
    0 0 82px rgba(34,255,136,.14);
  filter:drop-shadow(0 0 22px rgba(34,255,136,.18));
}

.brand .title{
  text-shadow:
    0 0 10px rgba(34,255,136,.25),
    0 0 30px rgba(34,255,136,.22);
}

.dangerbar{
  width:92%;
  height:5px;
  border-radius:999px;
  border:1px solid rgba(34,255,136,.12);
  overflow:hidden;
  background:rgba(34,255,136,.04);
  position:relative;
}

.dangerfill{
  height:100%;
  width:0%;
  background:linear-gradient(90deg, rgba(57,255,154,.45), rgba(255,204,102,.65), rgba(255,59,78,.75));
  filter:saturate(1.15);
  box-shadow:0 0 18px rgba(255,204,102,.18);
  transition:width .18s ease;
}

.hintline{
  font-size:11px;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:rgba(34,255,136,.46);
  user-select:none;
}

/* buttons */
.btnrow{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  padding-top:6px;
}

.btn{
  position:relative;
  overflow:hidden;
  isolation:isolate;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:140px;
  padding:14px 18px;
  border-radius:14px;
  border:1px solid rgba(34,255,136,.22);
  background:rgba(0,0,0,.14);

  color:rgba(34,255,136,.92);
  font-family:var(--mono);
  letter-spacing:.22em;
  text-transform:uppercase;
  font-size:13px;

  cursor:pointer;
  user-select:none;

  transition:transform .08s ease, filter .18s ease, opacity .18s ease;

  z-index:0;

  text-shadow:0 0 8px rgba(34,255,136,.2);
}
.btn::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:16px;
  background:conic-gradient(
    from 0deg,
    transparent,
    rgba(34,255,136,0.8),
    transparent 30%
  );
  opacity:0;
  transition:opacity .2s;
  z-index:0;
}

.btn::after{
  content:"";
  position:absolute;
  inset:2px;
  border-radius:12px;
  background:rgba(0,0,0,0.82);
  z-index:1;
  pointer-events:none;
}

.btn:hover::before{
  opacity:1;
  animation:neonRotate 1.2s linear infinite;
}

.btn .ring{
  position:absolute;
  z-index:3;
}

.btn:hover{
  filter:brightness(1.07);
}

.btn:active{
  transform:scale(.98);
}

.btn[disabled]{
  cursor:not-allowed;
  opacity:.55;
  filter:saturate(.85);
}
.btn::after{
  display:none;
}

#mainBtn{
  min-width:180px;
  padding:16px 18px;
  font-size:16px;
  letter-spacing:.28em;
  border:1px solid rgba(34,255,136,.38);
}

.ring{
  position:absolute;
  inset:-10px;
  border-radius:16px;
  border:1px solid rgba(57,255,154,.28);
  opacity:0;
  transform:scale(.92);
  pointer-events:none;
}

.btn.ring1 .ring{
  animation:ring 520ms ease-out 0ms 1;
}

.btn.ring2 .ring{
  animation:ring 520ms ease-out 120ms 1;
}

@keyframes ring{
  0%{ opacity:0; transform:scale(.92); }
  15%{ opacity:.35; }
  100%{ opacity:0; transform:scale(1.06); }
}

/* vignette / effects */
.vignette{
  pointer-events:none;
  position:absolute;
  inset:0;
  opacity:0;
  background:radial-gradient(70% 60% at 50% 40%, transparent 35%, rgba(0,0,0,.58) 90%);
  transition:opacity .18s ease;
}

.vignette.on{
  opacity:.55;
}

.panic .big{
  animation:heartbeat 1s ease-in-out infinite;
}

.danger .big{
  animation:heartbeat 1.3s ease-in-out infinite;
}

@keyframes heartbeat{
  0%,100%{ transform:scale(1); }
  45%{ transform:scale(1.02); }
  60%{ transform:scale(.996); }
}

.flash{
  position:absolute;
  inset:0;
  background:rgba(57,255,154,.08);
  opacity:0;
  pointer-events:none;
}

.flash.on{
  animation:flash 120ms ease-out 1;
}

@keyframes flash{
  0%{ opacity:0; }
  35%{ opacity:1; }
  100%{ opacity:0; }
}

.gold{
  color:#ffd37a;
  text-shadow:0 0 16px rgba(255,211,122,.25);
}

.red{
  color:rgba(255,59,78,.9);
  text-shadow:0 0 18px rgba(255,59,78,.20);
}

/* overlays */
.overlay{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:20;

  background:rgba(0, 0, 0, 0.88);
  backdrop-filter:blur(4px);
}

.overlay.show{
  display:flex;
}

.overbox{
  width:min(520px, 96%);
  border:1px solid rgba(57,255,154,.22);
  border-radius:18px;
  background:rgba(0,0,0,.78);
  padding:22px 18px;
  text-align:center;
  box-shadow:var(--shadow);
}

.overbox h2{
  margin:0 0 8px;
  letter-spacing:.28em;
  text-transform:uppercase;
  font-size:18px;
  color:rgba(57,255,154,.9);
}

.overbox .sub{
  color:rgba(57,255,154,.62);
  letter-spacing:.10em;
  font-size:12px;
  margin-bottom:12px;
}

.overbox .bigscore{
  font-size:26px;
  letter-spacing:.12em;
  text-shadow:var(--glowSoft);
  margin:10px 0 8px;
}

.overbox .meta{
  display:grid;
  gap:6px;
  font-size:12px;
  color:rgba(57,255,154,.65);
  letter-spacing:.08em;
  margin:10px 0 14px;
}

/* leaderboard modal */
.lbOverlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.72);
  padding:16px;
  z-index:999;
}

.lbOverlay.show{
  display:flex;
}

.lbBox{
  width:min(520px, 96vw);
  max-height:90vh;
  overflow:auto;
  border:1px solid rgba(57,255,154,.22);
  border-radius:18px;
  background:rgba(0,0,0,.45);
  box-shadow:var(--shadow);
  padding:14px;
}

.lbHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 6px 12px;
}

.lbHead h3{
  margin:0;
  letter-spacing:.28em;
  text-transform:uppercase;
  font-size:12px;
  color:rgba(57,255,154,.75);
}

.lbClose{
  min-width:auto;
  padding:10px 12px;
}

.nameRow{
  display:flex;
  gap:10px;
  align-items:center;
  padding:0 6px 12px;
}

.nameRow input{
  flex:1;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(57,255,154,.18);
  background:rgba(0,0,0,.18);
  color:rgba(57,255,154,.9);
  outline:none;
  font-family:var(--mono);
  letter-spacing:.08em;
  font-size:12px;
}

.nameRow input::placeholder{
  color:rgba(57,255,154,.35);
}

.list{
  border:1px solid rgba(57,255,154,.14);
  border-radius:16px;
  overflow:hidden;
  background:rgba(0,0,0,.18);
  margin:0 6px 10px;
}

.row{
  display:grid;
  grid-template-columns:36px 1fr 72px;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(57,255,154,.10);
  align-items:center;
  font-size:12px;
  letter-spacing:.06em;
  color:rgba(57,255,154,.78);
}

.row:last-child{
  border-bottom:none;
}

.row .rk{
  color:rgba(57,255,154,.55);
}

.row .nm{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.row .sc{
  text-align:right;
  text-shadow:var(--glowSoft);
}

.row.me{
  background:rgba(57,255,154,.08);
  color:rgba(57,255,154,.95);
  border-bottom-color:rgba(57,255,154,.18);
}

.lbFoot{
  font-size:11px;
  color:rgba(57,255,154,.45);
  letter-spacing:.08em;
  line-height:1.5;
  padding:0 6px 6px;
}

/* content block */
.content-block{
  width:min(760px, 92vw);
  margin:34px auto 0;
  padding:28px 24px;
  border:1px solid rgba(34,255,136,.10);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(0,0,0,.18), rgba(8,10,12,.28));
  box-shadow:var(--shadow);
}

.content-block h2{
  margin:0 0 14px;
  font-size:18px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:rgba(57,255,154,.92);
}

.content-block h2:not(:first-child){
  margin-top:28px;
}

.content-block p{
  margin:0 0 14px;
  font-size:14px;
  line-height:1.85;
  color:rgba(34,255,136,.70);
}

/* toast */
.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:14px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(57,255,154,.22);
  background:rgba(0,0,0,.52);
  color:rgba(57,255,154,.85);
  letter-spacing:.10em;
  font-size:12px;
  box-shadow:var(--shadow);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  z-index:1000;
}

.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(-4px);
}

footer{
  display:flex;
  justify-content:center;
  color:rgba(57,255,154,.35);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  padding:6px 0 2px;
  user-select:none;
}

/* responsive */
@media (max-width:640px)
{
  .card.game{
    max-width:410px;
    height:690px;
  }

  .big{
    font-size:96px;
  }

  #mainBtn{
    min-width:168px;
    font-size:15px;
  }

  .content-block{
    width:min(94vw, 760px);
    padding:20px 16px;
  }

  .content-block p{
    font-size:13px;
    line-height:1.7;
  }
}
/* ===== BOTONES: NEON HOVER GIRANDO ===== */

.btn{
  position:relative;
  overflow:hidden;
}

.btn::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:16px;
  background:conic-gradient(
    from 0deg,
    transparent,
    rgba(34,255,136,0.8),
    transparent 30%
  );
  opacity:0;
  transition:opacity .2s;
}

.btn::after{
  content:"";
  position:absolute;
  inset:2px;
  border-radius:12px;
  background:rgba(0,0,0,0.9);
  z-index:1;
}

.btn > *{
  position:relative;
  z-index:2;
}

.btn:hover::before{
  opacity:1;
  animation:neonRotate 1.2s linear infinite;
}

@keyframes neonRotate{
  from{
    transform:rotate(0deg);
  }
  to{
    transform:rotate(360deg);
  }
}

/* ===== SCORE REACTIVE GLOW ===== */

:root{
  --score-glow-a: 0.18;
  --score-glow-b: 0.10;
  --score-glow-c: 0.04;
  --score-pulse-scale: 1.015;
  --score-pulse-speed: 1.8s;
}

.big.score-reactive{
  text-shadow:
    0 0 12px rgba(34,255,136,var(--score-glow-a)),
    0 0 34px rgba(34,255,136,var(--score-glow-b)),
    0 0 82px rgba(34,255,136,var(--score-glow-c));
  animation:scorePulse var(--score-pulse-speed) ease-in-out infinite;
  will-change:transform, text-shadow, filter;
}

@keyframes scorePulse{
  0%, 100%{
    transform:scale(1);
    filter:drop-shadow(0 0 10px rgba(34,255,136,0.08));
  }
  50%{
    transform:scale(var(--score-pulse-scale));
    filter:drop-shadow(0 0 18px rgba(34,255,136,0.18));
  }
}
@keyframes scorePulse{
  0%, 100%{
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(34,255,136,0.08));
  }
  50%{
    transform: scale(var(--score-pulse-scale));
    filter: drop-shadow(0 0 18px rgba(34,255,136,0.18));
  }
}
.btn .label{
  position:relative;
  z-index:2;
}

.btn .ring{
  position:absolute;
  z-index:3;
}
  
