/* =========================================================================
   CONTRACTS MODULE — RULETA ARCADE + SALA DE ENTREVISTAS ILUSTRADA 32-BIT
   ========================================================================= */
:root {
  --font-px-title: 'Silkscreen', monospace;
  --font-px-body: 'Silkscreen', monospace;
}

#view-interview,
#view-interview *,
#view-agency,
#view-agency *,
#roulette-overlay,
#roulette-overlay *,
#modal-esc-rules,
#modal-esc-rules *,
.xp-toast-layer,
.xp-toast-layer *,
.ag-role-tooltip,
.ag-role-tooltip *,
#agency-live-bar,
#agency-live-bar * {
  font-family: var(--font-px-body) !important;
}

#view-interview,
#view-agency,
#roulette-overlay,
#modal-esc-rules,
.xp-toast-layer,
.ag-role-tooltip,
#agency-live-bar {
  font-size: 12px;
}

#view-interview button,
#view-interview button *,
#view-interview h1,
#view-interview h2,
#view-interview h3,
#view-interview .int-cash-badge,
#view-interview .int-stamp-top,
#view-interview .int-stamp-top *,
#view-interview .int-ink-stamp,
#view-interview .int-speech-name,
#view-agency .ag-topbar-title,
#view-agency .px-btn,
#roulette-overlay .roulette-title,
#roulette-overlay .px-btn,
#modal-esc-rules .modal-title,
.xp-toast-card,
#agency-live-bar button {
  font-family: var(--font-px-title) !important;
}

/* --- 1. RULETA POST-PARTIDA (CINTA ARCADE) --- */
.roulette-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(6, 10, 24, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.roulette-overlay.active {
  display: flex;
}

.roulette-overlay.shake-epic {
  animation: roulette-screen-shake 0.36s ease-out;
}

@keyframes roulette-screen-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 4px); }
  40% { transform: translate(6px, -4px); }
  60% { transform: translate(-4px, -3px); }
  80% { transform: translate(4px, 3px); }
}

.roulette-machine {
  position: relative;
  width: min(860px, 96vw);
  background: linear-gradient(180deg, #16264d 0%, #0d1630 100%);
  border: 4px solid #ffd447;
  box-shadow: inset 0 0 0 3px #2e4b8a, 0 10px 0 #050914, 0 20px 50px rgba(0, 0, 0, 0.75);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.roulette-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
}

.roulette-flash.fire {
  animation: roulette-flash-anim 0.55s ease-out forwards;
}

@keyframes roulette-flash-anim {
  0% { opacity: 0.75; }
  100% { opacity: 0; }
}

.roulette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.roulette-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roulette-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffd447;
  letter-spacing: 0.5px;
  text-shadow: 2px 2px 0 #070b1a;
}

.roulette-sub {
  font-size: 12px;
  color: #b7ccf5;
}

.roulette-odds-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.roulette-odd-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: #0a1228;
  border: 2px solid #355291;
  color: #cbd5e1;
}

.roulette-viewport {
  position: relative;
  width: 100%;
  height: 158px;
  background: #080e20;
  border: 4px solid #3b82f6;
  box-shadow: inset 0 0 0 2px #13224a, inset 0 8px 24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.roulette-pointer-top,
.roulette-pointer-bot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  width: 0;
  height: 0;
  pointer-events: none;
}

.roulette-pointer-top {
  top: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 16px solid #ff3864;
  filter: drop-shadow(0 2px 0 #5c0a1e);
}

.roulette-pointer-bot {
  bottom: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 16px solid #ff3864;
  filter: drop-shadow(0 -2px 0 #5c0a1e);
}

.roulette-pointer-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 56, 100, 0.65);
  transform: translateX(-50%);
  z-index: 11;
  pointer-events: none;
}

.roulette-track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  will-change: transform;
}

.roulette-card {
  flex: 0 0 116px;
  height: 132px;
  background: #131f3d;
  border: 3px solid #64748b;
  box-shadow: 0 4px 0 #050914;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7px 6px;
  position: relative;
}

.roulette-card.rarity-NADA { border-color: #64748b; background: #141b29; }
.roulette-card.rarity-COMUN { border-color: #cbd5e1; background: #1c283d; }
.roulette-card.rarity-RARO,
.roulette-card.rarity-RARA { border-color: #3b82f6; background: #122854; box-shadow: 0 4px 0 #07122b, 0 0 10px rgba(59,130,246,0.35); }
.roulette-card.rarity-MUY_RARO { border-color: #06b6d4; background: #0d2b3e; box-shadow: 0 4px 0 #061822, 0 0 12px rgba(6,182,212,0.45); }
.roulette-card.rarity-EPICO,
.roulette-card.rarity-EPICA { border-color: #a855f7; background: #261447; box-shadow: 0 4px 0 #100721, 0 0 14px rgba(168,85,247,0.45); }
.roulette-card.rarity-LEGENDARIO,
.roulette-card.rarity-LEGENDARIA {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #3b2607 0%, #241604 100%);
  box-shadow: 0 4px 0 #170d02, 0 0 18px rgba(245,158,11,0.65);
}
.roulette-card.rarity-UNICA {
  border-color: #ffd447;
  background: linear-gradient(135deg, #520d26 0%, #991b1b 45%, #d97706 100%);
  box-shadow: 0 4px 0 #1f050d, 0 0 22px rgba(255,56,100,0.85);
}

.roulette-card-sil {
  width: 64px;
  height: 76px;
  background: rgba(6, 10, 24, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.roulette-card-sil canvas {
  width: 52px;
  height: 68px;
  image-rendering: pixelated;
}

.roulette-card-sil.is-empty {
  color: #64748b;
  font-size: 22px;
  font-weight: 700;
}

.roulette-card-tag {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 4px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}

.roulette-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.roulette-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffd447;
  animation: spark-pop 0.65s ease-out forwards;
}

@keyframes spark-pop {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

.roulette-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: #0a1228;
  border: 3px solid #2e4b8a;
  min-height: 62px;
}

.roulette-result-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.roulette-result-title {
  font-size: 16px;
  font-weight: 700;
  color: #e8f0ff;
}

.roulette-result-desc {
  font-size: 12px;
  color: #a9bee8;
}

#btn-roulette-cta {
  padding: 9px 16px;
  font-size: 12px;
  line-height: 1.2;
  flex-shrink: 0;
  white-space: nowrap;
}

