/* Dados, cartas que vuelan, ventanas, muelles, contador, emoticones y efectos grandes */
/* ───────── dados 3D ───────── */
#dice-stage { position: fixed; inset: 0; display: none; place-items: center; z-index: 50; background: radial-gradient(circle, rgba(0,0,0,.35), rgba(0,0,0,.55)); perspective: 900px; }
#dice-stage.show { display: grid; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.dice-row { display: flex; gap: 60px; }
.die-wrap { position: relative; width: 90px; height: 90px; }
.die { width: 90px; height: 90px; position: relative; transform-style: preserve-3d; }
.face {
  position: absolute; inset: 0; border-radius: 16px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 12px;
  background: radial-gradient(circle at 35% 30%, #fffef8, #efe3c5); border: 2px solid #c9b98f; box-shadow: inset 0 0 12px rgba(120,90,40,.3);
  backface-visibility: hidden;
}
.face span { display: grid; place-items: center; }
.face .pip::after { content: ''; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #555, #111); }
.f1 .pip::after { background: radial-gradient(circle at 35% 35%, #e65a4a, #9a1c12); width: 20px; height: 20px; }
.f1 { transform: translateZ(45px); }
.f6 { transform: rotateY(180deg) translateZ(45px); }
.f3 { transform: rotateY(90deg) translateZ(45px); }
.f4 { transform: rotateY(-90deg) translateZ(45px); }
.f2 { transform: rotateX(90deg) translateZ(45px); }
.f5 { transform: rotateX(-90deg) translateZ(45px); }
.die-shadow { position: absolute; left: 10px; right: 10px; bottom: -30px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(6px); }
.dice-sum { position: absolute; top: calc(50% + 90px); font-family: 'Cinzel', serif; font-weight: 900; font-size: 70px; color: #fff; text-shadow: 0 4px 0 #2a1c0e, 0 0 30px rgba(255,213,107,.8); opacity: 0; }
.dice-sum.pop { animation: sumPop .5s cubic-bezier(.3,1.8,.5,1) forwards; }
.dice-sum.hot { color: #ff7f6e; }
.dice-sum.seven { color: #ff3b2e; font-size: 56px; text-shadow: 0 4px 0 #2a0505, 0 0 40px rgba(255,40,30,.9); }
@keyframes sumPop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ───────── cartas volando y textos ───────── */
.flycard {
  position: fixed; left: 0; top: 0; width: 52px; height: 72px; z-index: 60; pointer-events: none; border-radius: 8px;
  background: linear-gradient(170deg, #fffaf0 0 30%, var(--rc) 30%); border: 2px solid #2a1c0e; box-shadow: 0 8px 18px rgba(0,0,0,.45), 0 0 18px rgba(255,213,107,.7);
  display: grid; place-items: center;
}
.flycard svg { width: 42px; height: 42px; margin-top: -8px; }
.floattext { position: fixed; z-index: 61; pointer-events: none; font-weight: 900; font-size: 22px; color: #fff; transform: translate(-50%, -50%);
  text-shadow: 0 2px 0 #2a1c0e, 0 0 10px var(--rc, #ffd56b); animation: floatUp 1.3s ease-out forwards; }
@keyframes floatUp { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -160%); } }

#banner { position: fixed; left: 0; right: 0; top: 40%; z-index: 55; display: flex; justify-content: center; pointer-events: none; opacity: 0; }
#banner span {
  font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(22px, 4vw, 40px); padding: 16px 40px; color: #fbeccb;
  background: linear-gradient(90deg, transparent, rgba(30,18,8,.92) 15%, rgba(30,18,8,.92) 85%, transparent); text-shadow: 0 3px 0 #000;
}
#banner.gold span { color: var(--gold2); }
#banner.bad span { color: #ff6b5c; }
#banner.show { animation: bannerIn 1.6s ease-out forwards; }
@keyframes bannerIn { 0% { opacity: 0; transform: scaleX(.3); } 15% { opacity: 1; transform: scaleX(1.05); } 25% { transform: scaleX(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

#toasts { position: fixed; right: 16px; bottom: 130px; z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: rgba(20,12,4,.92); color: #fbeccb; padding: 10px 16px; border-radius: 10px; font-weight: 800; font-size: 14px; border-left: 5px solid var(--gold); box-shadow: var(--shadow); animation: toastIn .3s ease-out; max-width: 360px; }
.toast.error { border-color: #ff5a4a; } .toast.good { border-color: #6fd36a; }
.toast.out { opacity: 0; transform: translateX(30px); transition: all .4s; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } }

#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 45; opacity: 0; }
#vignette.show { animation: vig 1.4s ease-out; }
#vignette.red { box-shadow: inset 0 0 160px 60px rgba(220,30,20,.75); }
#vignette.gold { box-shadow: inset 0 0 160px 60px rgba(255,200,60,.65); }
@keyframes vig { 20% { opacity: 1; } 100% { opacity: 0; } }
#confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; display: none; }

/* ───────── modales ───────── */
#modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(5,10,20,.55); backdrop-filter: blur(2px); }
.modal-card { width: min(560px, 94vw); max-height: 90vh; overflow: auto; padding: 22px 24px; animation: rise .35s ease-out; text-align: center; }
.modal-card h2 { font-family: 'Cinzel', serif; margin: 0 0 8px; }
.modal-card h4 { margin: 12px 0 6px; text-align: left; font-family: 'Cinzel', serif; }
.pickers { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.picker { width: 86px; padding: 8px 4px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: linear-gradient(170deg, #fffaf0 0 45%, var(--rc) 45%); border: 2px solid #2a1c0e; }
.picker small { font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; }
.picker b { font-size: 18px; min-width: 18px; color: #fff; text-shadow: 0 1px 2px #000; }
.pk-ctrl { display: flex; align-items: center; gap: 4px; }
.picker.btnlike { cursor: pointer; transition: transform .12s; }
.picker.btnlike:hover:not(:disabled) { transform: translateY(-3px); }
.picker.btnlike:disabled { opacity: .35; cursor: not-allowed; }
.picker.sel { box-shadow: 0 0 0 4px var(--gold2), 0 0 16px var(--gold); transform: translateY(-3px); }
.meter { height: 10px; background: rgba(0,0,0,.15); border-radius: 6px; overflow: hidden; margin: 8px 0 14px; }
.meter div { height: 100%; background: linear-gradient(90deg, #e3a531, #c8372d); transition: width .2s; }
.victims { display: grid; gap: 10px; margin-top: 12px; }
.victim { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 18px; }
.dotc { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid #2a1c0e; vertical-align: middle; }
.tabs { display: flex; gap: 6px; justify-content: center; margin: 6px 0; }
.tab { border: 2px solid #8a5d2b; background: rgba(255,255,255,.4); padding: 7px 14px; border-radius: 20px; font-weight: 800; cursor: pointer; }
.tab.on { background: var(--gold); }
.row-btns { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.win .crown { font-size: 64px; animation: pop .7s ease-out, bob 2s 1s infinite; }
.win h2 { font-size: 30px; text-shadow: 0 2px 0 #2a1c0e; }
.scores { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-weight: 700; }
.scores td, .scores th { padding: 6px; border-bottom: 1px solid rgba(138,93,43,.3); text-align: left; }
.win .btn.ghost { margin-top: 8px; }

#trade-float { position: fixed; left: 16px; bottom: 130px; z-index: 30; display: flex; flex-direction: column-reverse; gap: 8px; max-height: 70vh; overflow: auto; }
.tf { padding: 12px 14px; width: 290px; }
.tf .row-btns { flex-wrap: wrap; gap: 6px; }
.tf.pop { animation: rise .35s ease-out; box-shadow: 0 0 0 3px var(--c), var(--shadow); }
.tf h4 { margin: 0 0 6px; font-family: 'Cinzel', serif; }
.tline { display: flex; align-items: center; gap: 6px; font-weight: 800; margin: 4px 0; flex-wrap: wrap; }
.tc { display: inline-flex; align-items: center; font-weight: 900; }
.tresp { display: flex; align-items: center; gap: 6px; justify-content: space-between; margin: 5px 0; font-weight: 800; }
.tresp .no { color: var(--red); font-size: 13px; } .tresp .wait { opacity: .6; font-size: 13px; }


/* ───────── estilos de piezas en el lobby ───────── */
.slot-house { width: 30px; flex: none; }
.lbl { font-weight: 900; font-size: 13px; margin: 12px 0 6px; }
.lbl small { font-weight: 600; opacity: .7; }
.lobby-box h3 small { font-family: 'Nunito'; font-size: 12px; opacity: .7; }
.swatch { width: 34px; height: 34px; }
.stylepicks { display: flex; gap: 6px; flex-wrap: wrap; }
.stylepick { width: 66px; padding: 4px 2px 3px; border-radius: 10px; border: 2px solid rgba(138,93,43,.5); background: rgba(255,255,255,.5); cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: transform .12s; }
.stylepick svg { width: 46px; height: 40px; }
.stylepick small { font-size: 10.5px; font-weight: 800; }
.stylepick:hover { transform: translateY(-2px); }
.stylepick.sel { border-color: var(--gold); background: linear-gradient(#fff3c8, #f0cf7a); box-shadow: 0 0 0 2px var(--gold); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip:disabled { cursor: default; opacity: .6; }
.chip.sel:disabled { opacity: 1; }
.blades > g { transform-box: fill-box; transform-origin: center; animation: spin 3s linear infinite; }
.neon { animation: neon 1.6s ease-in-out infinite; }
@keyframes neon { 50% { opacity: .65; } }

/* ───────── ruta más larga ───────── */
.lr-glow { stroke: #ffd56b; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 6 8; opacity: .95; animation: lrflow 1s linear infinite; pointer-events: none; }
@keyframes lrflow { to { stroke-dashoffset: -28; } }
.path-hover { stroke: #fff; stroke-width: 16; stroke-linecap: round; opacity: .45; pointer-events: none; animation: hoverPulse 1s ease-in-out infinite; }
@keyframes hoverPulse { 50% { opacity: .2; } }
.lrbadge { background: linear-gradient(90deg, #8a5d2b, #e3ad3f) !important; color: #fff !important; animation: btnGlow 2s infinite; }
#tip { position: fixed; z-index: 90; pointer-events: none; background: rgba(20,12,4,.94); color: #fbeccb; font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--gold); opacity: 0; transition: opacity .12s; max-width: 280px; }
#tip.show { opacity: 1; }

/* ───────── muelles ───────── */
.port.mine .port-disc { stroke: #ffd56b; stroke-width: 5; }
.port.mine { animation: portPulse 2s ease-in-out infinite; }
@keyframes portPulse { 50% { opacity: .85; } }
.port { cursor: help; }
#myports { color: #fbeccb; display: flex; align-items: center; gap: 6px; }
.ports-title { font-size: 11px; font-weight: 900; opacity: .75; }
.ports-list { display: flex; gap: 4px; flex-wrap: wrap; }
.emote-top { color: #fbeccb; border-color: var(--gold); font-size: 14px; }
.bank { margin-left: auto; }
.pchip { display: inline-flex; align-items: center; gap: 2px; background: #f6ead0; color: var(--ink); border: 2px solid var(--gold); border-radius: 12px; padding: 1px 7px; font-weight: 900; font-size: 12px; cursor: help; }
.pchip.off { border-color: #8a5d2b; opacity: .7; }

/* ───────── contador ───────── */
#timer { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); z-index: 3; min-width: 300px; height: 28px; border-radius: 14px; overflow: hidden;
  background: rgba(20,12,4,.78); border: 2px solid rgba(227,173,63,.5); display: none; align-items: center; justify-content: center; color: #fbeccb; font-weight: 800; font-size: 13px; pointer-events: none; }
#timer.show { display: flex; }
#timer .tbar { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #3d8a2e, #8fd16a); transition: width .25s linear; opacity: .55; }
#timer span { position: relative; padding: 0 12px; }
#timer.urgent { border-color: #ff5a4a; animation: urgent .5s ease-in-out infinite; }
#timer.urgent .tbar { background: linear-gradient(90deg, #c8372d, #ff8a6a); }
#timer.mine.urgent { box-shadow: 0 0 18px rgba(255,90,74,.8); }
@keyframes urgent { 50% { transform: translateX(-50%) scale(1.06); } }

/* ───────── emoticones ───────── */
.emote-btn { font-size: 24px; padding: 6px 10px; }
#emote-pop { position: fixed; top: 54px; right: 16px; z-index: 75; width: 330px; padding: 12px; border-radius: 14px; background: rgba(25,15,6,.96); border: 2px solid var(--gold);
  color: #fbeccb; box-shadow: var(--shadow); display: none; }
#emote-pop.show { display: block; animation: rise .2s ease-out; }
.ep-title { font-weight: 900; font-size: 12px; margin-bottom: 6px; }
.ep-targets { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.ep-targets .chip { font-size: 12px; }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.ep-btn { font-size: 24px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; cursor: pointer; padding: 3px 0; transition: transform .1s; }
.ep-btn:hover { transform: scale(1.25); background: rgba(255,213,107,.25); }
.ep-btn.throw { border-color: rgba(255,90,74,.6); }
.ep-hint { font-size: 11px; opacity: .65; margin-top: 8px; }
.emote-fly { position: fixed; left: 0; top: 0; z-index: 85; font-size: 44px; pointer-events: none; margin: -22px 0 0 -22px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.emote-splat, .emote-bubble { position: fixed; z-index: 86; pointer-events: none; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); }
.emote-splat span { font-size: 64px; animation: splat 1.5s ease-out forwards; }
.emote-splat small, .emote-bubble small { font-weight: 900; font-size: 16px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 8px #000; white-space: nowrap; }
@keyframes splat { 0% { transform: scale(2.2) rotate(-20deg); } 20% { transform: scale(1) rotate(8deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.9) translateY(10px); } }
.emote-bubble { transform: translate(-50%, -100%); animation: bubble 2.2s ease-out forwards; }
.emote-bubble span { font-size: 46px; background: #fffaf0; border-radius: 50%; width: 70px; height: 70px; display: grid; place-items: center; border: 3px solid #2a1c0e; box-shadow: var(--shadow); }
@keyframes bubble { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.3); } 15% { opacity: 1; transform: translate(-50%, -110%) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%); } }
.pl.hit { animation: hit .5s ease-out; }
@keyframes hit { 20% { transform: translateX(-10px) rotate(-3deg); background: #ffd0c8; } 40% { transform: translateX(8px) rotate(2deg); } 60% { transform: translateX(-5px); } }

/* ───────── efectos grandes ───────── */
.bigfx { position: fixed; inset: 0; z-index: 58; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; animation: fadeIn .25s; }
.bigfx.out { opacity: 0; transition: opacity .35s; }
.bigtxt { font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(34px, 7vw, 84px); color: #fff; text-shadow: 0 5px 0 #1b0d02, 0 0 30px rgba(0,0,0,.7); letter-spacing: 3px; animation: bigIn .6s cubic-bezier(.3,1.7,.5,1) both; text-align: center; z-index: 2; }
.bigtxt.red { color: #ff3b2e; text-shadow: 0 5px 0 #2a0505, 0 0 40px rgba(255,40,30,.9); }
.bigtxt.gold { color: #ffd56b; text-shadow: 0 5px 0 #3d2410, 0 0 40px rgba(255,200,60,.9); }
.subtxt { margin-top: 8px; font-weight: 900; font-size: clamp(15px, 2vw, 22px); color: #fff; background: rgba(0,0,0,.55); padding: 6px 18px; border-radius: 20px; animation: bigIn .6s .2s both; z-index: 2; }
@keyframes bigIn { from { transform: scale(.2) rotate(-6deg); opacity: 0; } }
/* ladrón */
.robberfx { background: radial-gradient(circle, rgba(60,0,0,.55), rgba(0,0,0,.88)); animation: fadeIn .2s, quake .5s .1s 3; }
@keyframes quake { 25% { transform: translate(-8px, 4px); } 50% { transform: translate(7px, -5px); } 75% { transform: translate(-4px, -3px); } }
.robber-big { width: 260px; height: 300px; animation: robberIn 1.2s cubic-bezier(.3,1.4,.5,1) both; filter: drop-shadow(0 0 30px rgba(255,40,30,.8)); }
.robber-big .eye, .robber-big use { }
@keyframes robberIn { 0% { transform: scale(.1) translateY(200px); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.bolt { position: absolute; top: 0; width: 70px; height: 60vh; fill: #fff4b0; filter: drop-shadow(0 0 18px #ffd56b); opacity: 0; animation: bolt .5s ease-out 2; }
@keyframes bolt { 0%, 100% { opacity: 0; } 10%, 30% { opacity: 1; } 20% { opacity: .2; } }
/* caballero */
.knightfx { background: radial-gradient(circle, rgba(40,60,110,.55), rgba(0,0,0,.85)); }
.slash { position: absolute; width: 140vw; height: 10px; background: linear-gradient(90deg, transparent, #fff 40%, #bfe3ff 60%, transparent); box-shadow: 0 0 30px #bfe3ff; transform-origin: center; }
.slash.s1 { transform: rotate(32deg) scaleX(0); animation: slash .35s ease-out forwards; }
.slash.s2 { transform: rotate(-32deg) scaleX(0); animation: slash2 .35s .2s ease-out forwards; }
@keyframes slash { to { transform: rotate(32deg) scaleX(1); opacity: .2; } }
@keyframes slash2 { to { transform: rotate(-32deg) scaleX(1); opacity: .2; } }
.shield { width: 150px; height: 170px; background: linear-gradient(160deg, #eef3fb, #8395b5); border: 6px solid var(--c); clip-path: path('M75,0 L150,25 L150,85 Q150,140 75,170 Q0,140 0,85 L0,25 Z'); display: grid; place-items: center; font-size: 70px; animation: bigIn .5s .35s cubic-bezier(.3,1.7,.5,1) both; }
/* monopolio */
.monofx { background: radial-gradient(circle, rgba(120,90,0,.5), rgba(0,0,0,.82)); }
.coin { position: absolute; top: -60px; animation: coinFall 1.8s ease-in forwards; }
@keyframes coinFall { to { transform: translateY(115vh) rotate(720deg); } }
.bigcard { width: 150px; height: 200px; border-radius: 16px; background: linear-gradient(170deg, #fffaf0, #e9d6a8); border: 5px solid #2a1c0e; display: grid; place-items: center; box-shadow: 0 0 40px rgba(255,213,107,.8); animation: cardSpin .8s cubic-bezier(.3,1.4,.5,1) both; z-index: 2; }
@keyframes cardSpin { from { transform: rotateY(540deg) scale(.2); } }
/* invención */
.plentyfx { background: radial-gradient(circle, rgba(70,40,120,.5), rgba(0,0,0,.82)); }
.twocards { display: flex; gap: 30px; z-index: 2; }
.twocards .bigcard:nth-child(2) { animation-delay: .15s; }
.star { position: absolute; left: 50%; top: 45%; font-size: 28px; animation: starOut 1.2s ease-out forwards; }
@keyframes starOut { from { transform: translate(0, 0) scale(.3); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(1.2); opacity: 0; } }
/* carreteras */
.roadfx { background: radial-gradient(circle, rgba(60,40,20,.5), rgba(0,0,0,.82)); }
.paved { position: absolute; top: 50%; left: 0; height: 46px; width: 0; background: var(--c); border-top: 6px solid #1b130b; border-bottom: 6px solid #1b130b; animation: pave 1.2s ease-out forwards; margin-top: 70px; }
.paved .lane { position: absolute; top: 50%; left: 0; right: 0; height: 5px; margin-top: -2.5px; background: repeating-linear-gradient(90deg, #fff 0 30px, transparent 30px 55px); }
@keyframes pave { to { width: 100%; } }
.hammer { position: absolute; top: 50%; font-size: 64px; margin-top: 10px; animation: hammerMove 1.2s ease-out forwards; }
@keyframes hammerMove { 0% { left: 0; transform: rotate(0); } 25% { transform: rotate(-50deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-50deg); } 100% { left: 92%; transform: rotate(10deg); } }
/* premios */
.awardfx { background: radial-gradient(circle, rgba(120,80,10,.5), rgba(0,0,0,.8)); }
.awardfx.army { background: radial-gradient(circle, rgba(40,60,110,.55), rgba(0,0,0,.82)); }
.ray { position: absolute; width: 200vmax; height: 200vmax; background: repeating-conic-gradient(rgba(255,213,107,.18) 0 10deg, transparent 10deg 20deg); animation: spin 8s linear infinite; }
.subtxt .dotc { width: 16px; height: 16px; }

/* barra inferior compacta */
#bottom { gap: 12px; padding: 8px 14px; }
.rcard { width: 60px; height: 80px; }
.rcard .ico { width: 40px; height: 40px; }
.dcard { width: 52px; height: 72px; }
.dcard .de { font-size: 22px; }
.dcard .dn { font-size: 8.5px; }
.btn.build { padding: 5px 9px; font-size: 14px; }
#actions .btn { font-size: 14px; }

/* skins de temporada */
.xlight { animation: xlight 1.2s ease-in-out infinite; }
.xlight:nth-of-type(2n) { animation-delay: .6s; }
@keyframes xlight { 50% { opacity: .35; } }
.xstar { animation: xlight 2s ease-in-out infinite; }
.spooky { animation: spooky 2.2s ease-in-out infinite; }
@keyframes spooky { 0%, 100% { opacity: 1; } 45% { opacity: .55; } 50% { opacity: .2; } 55% { opacity: .9; } }
.ghost > path { animation: ghost 2.4s ease-in-out infinite; }
@keyframes ghost { 50% { transform: translateY(-2px); } }
