:root {
  --gold-highlight: #fde047;
  --gold-border: #ca8a04;
  --gold-deep: #854d0e;
  --imperial-red: #991b1b;
  --deep-lacquer: #450a0a;
  --parchment-bg: #fbf5e5;
  --parchment-dark: #f0deba;
  --jade-accent: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #0b0204;
  background-image: 
    linear-gradient(rgba(11, 2, 4, 0.85), rgba(11, 2, 4, 0.92)),
    url('/assets/temple_bg.jpg');
  background-size: cover;
  background-position: center top;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  overflow-x: hidden;
}

.mobile-frame {
  width: 100%;
  max-width: 410px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #881318 0%, #580a0e 45%, #3b0508 100%);
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 15px rgba(202, 138, 4, 0.4);
  border-left: 2px solid var(--gold-border);
  border-right: 2px solid var(--gold-border);
}

/* --- BARRA SUPERIOR --- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(202, 138, 4, 0.3);
  z-index: 30;
}

.game-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-crest {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #000;
  font-weight: 900;
  font-size: 0.85rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px #ffd700;
}

.brand-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.btn-deposit-pix {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 1px solid #34d399;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transition: transform 0.15s ease;
}
.btn-deposit-pix:active { transform: scale(0.95); }

/* --- COROA DO TEMPLO: TELHADO 3D + TIGRINHO --- */
.temple-crown {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
}

.pagoda-roof-container {
  width: 96%;
  height: 54px;
  display: flex;
  justify-content: center;
  z-index: 10;
  position: relative;
}

.pagoda-roof-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.temple-arch {
  margin-top: -18px;
  width: 140px;
  height: 120px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.arch-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, #ca8a04 0%, #78350f 60%, #451a03 100%);
  border-radius: 70px 70px 0 0;
  border: 3px solid #facc15;
  border-bottom: none;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6), inset 0 0 15px rgba(254, 240, 138, 0.3);
}

.tiger-stage {
  position: relative;
  width: 135px;
  height: 125px;
  display: flex;
  justify-content: center;
  z-index: 5;
}

.tiger-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: tigerFloat 3s infinite ease-in-out;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8));
}

.gong-x10 {
  position: absolute;
  top: 6px;
  right: -6px;
  background: radial-gradient(circle, #fef08a 0%, #eab308 60%, #854d0e 100%);
  border: 2px solid #fff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 16px #facc15;
  animation: gongGlow 1.8s infinite alternate ease-in-out;
}

.gong-val {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 900;
  color: #713f12;
  text-shadow: 0 1px 1px #fff;
}

/* --- ROLOS DO JOGO (PERGAMINHO DOURADO 3X3) --- */
.scroll-cabinet {
  position: relative;
  margin: 2px 10px 4px 10px;
  display: flex;
  background: #d4af37;
  border: 3px solid #fde047;
  border-radius: 12px;
  box-shadow: 
    0 0 0 2px #713f12,
    0 10px 30px rgba(0, 0, 0, 0.9),
    inset 0 0 15px rgba(113, 63, 18, 0.5);
  overflow: hidden;
}

/* Pilares com Marcadores das Linhas */
.pillar {
  width: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  background: linear-gradient(180deg, #7f1d1d 0%, #991b1b 50%, #450a0a 100%);
  padding: 8px 0;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.pillar-left { border-right: 2px solid #ca8a04; }
.pillar-right { border-left: 2px solid #ca8a04; }

.p-digit {
  font-size: 0.7rem;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 1px 3px #000;
}

/* Tabuleiro Pergaminho */
.parchment-stage {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 50% 50%, var(--parchment-bg) 0%, var(--parchment-dark) 100%);
  padding: 4px;
}

.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.win-laser-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

/* Célula sem Fundo Branco */
.cell {
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border-radius: 8px;
  overflow: visible;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Imagem do Símbolo Transparente */
.sym-image {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease;
  z-index: 2;
}

.cell.spinning .sym-image {
  animation: reelShuffle 0.1s infinite alternate ease-in-out;
  opacity: 0.65;
}

/* HALO DOURADO DE VITÓRIA (Idêntico ao Screenshot 3!) */
.cell.win-highlight::before {
  content: '';
  position: absolute;
  width: 92%;
  height: 92%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.8) 0%, rgba(234, 179, 8, 0.5) 60%, transparent 100%);
  border: 2px solid #ffd700;
  box-shadow: 0 0 18px #facc15, inset 0 0 10px #fde047;
  z-index: 1;
  animation: haloPulse 0.7s infinite alternate ease-in-out;
}

.cell.win-highlight .sym-image {
  transform: scale(1.15);
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.8));
}

/* --- FAIXA IMPERIAL (FORTUNE RIBBON) --- */
.ribbon-banner {
  margin: 4px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ribbon-core {
  width: 94%;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 60%, #7f1d1d 100%);
  border: 2px solid #facc15;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.ribbon-text {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 4px #000, 0 0 10px rgba(250, 204, 21, 0.7);
}

.ribbon-banner.win-celebrate .ribbon-core {
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  border-color: #fff;
  box-shadow: 0 0 22px #eab308;
  animation: ribbonPulse 0.8s infinite alternate;
}

.ribbon-banner.win-celebrate .ribbon-text {
  font-size: 1.05rem;
}

/* --- HUD DE SALDO E APOSTA --- */
.hud-deck {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 12px;
  background: #3b0508;
  border: 1px solid #7f1d1d;
  border-radius: 12px;
  padding: 6px 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.hud-pill {
  display: flex;
  flex-direction: column;
}

.hud-tag {
  font-size: 0.6rem;
  font-weight: 700;
  color: #fca5a5;
  letter-spacing: 0.5px;
}

.hud-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.win-amount {
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.pg-stamp {
  background: #7f1d1d;
  color: #fef08a;
  border: 1px solid #991b1b;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- CONSOLE INFERIOR & BOTÃO JADE DO TIGRE --- */
.console-dock {
  margin-top: auto;
  padding: 6px 14px 10px 14px;
  background: radial-gradient(circle at 50% 0%, #7f1d1d 0%, #3b0508 100%);
  border-top: 2px solid var(--gold-border);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.controls-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin: 4px 0 8px 0;
}

.round-control-btn {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #7f1d1d 0%, #450a0a 100%);
  border: 2px solid var(--gold-border);
  border-radius: 50%;
  color: #fef08a;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), inset 0 2px 2px rgba(255, 255, 255, 0.2);
  transition: transform 0.1s ease;
}
.round-control-btn:active { transform: scale(0.92); }

.btn-glyph {
  font-size: 1.25rem;
  font-weight: 900;
}

/* BOTÃO DE JADE DO TIGRINHO */
.jade-spin-anchor {
  position: relative;
}

.jade-spin-master {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.12s ease;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.9));
}
.jade-spin-master:active { transform: scale(0.93); }
.jade-spin-master:disabled { filter: grayscale(0.5) opacity(0.7); cursor: not-allowed; }

.jade-gem {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: gemGlow 2.5s infinite ease-in-out;
}

.spin-call {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 6px #000, 0 0 12px #34d399;
  letter-spacing: 1px;
}

/* Rodapé */
.footer-links {
  display: flex;
  justify-content: space-around;
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid rgba(202, 138, 4, 0.2);
}

.foot-btn {
  background: none;
  border: none;
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* --- MODAIS --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }

.modal-window {
  background: linear-gradient(180deg, #7f1d1d 0%, #3b0508 100%);
  border: 2px solid var(--gold-border);
  border-radius: 18px;
  width: 100%;
  max-width: 380px;
  padding: 18px;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(202, 138, 4, 0.3);
  padding-bottom: 8px;
}
.modal-top h2 { font-size: 1.05rem; color: #ffd700; }
.modal-dismiss { background: none; border: none; color: #fca5a5; font-size: 1.2rem; cursor: pointer; }

.modal-content { padding-top: 12px; }
.modal-content.scroll-box { max-height: 400px; overflow-y: auto; }
.modal-instruction { font-size: 0.8rem; color: #fed7aa; margin-bottom: 12px; }

.presets-row { display: flex; gap: 6px; margin-bottom: 12px; }
.preset-chip {
  flex: 1;
  background: #991b1b;
  border: 1px solid var(--gold-border);
  color: #fff;
  padding: 8px 0;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}
.preset-chip.active { background: #10b981; border-color: #34d399; }

.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-size: 0.72rem; color: #fca5a5; margin-bottom: 4px; }
.form-field input {
  width: 100%;
  background: #2b0407;
  border: 1px solid var(--gold-border);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1.1rem;
}

.btn-action-pix {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
}

.pix-card-area { margin-top: 14px; text-align: center; }
.pix-card-area.hidden { display: none; }
.qr-visual { display: flex; justify-content: center; margin-bottom: 10px; }
.qr-canvas-sim {
  width: 110px;
  height: 110px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #000;
}
.qr-ico { font-size: 1.8rem; }
.qr-legend { font-size: 0.65rem; font-weight: 900; }

.copy-bar { display: flex; gap: 6px; margin-bottom: 10px; }
.copy-bar input {
  flex: 1;
  background: #2b0407;
  border: 1px solid var(--gold-border);
  color: #fca5a5;
  padding: 6px 8px;
  font-size: 0.7rem;
  border-radius: 6px;
}
.copy-bar button {
  background: #ffd700;
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.btn-bank-sim {
  width: 100%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

/* Paytable */
.pay-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(202, 138, 4, 0.2);
}
.pay-sym-img { width: 44px; height: 44px; object-fit: contain; }
.pay-detail strong { display: block; font-size: 0.82rem; color: #ffd700; }
.pay-detail span { display: block; font-size: 0.72rem; color: #fca5a5; }

.golden-banner-box {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #fef08a;
  margin-top: 10px;
}

/* Animações */
@keyframes tigerFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@keyframes gongGlow {
  0% { transform: scale(1); box-shadow: 0 0 10px #facc15; }
  100% { transform: scale(1.08); box-shadow: 0 0 20px #fde047; }
}

@keyframes gemGlow {
  0% { filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.7)); }
  50% { filter: drop-shadow(0 0 18px rgba(16, 185, 129, 1)); }
  100% { filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.7)); }
}

@keyframes reelShuffle {
  0% { transform: translateY(-4px); filter: blur(1.5px); }
  100% { transform: translateY(4px); filter: blur(0px); }
}

@keyframes haloPulse {
  0% { transform: scale(0.96); opacity: 0.8; }
  100% { transform: scale(1.08); opacity: 1; }
}

@keyframes ribbonPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}
