:root {
  --bg: #0a0d26;
  --panel: rgba(16, 20, 58, 0.82);
  --line: rgba(160, 180, 255, 0.16);
  --text: #f2f4ff;
  --muted: #9aa3d6;
  --pink: #ff4d6d;
  --cyan: #2ee6ff;
  --yellow: #ffd23f;
  --green: #5be37a;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none;
}
canvas#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

button {
  font: inherit; font-weight: 800; color: var(--text);
  background: #2a3170; border: 0; border-radius: 14px;
  padding: 12px 16px; cursor: pointer;
  box-shadow: 0 4px 0 #161a45; transition: transform .08s, filter .15s;
}
button:hover { filter: brightness(1.15); }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 #161a45; }
button.ghost { background: transparent; box-shadow: none; border: 2px solid var(--line); }
input {
  font: inherit; font-weight: 800; color: var(--text);
  background: rgba(0, 0, 0, .3); border: 2px solid var(--line); border-radius: 12px;
  padding: 10px 12px; outline: none; width: 100%;
  user-select: text; -webkit-user-select: text;
}
input:focus { border-color: var(--cyan); }
kbd { background: rgba(255,255,255,.1); border-radius: 5px; padding: 1px 6px; font-family: inherit; font-size: .9em; }

/* ---------- Menú ---------- */
.screen {
  position: fixed; inset: 0; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 35%, rgba(10,13,38,.55), rgba(10,13,38,.9) 70%);
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(24px, env(safe-area-inset-top)) 16px 32px;
  touch-action: pan-y;
}
.menuInner { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.logo {
  margin: 8px 0 0; text-align: center; line-height: .9;
  font-size: clamp(56px, 14vw, 104px); font-weight: 900; letter-spacing: -2px;
  color: var(--yellow);
  text-shadow: 0 6px 0 #c2410c, 0 12px 30px rgba(255, 77, 109, .45);
  transform: rotate(-3deg);
}
.logo .o { color: var(--pink); text-shadow: 0 6px 0 #8a1030, 0 12px 30px rgba(255, 77, 109, .6); display: inline-block; animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: rotate(0) scale(1); } 50% { transform: rotate(12deg) scale(1.08); } }
.tag { text-align: center; margin: 0 0 4px; color: var(--muted); font-weight: 700; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: .5px; text-transform: uppercase; color: var(--cyan); }
.profile { display: flex; gap: 14px; align-items: center; }
#skinPreview { width: 96px; height: 96px; flex: none; }
.profileRight { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lvlRow { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.xpbar { height: 12px; background: rgba(0,0,0,.35); border-radius: 99px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width .9s cubic-bezier(.2,.9,.3,1); }
#skinName { font-size: 13px; font-weight: 700; }

.skins { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.skin { position: relative; padding: 4px; background: rgba(255,255,255,.05); border-radius: 12px; box-shadow: none; border: 2px solid transparent; }
.skin canvas { width: 100%; aspect-ratio: 1; display: block; }
.skin.sel { border-color: var(--yellow); background: rgba(255, 210, 63, .12); }
.skin.locked canvas { filter: grayscale(1) brightness(.45); }
.skin .lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px #000; }

button.big {
  font-size: 30px; padding: 16px; border-radius: 18px; letter-spacing: 2px;
  background: linear-gradient(180deg, #ff6b85, var(--pink));
  box-shadow: 0 6px 0 #a3163a, 0 14px 30px rgba(255,77,109,.35);
}
button.big:active { box-shadow: 0 2px 0 #a3163a; transform: translateY(4px); }
button.big.alt { font-size: 20px; background: linear-gradient(180deg, #4ff0ff, #19b8d6); color: #062033; box-shadow: 0 6px 0 #0d6f82; }
.row { display: flex; gap: 8px; align-items: center; }
.friends > button { flex: 1; }
.codeBox { display: flex; gap: 6px; flex: 1; }
.codeBox input { text-transform: uppercase; text-align: center; letter-spacing: 3px; min-width: 0; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#missions, #top { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 700; }
#missions li { display: flex; flex-direction: column; gap: 4px; }
#missions li .mrow { display: flex; justify-content: space-between; gap: 6px; }
#missions li .xp { color: var(--yellow); white-space: nowrap; }
#missions li.done { opacity: .55; }
#missions li.done .mtxt::before { content: "✅ "; }
#missions .mbar { height: 5px; background: rgba(0,0,0,.35); border-radius: 9px; overflow: hidden; }
#missions .mbar i { display: block; height: 100%; background: var(--yellow); }
#top li { display: flex; justify-content: space-between; gap: 6px; }
#top li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#top li b { color: var(--yellow); }
#top .empty { color: var(--muted); font-weight: 600; }
.online { text-align: center; margin: 0; font-weight: 800; color: var(--green); min-height: 1.2em; }
.help { text-align: center; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button { pointer-events: auto; }
#timer {
  position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  font-size: 34px; font-weight: 900; padding: 4px 18px; border-radius: 14px;
  background: rgba(10,13,38,.55); text-shadow: 0 3px 0 rgba(0,0,0,.4);
}
#timer.small { font-size: 18px; padding: 8px 14px; }
#timer.urgent { color: var(--pink); animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: translateX(-50%) scale(1.12); } }

#board {
  position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; min-width: 180px; max-width: 42vw;
  background: rgba(10,13,38,.6); border-radius: 14px; padding: 8px 10px; font-size: 14px; font-weight: 800;
}
#board .r { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
#board .r .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#board .r .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
#board .r .s { color: var(--yellow); min-width: 18px; text-align: right; }
#board .r.me { color: var(--yellow); }
#board .r.me .n::after { content: " (" attr(data-you) ")"; color: var(--muted); font-weight: 700; }
#board .sep { border-top: 1px dashed var(--line); margin: 4px 0; }

#topLeft { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 40vw; }
.icon { width: 40px; height: 40px; padding: 0; font-size: 17px; border-radius: 12px; background: rgba(10,13,38,.6); box-shadow: none; }
#roomTag { pointer-events: auto; display: flex; gap: 8px; align-items: center; background: rgba(10,13,38,.6); border-radius: 12px; padding: 4px 4px 4px 12px; font-size: 14px; font-weight: 800; }
#roomTag b { color: var(--cyan); letter-spacing: 2px; }
#roomTag button { padding: 7px 10px; font-size: 13px; border-radius: 9px; background: var(--cyan); color: #062033; box-shadow: none; }
#ping { font-size: 12px; color: var(--muted); font-weight: 700; }

#feed { position: absolute; top: 64px; left: 10px; display: flex; flex-direction: column; gap: 4px; max-width: 46vw; }
#feed .f {
  background: rgba(10,13,38,.6); border-radius: 10px; padding: 5px 10px; font-size: 13px; font-weight: 800;
  animation: feedIn .25s ease-out; transition: opacity .4s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#feed .f.me { background: rgba(255, 210, 63, .22); }
#feed .f.fade { opacity: 0; }
@keyframes feedIn { from { transform: translateX(-20px); opacity: 0; } }

#announce {
  position: absolute; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none;
}
#announce .a { display: inline-block; animation: pop 1.3s cubic-bezier(.2,1.6,.4,1) forwards; }
#announce .a .t { display: block; font-size: clamp(40px, 9vw, 84px); font-weight: 900; color: var(--yellow); text-shadow: 0 5px 0 #b45309, 0 10px 30px rgba(0,0,0,.5); letter-spacing: -1px; }
#announce .a.red .t { color: var(--pink); text-shadow: 0 5px 0 #8a1030, 0 10px 30px rgba(0,0,0,.5); }
#announce .a.cyan .t { color: var(--cyan); text-shadow: 0 5px 0 #0d6f82, 0 10px 30px rgba(0,0,0,.5); }
#announce .a .s { display: block; margin-top: 6px; font-size: clamp(15px, 3vw, 22px); font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
@keyframes pop {
  0% { transform: scale(.3); opacity: 0; }
  15% { transform: scale(1.1); opacity: 1; }
  25% { transform: scale(1); }
  80% { opacity: 1; }
  100% { transform: scale(1.04) translateY(-14px); opacity: 0; }
}

#respawn {
  position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); text-align: center;
  background: rgba(10,13,38,.75); padding: 12px 22px; border-radius: 16px; animation: feedIn .2s;
}
#respawn b { display: block; font-size: 30px; color: var(--pink); }
#respawn span { font-weight: 800; color: var(--muted); }

#emoBar { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
#emoBar button { pointer-events: auto; width: 44px; height: 44px; padding: 0; font-size: 20px; background: rgba(10,13,38,.55); box-shadow: none; border-radius: 50%; }
#dashBtn {
  position: absolute; right: max(22px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom));
  width: 104px; height: 104px; border-radius: 50%; font-size: 24px; pointer-events: auto;
  background: radial-gradient(circle at 35% 30%, #ff8aa0, var(--pink)); box-shadow: 0 6px 0 #a3163a, 0 0 0 6px rgba(255,255,255,.08);
  touch-action: none;
}
#dashBtn.cd { filter: grayscale(.8) brightness(.7); }
#practice {
  position: absolute; bottom: max(70px, calc(env(safe-area-inset-bottom) + 64px)); left: 50%; transform: translateX(-50%);
  background: rgba(10,13,38,.7); border-radius: 10px; padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap;
}

/* ---------- Resultados ---------- */
#results { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(6,8,26,.45); padding: 16px; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; } }
.resCard {
  width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px; text-align: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: rise .45s cubic-bezier(.2,1.4,.4,1);
}
@keyframes rise { from { transform: translateY(40px) scale(.9); opacity: 0; } }
.resCard h2 { margin: 0; font-size: 30px; font-weight: 900; color: var(--yellow); }
#podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; height: 150px; }
#podium .pl { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
#podium .pl canvas { width: 44px; height: 44px; }
#podium .pl .nm { font-size: 13px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#podium .pl .bar { width: 100%; border-radius: 10px 10px 0 0; display: grid; place-items: center; font-size: 22px; font-weight: 900; color: #10132e; }
#podium .p1 .bar { height: 70px; background: var(--yellow); }
#podium .p2 .bar { height: 50px; background: #cfd6ff; }
#podium .p3 .bar { height: 36px; background: #f0a46b; }
#podium .pl.me .nm { color: var(--yellow); }
#resLine { margin: 0; font-weight: 800; font-size: 17px; }
#resXp { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.gain { color: var(--green); }
#resUnlock:empty { display: none; }
#resUnlock { background: rgba(255,210,63,.14); border: 1px solid rgba(255,210,63,.4); border-radius: 12px; padding: 8px 10px; font-weight: 800; text-align: center; color: var(--yellow); animation: pop2 .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop2 { from { transform: scale(.5); opacity: 0; } }
#resNext { margin: 0; font-weight: 700; }
.resCard .row button { flex: 1; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; z-index: 10; }
.toast { background: #1c2260; border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: feedIn .25s; transition: opacity .4s; text-align: center; }
.toast.good { background: #14532d; border-color: #22c55e; }
.toast.fade { opacity: 0; }

@media (max-width: 560px) {
  .skins { grid-template-columns: repeat(8, 1fr); gap: 4px; }
  .cols { grid-template-columns: 1fr; }
  .friends { flex-direction: column; align-items: stretch; }
  #timer { font-size: 26px; padding: 2px 12px; }
  #timer.small { font-size: 14px; padding: 6px 10px; }
  #board { top: calc(max(10px, env(safe-area-inset-top)) + 50px); font-size: 12px; min-width: 0; max-width: 48vw; padding: 6px 8px; }
  #board .r { gap: 5px; }
  #topLeft { max-width: 48vw; gap: 6px; }
  .icon { width: 34px; height: 34px; font-size: 15px; }
  #roomTag { font-size: 12px; padding: 3px 3px 3px 8px; gap: 6px; }
  #roomTag b { letter-spacing: 1px; }
  #roomTag button { padding: 5px 8px; font-size: 12px; }
  #feed { top: calc(max(10px, env(safe-area-inset-top)) + 92px); max-width: 48vw; }
  #feed .f { font-size: 11px; }
  #practice { white-space: normal; width: 80vw; text-align: center; }
}
@media (hover: none) and (pointer: coarse) {
  .help { display: none; }
  /* encima del botón de embestir, a la derecha (el pulgar izquierdo mueve) */
  #emoBar { left: auto; right: max(22px, env(safe-area-inset-right)); bottom: calc(max(26px, env(safe-area-inset-bottom)) + 116px); transform: none; }
  #emoBar button { width: 40px; height: 40px; font-size: 18px; }
}

/* ---------- Ranking, ligas y salas ---------- */
.cardHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cardHead h3 { margin: 0; }
.note { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.4; }
button.small { padding: 7px 11px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 #161a45; }
button.wide { width: 100%; margin-top: 8px; padding: 9px; font-size: 14px; }

.tabs { display: flex; background: rgba(0,0,0,.3); border-radius: 11px; padding: 3px; gap: 2px; }
.tabs button { padding: 6px 11px; font-size: 13px; border-radius: 8px; background: transparent; box-shadow: none; color: var(--muted); }
.tabs button.on { background: var(--cyan); color: #062033; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 99px; font-size: 13px; font-weight: 900; color: #10132e; background: var(--lg, #d08a52); }
.badge::before { content: ""; width: 9px; height: 11px; background: rgba(16,19,46,.55); clip-path: polygon(50% 0, 100% 22%, 100% 62%, 50% 100%, 0 62%, 0 22%); }
.leagueBox { display: flex; flex-direction: column; gap: 3px; }
.leagueRow { display: flex; align-items: center; gap: 8px; font-size: 15px; flex-wrap: wrap; }
.leagueRow b { font-size: 17px; }
.hint { font-size: 12.5px; font-weight: 700; color: var(--yellow); line-height: 1.35; }

ol.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
ol.rank li { display: grid; grid-template-columns: 38px 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-weight: 800; font-size: 14px; background: rgba(255,255,255,.03); }
ol.rank li .pos { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
ol.rank li:nth-child(1) .pos { color: #ffd23f; }
ol.rank li:nth-child(2) .pos { color: #dfe6ff; }
ol.rank li:nth-child(3) .pos { color: #f0a46b; }
ol.rank li .pip { width: 11px; height: 13px; background: var(--lg); clip-path: polygon(50% 0, 100% 22%, 100% 62%, 50% 100%, 0 62%, 0 22%); }
ol.rank li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.rank li .nm small { color: var(--muted); font-weight: 700; margin-left: 4px; }
ol.rank li .v { color: var(--yellow); font-variant-numeric: tabular-nums; white-space: nowrap; }
ol.rank li.me { background: rgba(255,210,63,.16); outline: 1px solid rgba(255,210,63,.45); }
ol.rank li.sep { background: none; display: block; text-align: center; color: var(--muted); padding: 0; font-size: 12px; line-height: 1; }
ol.rank li.empty { display: block; color: var(--muted); font-weight: 600; background: none; }

ul.rooms { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.rooms li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); }
ul.rooms li .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
ul.rooms li .t { font-weight: 900; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
ul.rooms li .t b { color: var(--cyan); letter-spacing: 2px; }
ul.rooms li .s { font-size: 12.5px; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.rooms li .cap { display: flex; gap: 2px; }
ul.rooms li .cap i { width: 7px; height: 12px; border-radius: 2px; background: rgba(255,255,255,.14); }
ul.rooms li .cap i.on { background: var(--green); }
ul.rooms li button { padding: 8px 14px; font-size: 14px; }
ul.rooms li.full { opacity: .55; }
ul.rooms li.empty { display: block; color: var(--muted); font-weight: 600; font-size: 14px; background: none; padding: 4px 0; }
.friends h4 { margin: 0 0 8px; font-size: 14px; }
.friends h4 span { font-weight: 600; font-size: 12.5px; }
.friends .row { margin-bottom: 8px; }
.friends .row > button { flex: 1; }
.chk { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; white-space: nowrap; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--cyan); }

details.account summary { cursor: pointer; font-weight: 800; font-size: 14px; color: var(--muted); list-style: none; }
details.account summary::before { content: "🔑 "; }
details.account[open] summary { margin-bottom: 8px; color: var(--text); }
details.account .row { margin-bottom: 8px; }
details.account .codeBox input { letter-spacing: 0; text-transform: none; text-align: left; font-size: 13px; }

#rankPanel { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(6,8,26,.7); padding: 16px; animation: fadeIn .2s; }
#rankPanel .panel { width: 100%; max-width: 520px; max-height: 100%; overflow-y: auto; background: #12164a; border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; touch-action: pan-y; }
#rankPanel h2 { margin: 0; font-size: 24px; color: var(--yellow); }
#rankPanel .tabs { align-self: flex-start; }

#resRank { display: flex; flex-direction: column; gap: 6px; text-align: left; background: rgba(0,0,0,.22); border-radius: 14px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
#resRank:empty { display: none; }
#resRank .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
#resRank .top b { font-size: 18px; }
#resRank .up { color: var(--green); font-weight: 900; }
#resRank .down { color: var(--pink); font-weight: 900; }
#resRank .big { font-size: 15px; font-weight: 900; color: var(--yellow); }
#resRank .m { color: var(--muted); }

#roomType { font-size: 11px; color: var(--muted); letter-spacing: 0; font-weight: 700; }
#board .r .rk { color: var(--yellow); font-size: 11px; }
#board .r .pip { width: 9px; height: 11px; flex: none; clip-path: polygon(50% 0, 100% 22%, 100% 62%, 50% 100%, 0 62%, 0 22%); }

@media (max-width: 560px) {
  ol.rank li { grid-template-columns: 30px 10px minmax(0, 1fr) auto; gap: 6px; font-size: 13px; padding: 6px; }
  .cardHead .tabs button { padding: 6px 9px; }
}
button:disabled { opacity: .5; cursor: default; filter: none; transform: none; }
.toast.bad { background: #5a1530; border-color: #ff4d6d; }
.legend { display: flex; flex-wrap: wrap; gap: 5px; }
.legend .badge { font-size: 12px; }
.legend .badge small { font-weight: 800; opacity: .75; }

#reconnect { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); text-align: center; background: rgba(10,13,38,.85); padding: 14px 22px; border-radius: 16px; border: 1px solid var(--line); animation: feedIn .2s; }
#reconnect b { display: block; font-size: 24px; color: var(--yellow); }
#reconnect span { font-weight: 800; color: var(--muted); font-size: 14px; }
#reconnect b::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; border: 3px solid var(--yellow); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkBox { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; margin-bottom: 8px; border-radius: 12px; background: rgba(46,230,255,.1); border: 1px dashed rgba(46,230,255,.5); user-select: text; -webkit-user-select: text; }
.linkBox b { font-size: 26px; letter-spacing: 3px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.linkBox span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
details.account .codeBox input { text-transform: uppercase; letter-spacing: 1px; text-align: center; font-size: 15px; }
ul.rooms li .t .badge { font-size: 11px; padding: 1px 7px 1px 5px; }

/* ---------- Versión 2: CrazyGames, idiomas, anuncios ---------- */
.nameRow { display: flex; gap: 6px; align-items: center; }
.nameRow input { flex: 1; min-width: 0; }
.nameRow input[readonly] { border-color: transparent; background: rgba(0,0,0,.18); cursor: default; }
.nameRow .icon { flex: none; width: 40px; height: 40px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; background: rgba(255,255,255,.1); }
.cgRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; }
.cgRow button.small { padding: 5px 9px; font-size: 12px; box-shadow: none; }
.foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.privacy { font-size: 12.5px; color: var(--muted); font-weight: 600; flex: 1; }
.privacy summary { cursor: pointer; list-style: none; font-weight: 800; }
.privacy summary::before { content: "🔒 "; }
.privacy p { margin: 6px 0 0; line-height: 1.45; }
.foot button.small { box-shadow: none; flex: none; }
button.adBtn { background: linear-gradient(180deg, #ffe066, #ffc21a); color: #2a1a00; box-shadow: 0 4px 0 #a06a00; }
button.adBtn .vid { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #2a1a00; color: #ffd23f; font-size: 11px; vertical-align: -3px; }
.toast.reward { background: #5a3d00; border-color: #ffd23f; animation: feedIn .25s, glow 1s ease-in-out 2 alternate; }
@keyframes glow { to { box-shadow: 0 0 28px rgba(255,210,63,.7); } }
body.noEmotes #emoBar { display: none; }
body.adBusy #results { pointer-events: none; }

.resCard { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
@media (max-height: 560px) {
  #results { padding: 10px; }
  .resCard { gap: 8px; padding: 12px 14px; }
  .resCard h2 { font-size: 24px; }
  #podium { height: 108px; }
  #podium .pl canvas { width: 34px; height: 34px; }
  #podium .p1 .bar { height: 52px; } #podium .p2 .bar { height: 38px; } #podium .p3 .bar { height: 28px; }
  #podium .pl .bar { font-size: 18px; }
}
body:has(#results:not(.hidden)) #toasts { bottom: auto; top: 12px; }

/* Logo «SHOVE PARTY» en una línea */
.logo { font-size: clamp(38px, 9.4vw, 76px); letter-spacing: -1px; white-space: nowrap; }
.logo .p2 { color: var(--cyan); text-shadow: 0 6px 0 #0d6f82, 0 12px 30px rgba(46, 230, 255, .35); }
