/* TRIPLE DOUBLE BONUS POKER — Spinoryx · refinamiento visual "casino premium"
   Espacio de diseño: 1536 × 1024. Layout absoluto escalado con transform.
   Cambios respecto al original (style.css.original):
   - Logo separado del fondo (assets/logo.png), ~18% más pequeño y con brillo contenido.
   - Paytable más limpia: fondo más oscuro, más aire, líneas sutiles.
   - Hint más fino y elegante.
   - Paneles compactados ~18%; PREMIO destacado, SALDO/APUESTA discretos.
   - Zona inferior unificada (botones circulares 64px, misma familia visual).
   - HOLD/HELD con borde dorado fino, elevación 5px y glow suave.
   - Azul más profundo (fondo re-procesado) + halo tras las cartas.
   - Botón DEAL en dorado champagne, gradiente fino, pressed real de 3px.
*/

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }

:root {
  --gold: #e9c46a;            /* champagne */
  --gold-bright: #f6dc95;
  --gold-deep: #b8892e;
  --gold-line: rgba(233,196,106,.55);
  --navy: #071634;
  --navy2: #0b1f4a;
  --panel-bg: linear-gradient(180deg, rgba(4,13,36,.94), rgba(7,22,58,.94));
  --panel-border: 2px solid rgba(233,196,106,.75);
  --red: #c9262c;
  --text-soft: #dfe7fb;
  --font: 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
}

html, body { width: 100%; height: 100%; overflow: hidden; background: #030b22; }
body { font-family: var(--font); }

#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }

#stage { position: relative; width: 1536px; height: 1024px; transform-origin: center center; flex: none; }

#background {
  position: absolute; inset: 0;
  background: url('assets/background.webp') center / 100% 100% no-repeat;
}
/* Viñeta suave adicional para profundidad */
#background::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 40%, rgba(0,0,0,.28) 100%);
  pointer-events: none;
}

.hidden { display: none !important; }

/* ─── Logo (ahora un elemento propio, ~18% más pequeño que en el fondo original) ─── */
#logo {
  position: absolute; left: 34px; top: 22px; width: 336px; height: auto;
  filter: brightness(.9) saturate(.92) drop-shadow(0 6px 14px rgba(0,0,0,.55));
  opacity: .96; pointer-events: none;
}

/* ─── Tabla de pagos ─── */
#paytable {
  position: absolute; left: 700px; top: 28px; width: 796px;
  background: linear-gradient(180deg, rgba(3,10,30,.94), rgba(6,18,48,.94));
  border: var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 9px 18px 10px;
}
.pt-head { display: flex; align-items: flex-end; padding-bottom: 7px; border-bottom: 1px solid var(--gold-line); }
.pt-title {
  flex: 1; color: var(--gold); font-weight: 700; font-size: 19px; letter-spacing: 1.6px;
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.pt-cols { display: flex; }
.pt-cols span, .pt-row .pt-pay {
  width: 86px; text-align: center; color: #b9c9ee; font-weight: 600; font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.pt-cols span { font-size: 13px; letter-spacing: .6px; color: #9fb3e0; }
.pt-cols span.active-col { color: var(--gold); }
#pt-rows { margin-top: 5px; }
.pt-row {
  display: flex; align-items: center; height: 24.4px; border-radius: 5px;
  border-bottom: 1px solid rgba(255,255,255,.035);
}
.pt-row:last-child { border-bottom: none; }
.pt-row .pt-name { flex: 1; color: var(--text-soft); font-size: 14px; font-weight: 600; letter-spacing: .5px; padding-left: 8px; }
.pt-row .pt-pay { color: #eef3ff; font-size: 15px; }
.pt-row .pt-pay.active-col { color: var(--gold-bright); font-weight: 700; }
.pt-row.hl {
  background: linear-gradient(90deg, rgba(233,196,106,.22), rgba(233,196,106,.06));
  box-shadow: inset 0 0 0 1px rgba(233,196,106,.85);
  animation: rowPulse 0.9s ease-in-out infinite alternate;
}
@keyframes rowPulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }

/* ─── Hint (más fino, elegante) ─── */
#hint {
  position: absolute; left: 40px; top: 402px; width: 1044px; height: 28px;
  color: #f1e3b5; font-size: 17px; font-weight: 500; letter-spacing: 2.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,.75); opacity: .92;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Banner de premio ─── */
#win-banner {
  position: absolute; left: 386px; top: 170px; width: 700px; height: 190px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(8,24,60,.96), rgba(3,10,30,.92));
  border: 2px solid var(--gold); border-radius: 20px;
  box-shadow: 0 0 40px rgba(233,196,106,.35), 0 20px 50px rgba(0,0,0,.6);
  z-index: 30; animation: bannerIn .45s cubic-bezier(.2,1.6,.4,1);
}
@keyframes bannerIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#win-banner-label { color: var(--gold-bright); font-size: 40px; font-weight: 800; letter-spacing: 4px; text-shadow: 0 3px 8px #000; }
#win-banner-amount { color: #fff; font-size: 50px; font-weight: 800; text-shadow: 0 0 18px rgba(233,196,106,.6); }

/* ─── Cartas ─── */
#cards { position: absolute; left: 40px; top: 440px; display: flex; gap: 16px; }
/* Halo suave detrás del área de cartas */
#cards::before {
  content: ''; position: absolute; left: -40px; right: -40px; top: -30px; bottom: -40px;
  background: radial-gradient(ellipse at 50% 55%, rgba(60,110,220,.22), rgba(0,0,0,0) 70%);
  pointer-events: none; z-index: -1;
}
.card { width: 196px; height: 274px; perspective: 900px; cursor: pointer; position: relative; }
.card-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.3,.9,.3,1);
}
.card.flipped .card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #f7f6ef 100%);
  box-shadow: 0 14px 28px rgba(0,0,0,.55), 0 3px 6px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: box-shadow .2s ease;
}
.card-back {
  position: absolute; inset: 0; backface-visibility: hidden; transform: rotateY(180deg);
  border-radius: 14px; overflow: hidden;
  background: url('assets/card_back.webp') center / cover no-repeat;
  box-shadow: 0 14px 28px rgba(0,0,0,.55), 0 3px 6px rgba(0,0,0,.35);
}
.card-face .corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.card-face .corner.tl { top: 8px; left: 10px; }
.card-face .corner.br { bottom: 8px; right: 10px; transform: rotate(180deg); }
.card-face .corner .r { font-size: 34px; font-weight: 900; }
.card-face .corner .s { font-size: 30px; }
.card-face .center-suit { font-size: 110px; line-height: 1; }
.card-face.red { color: var(--red); }
.card-face.black { color: #14161c; }
.card { transition: transform .2s cubic-bezier(.2,.8,.3,1); }
.card.held { transform: translateY(-5px); }
.card.held .card-face {
  box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(233,196,106,.45), 0 16px 30px rgba(0,0,0,.55);
}
.card.winning .card-face { box-shadow: 0 0 0 2px #41d97c, 0 0 26px rgba(65,217,124,.7), 0 14px 28px rgba(0,0,0,.55); animation: winGlow .7s ease-in-out infinite alternate; }
@keyframes winGlow { from { filter: brightness(1); } to { filter: brightness(1.18); } }

/* ─── Botones HOLD ─── */
#hold-buttons { position: absolute; left: 40px; top: 726px; display: flex; gap: 16px; }
.hold-btn {
  width: 196px; height: 50px; border-radius: 10px; cursor: pointer;
  font-family: var(--font); font-size: 18px; font-weight: 700; letter-spacing: 3px;
  border: 1px solid rgba(160,185,240,.22);
  background: linear-gradient(180deg, rgba(30,52,110,.85), rgba(14,28,66,.9)); color: #a7b8e6;
  box-shadow: 0 3px 0 rgba(4,12,34,.9), 0 8px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.hold-btn.on {
  border-color: rgba(246,220,149,.9);
  background: linear-gradient(180deg, #f6dc95 0%, #e2b85a 55%, #c99a3c 100%); color: #2c1e00;
  box-shadow: 0 3px 0 #8a6508, 0 0 16px rgba(233,196,106,.4), inset 0 1px 0 rgba(255,255,255,.5);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.hold-btn:disabled { opacity: .4; cursor: default; }
.hold-btn:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(4,12,34,.9); }

/* ─── Paneles (compactados ~18%) ─── */
.panel {
  position: absolute; left: 1118px; width: 378px;
  background: var(--panel-bg);
  border: var(--panel-border); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
}
#panel-win    { top: 440px; height: 104px; }
#panel-credit { top: 560px; height: 86px; border-color: rgba(233,196,106,.45); }
#panel-bet    { top: 662px; height: 86px; border-color: rgba(233,196,106,.45); }
.panel-label { color: var(--gold); font-size: 14px; font-weight: 600; letter-spacing: 3px; opacity: .9; }
.panel-value { color: #fff; font-size: 30px; font-weight: 800; text-shadow: 0 2px 6px #000; font-variant-numeric: tabular-nums; }
#panel-win .panel-label { font-size: 16px; color: var(--gold-bright); }
#panel-win .panel-value { font-size: 36px; }
#panel-credit .panel-value, #panel-bet .panel-value { font-size: 26px; color: #e9eefc; }
#panel-credit .panel-label, #panel-bet .panel-label { font-size: 12.5px; color: #c9b47a; }
#panel-win.flash { animation: panelFlash .5s ease 3; }
@keyframes panelFlash { 50% { box-shadow: 0 0 30px rgba(233,196,106,.8); } }

/* ─── Zona inferior: familia visual unificada ─── */
/* Botón circular base (iconos y steppers comparten tamaño y estilo) */
.icon-btn, .step-btn {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1.5px solid rgba(233,196,106,.8); cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #22407f, #0a1a44 75%);
  color: var(--gold); font-family: var(--font);
  box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s ease, box-shadow .1s ease;
}
.icon-btn:active, .step-btn:not(:disabled):active { transform: scale(.94); box-shadow: 0 2px 6px rgba(0,0,0,.5); }

.icon-btn { position: absolute; top: 888px; font-size: 26px; }
#icon-settings { left: 44px; }
#icon-sound { left: 124px; }

/* ─── Menú ajustes ─── */
#settings-menu {
  position: absolute; left: 36px; top: 690px; width: 270px; z-index: 40;
  background: var(--panel-bg);
  border: var(--panel-border); border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
#settings-menu button {
  height: 48px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, #27407f, #16295a); color: #e8efff;
  font-size: 16px; font-weight: 700; letter-spacing: 1px;
}
#settings-menu button:active { transform: scale(.97); }

/* ─── Steppers ─── */
.stepper {
  position: absolute; top: 880px; width: 380px; height: 80px;
  display: flex; align-items: center; gap: 10px;
}
#stepper-coin { left: 250px; }
#stepper-coins { left: 660px; }
.step-btn { font-size: 30px; font-weight: 600; flex: none; line-height: 1; }
.step-btn:disabled { opacity: .35; cursor: default; }
.step-display {
  flex: 1; height: 72px; border: var(--panel-border); border-color: rgba(233,196,106,.5); border-radius: 12px;
  background: var(--panel-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}
.step-label { color: #c9b47a; font-size: 11.5px; font-weight: 600; letter-spacing: 2.5px; }
.step-value { color: #eef2ff; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ─── Botones de acción ─── */
.action-btn {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 800; letter-spacing: 4px;
  border-radius: 16px; color: #2b1d00;
  background: linear-gradient(180deg, #f8e3a6 0%, #e8c46c 45%, #d3a64a 75%, #b98a2f 100%);
  box-shadow: 0 5px 0 #7d5a12, 0 12px 26px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.12);
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
  transition: transform .06s ease, box-shadow .06s ease, filter .15s ease;
}
.action-btn:not(:disabled):hover { filter: brightness(1.04); }
.action-btn:disabled { opacity: .38; cursor: default; filter: saturate(.6); }
.action-btn:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #7d5a12, 0 6px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.4);
}
#btn-deal { position: absolute; left: 1130px; top: 866px; width: 376px; height: 112px; font-size: 40px; }
#btn-double { position: absolute; left: 1130px; top: 872px; width: 180px; height: 100px; font-size: 24px;
  background: linear-gradient(180deg, #ffb08a, #e2603a 55%, #b8401c); color: #fff;
  box-shadow: 0 5px 0 #6e2410, 0 12px 26px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.35); text-shadow: 0 2px 3px rgba(0,0,0,.45); }
#btn-double:not(:disabled):active { box-shadow: 0 2px 0 #6e2410, 0 6px 14px rgba(0,0,0,.5); }
#btn-collect { position: absolute; left: 1326px; top: 872px; width: 180px; height: 100px; font-size: 24px;
  background: linear-gradient(180deg, #9ff3bd, #3cc26e 55%, #1f8f49); color: #fff;
  box-shadow: 0 5px 0 #0f5a2a, 0 12px 26px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.35); text-shadow: 0 2px 3px rgba(0,0,0,.45); }
#btn-collect:not(:disabled):active { box-shadow: 0 2px 0 #0f5a2a, 0 6px 14px rgba(0,0,0,.5); }

/* ─── Double Game ─── */
#double-overlay {
  position: absolute; inset: 0; z-index: 50;
  background: radial-gradient(ellipse at 50% 40%, rgba(8,22,58,.96), rgba(2,7,22,.97));
  display: flex; flex-direction: column; align-items: center;
}
#double-title {
  margin-top: 90px; color: var(--gold-bright); font-size: 54px; font-weight: 800; letter-spacing: 6px;
  text-shadow: 0 0 26px rgba(233,196,106,.45), 0 4px 8px #000;
}
#double-hint { margin-top: 14px; color: #cfdaf5; font-size: 20px; font-weight: 500; letter-spacing: 3px; }
#double-amount-wrap { margin-top: 18px; color: #fff; font-size: 26px; font-weight: 600; letter-spacing: 1px; }
#double-amount { color: var(--gold-bright); font-weight: 800; }
#double-row { margin-top: 46px; display: flex; gap: 34px; }
.d-card-slot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.d-label { color: var(--gold); font-size: 16px; font-weight: 600; letter-spacing: 3px; }
.d-card { width: 168px; height: 235px; border-radius: 12px; position: relative; overflow: hidden;
  box-shadow: 0 14px 28px rgba(0,0,0,.6); }
.d-card.d-back { background: url('assets/card_back.webp') center / cover no-repeat; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease; }
.d-card.d-back:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(233,196,106,.5), 0 18px 30px rgba(0,0,0,.6); }
.d-card.d-front { background: linear-gradient(160deg, #ffffff, #f7f6ef); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.d-card .corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.d-card .corner.tl { top: 6px; left: 8px; }
.d-card .corner.br { bottom: 6px; right: 8px; transform: rotate(180deg); }
.d-card .corner .r { font-size: 28px; font-weight: 900; }
.d-card .corner .s { font-size: 24px; }
.d-card .center-suit { font-size: 84px; line-height: 1; }
.d-card.red { color: var(--red); }
.d-card.black { color: #14161c; }
.d-card.picked { box-shadow: 0 0 0 2px var(--gold), 0 0 30px rgba(233,196,106,.7), 0 14px 28px rgba(0,0,0,.6); }
#double-result { margin-top: 30px; min-height: 56px; color: #fff; font-size: 36px; font-weight: 800;
  letter-spacing: 3px; text-shadow: 0 3px 8px #000; }
#double-result.win { color: #41d97c; }
#double-result.lose { color: #ff6b6b; }
#double-result.push { color: var(--gold-bright); }
#double-actions { margin-top: 12px; display: flex; gap: 40px; }
#double-actions .action-btn { width: 250px; height: 84px; font-size: 28px; position: static; }
