/* ============================================
   CAÇA-NÍQUEL
   ============================================ */

.slot-wrap { max-width: 520px !important; }

.slot-machine {
  position: relative;
  background: linear-gradient(160deg, #1a0a2e 0%, #0d0d1a 60%, #1a0818 100%);
  border: 3px solid #f5c518;
  border-radius: 28px;
  padding: 0 1.5rem 2rem;
  box-shadow:
    0 0 0 6px #1a0a2e,
    0 0 0 8px rgba(245,197,24,0.3),
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 60px rgba(0,0,0,0.4);
  overflow: hidden;
}

[data-theme="light"] .slot-machine {
  background: linear-gradient(160deg, #2a1045 0%, #1a1030 60%, #2a0828 100%);
}

/* ── Luzes decorativas ── */
.slot-lights {
  display: flex;
  justify-content: space-around;
  padding: 0.8rem 0.5rem 0;
  margin: 0 -1.5rem;
  background: rgba(0,0,0,0.3);
  border-bottom: 2px solid rgba(245,197,24,0.2);
  margin-bottom: 0;
}

.slot-lights span {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #333;
  border: 2px solid #444;
  transition: all 0.15s;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.slot-lights span.light-on {
  background: #f5c518;
  border-color: #fff8c0;
  box-shadow: 0 0 8px #f5c518, 0 0 20px rgba(245,197,24,0.6);
}

.slot-lights span.light-win {
  background: #ff6b35;
  border-color: #ffd0b0;
  box-shadow: 0 0 8px #ff6b35, 0 0 20px rgba(255,107,53,0.6);
}

/* ── Topo ── */
.slot-top {
  text-align: center;
  padding: 1rem 0 0.8rem;
}

.slot-top-text {
  font-family: 'Bebas Neue', cursive;
  font-size: 2.2rem;
  letter-spacing: 0.25em;
  background: linear-gradient(135deg, #f5c518, #ff6b35, #f5c518);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(245,197,24,0.4));
  line-height: 1;
}

.slot-top-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: rgba(245,197,24,0.5);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* ── Displays (créditos / aposta / ganho) ── */
.slot-displays {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.slot-display-box {
  flex: 1;
  background: #000;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 0.5rem 0.4rem;
  text-align: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.slot-display-bet {
  border-color: rgba(245,197,24,0.4);
}

.slot-display-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: #555;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.slot-display-val {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: #f5c518;
  text-shadow: 0 0 10px rgba(245,197,24,0.5);
  line-height: 1;
}

/* ── Janela dos rolos ── */
.slot-window {
  position: relative;
  background: #000;
  border: 3px solid #333;
  border-radius: 14px;
  overflow: hidden;
  height: 270px;
  box-shadow:
    inset 0 0 30px rgba(0,0,0,0.9),
    0 4px 20px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}

/* Reflexo */
.slot-window-shine {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.04), transparent);
  z-index: 5;
  pointer-events: none;
  border-radius: 11px 11px 0 0;
}

/* Sombreamento topo/base para sensação de profundidade */
.slot-window::before,
.slot-window::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 70px;
  z-index: 4;
  pointer-events: none;
}
.slot-window::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
}
.slot-window::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

/* Linha de pagamento */
.slot-payline {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 92px;
  transform: translateY(-50%);
  border-top: 2px solid rgba(245,197,24,0.35);
  border-bottom: 2px solid rgba(245,197,24,0.35);
  background: rgba(245,197,24,0.03);
  z-index: 3;
  pointer-events: none;
}

/* ── Rolos ── */
.slot-reels {
  display: flex;
  height: 100%;
}

.slot-reel {
  flex: 1;
  overflow: hidden;
  border-right: 1px solid #222;
  position: relative;
  background: #111;
}
.slot-reel:last-child { border-right: none; }

/* Canvas ocupa 100% do relo */
.slot-reel canvas {
  display: block;
  width: 100% !important;
  height: 270px !important;
}

/* Mantidos para compatibilidade mas não usados com canvas */
.slot-reel-inner { display: none; }
.slot-item       { display: none; }
.slot-item-win   { display: none; }

/* ── Mensagem de resultado ── */
.slot-msg {
  min-height: 36px;
  text-align: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  color: transparent;
  margin-bottom: 0.8rem;
  transition: all 0.3s;
  opacity: 0;
}

.slot-msg-visible {
  opacity: 1;
  animation: msgPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes msgPop {
  from { transform: scale(0.8); opacity:0; }
  to   { transform: scale(1);   opacity:1; }
}

.slot-msg-win       { color: #f5c518; }
.slot-msg-big-win   { color: #ff6b35; text-shadow: 0 0 20px rgba(255,107,53,0.6); }
.slot-msg-jackpot   { color: #f5c518; text-shadow: 0 0 30px rgba(245,197,24,0.9); animation: jackpotPulse 0.5s infinite alternate; }
.slot-msg-lose      { color: #555; }
.slot-msg-error     { color: #e03e3e; }

@keyframes jackpotPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* ── Controles ── */
.slot-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.slot-ctrl-btn {
  flex: 1;
  padding: 0.75rem 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s;
}

.slot-ctrl-btn:hover {
  background: rgba(245,197,24,0.1);
  border-color: rgba(245,197,24,0.4);
  color: #f5c518;
}

/* Botão GIRAR */
.slot-spin-btn {
  flex: 2;
  padding: 1rem;
  background: linear-gradient(135deg, #c8a010, #f5c518, #c8a010);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 4px 20px rgba(245,197,24,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.slot-spin-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(245,197,24,0.55);
}

.slot-spin-btn:active:not(:disabled) { transform: translateY(0); }

.slot-spin-btn:disabled {
  filter: brightness(0.6);
  cursor: not-allowed;
  transform: none;
}

.slot-spin-label {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  color: #1a0a00;
  line-height: 1;
}

.slot-spin-icon { font-size: 1.1rem; }

.slot-spin-btn.spinning .slot-spin-label {
  animation: spinLabel 0.4s ease infinite alternate;
}

@keyframes spinLabel {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

/* ── Tabela de prêmios ── */
.slot-paytable {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(245,197,24,0.15);
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

.slot-pay-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(245,197,24,0.5);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.6rem;
}

.slot-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 1rem;
}

.slot-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.slot-pay-sym {
  font-size: 0.75rem;
  letter-spacing: -0.1em;
}

.slot-pay-x {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f5c518;
}

/* ── Confetti ── */
.confetti-piece {
  position: fixed;
  top: -12px;
  z-index: 99999;
  animation: confettiFall linear forwards;
  pointer-events: none;
}

@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ── Responsividade completa do Caça-Níquel ── */

/* Tela grande (> 540px): já está ok com os valores base */

/* Tablet / celular grande (≤ 540px) */
@media (max-width: 540px) {

  .slot-wrap { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }

  .slot-machine {
    border-radius: 20px;
    padding: 0 1rem 1.5rem;
    border-width: 2px;
    box-shadow:
      0 0 0 4px #1a0a2e,
      0 0 0 6px rgba(245,197,24,0.3),
      0 16px 40px rgba(0,0,0,0.7);
  }

  .slot-lights { margin: 0 -1rem; padding: 0.6rem 0.4rem 0; }
  .slot-lights span { width: 11px; height: 11px; }

  .slot-top { padding: 0.7rem 0 0.6rem; }
  .slot-top-text { font-size: 1.7rem; letter-spacing: 0.15em; }
  .slot-top-sub  { font-size: 0.55rem; letter-spacing: 0.2em; }

  .slot-displays { gap: 0.4rem; margin-bottom: 0.8rem; }
  .slot-display-box { padding: 0.4rem 0.3rem; border-radius: 6px; }
  .slot-display-label { font-size: 0.45rem; }
  .slot-display-val   { font-size: 1.3rem; }

  .slot-window {
    height: 216px;
    border-radius: 10px;
    border-width: 2px;
    margin-bottom: 0.8rem;
  }
  .slot-payline { height: 72px; }
  .slot-reel canvas { height: 216px !important; }

  .slot-msg { font-size: 1rem; min-height: 28px; margin-bottom: 0.6rem; }

  .slot-controls { gap: 0.4rem; margin-bottom: 0.9rem; }
  .slot-ctrl-btn {
    padding: 0.65rem 0.3rem;
    font-size: 0.6rem;
    border-radius: 8px;
  }
  .slot-spin-btn  { padding: 0.8rem 0.5rem; border-radius: 11px; }
  .slot-spin-label { font-size: 1.25rem; letter-spacing: 0.15em; }
  .slot-spin-icon  { font-size: 0.95rem; }

  .slot-paytable { padding: 0.6rem 0.8rem; border-radius: 10px; }
  .slot-pay-title { font-size: 0.55rem; margin-bottom: 0.5rem; }
  .slot-pay-grid  { gap: 0.2rem 0.6rem; }
  .slot-pay-sym   { font-size: 0.7rem; }
  .slot-pay-x     { font-size: 0.65rem; }
}

/* Celular pequeno (≤ 390px) */
@media (max-width: 390px) {

  .slot-machine {
    border-radius: 16px;
    padding: 0 0.7rem 1.2rem;
  }

  .slot-lights span { width: 9px; height: 9px; }

  .slot-top-text { font-size: 1.45rem; letter-spacing: 0.1em; }
  .slot-top-sub  { display: none; }

  .slot-displays { gap: 0.3rem; }
  .slot-display-val { font-size: 1.15rem; }
  .slot-display-label { font-size: 0.4rem; }

  .slot-window { height: 192px; }
  .slot-payline { height: 64px; }
  .slot-reel canvas { height: 192px !important; }

  .slot-ctrl-btn  { padding: 0.55rem 0.2rem; font-size: 0.55rem; letter-spacing: 0.05em; }
  .slot-spin-label { font-size: 1.1rem; }
  .slot-spin-btn   { padding: 0.7rem 0.4rem; }

  /* Tabela de prêmios em coluna única para não comprimir */
  .slot-pay-grid { grid-template-columns: 1fr 1fr; gap: 0.15rem 0.4rem; }
  .slot-pay-sym  { font-size: 0.62rem; }
  .slot-pay-x    { font-size: 0.6rem; }
}

/* Celular muito pequeno (≤ 320px) */
@media (max-width: 320px) {
  .slot-top-text { font-size: 1.25rem; }
  .slot-displays { flex-direction: row; }
  .slot-display-val { font-size: 1rem; }
  .slot-window { height: 168px; }
  .slot-payline { height: 56px; }
  .slot-reel canvas { height: 168px !important; }
  .slot-pay-grid { grid-template-columns: 1fr; }
}


