/* 후추 슬롯머신 - slot.css — "버터 모닝" 리뉴얼 (2026-06) */
/* games.css(리뉴얼판) 변수/헤더 재사용. 셀렉터/JS 훅 보존. */
/* 🎰 슬롯 시그니처 연출: "장난감 나무 슬롯머신" —
   올리브 우드 캐비닛에 크림색 릴 창, 릴이 멈출 때마다 통통 튀고
   잭팟이면 릴 창이 버터빛으로 번쩍이며 기계 전체가 들썩인다. */

.slot-section { padding: 20px; }

.slot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.slot-balance { color: var(--accent); font-size: 1.1rem; font-weight: 800; }
.slot-plays { color: var(--text-sub); font-size: 0.85rem; font-weight: 700; }
.slot-plays span { color: var(--accent); }

/* 슬롯 본체 — 나무 캐비닛 + 안쪽 종이 질감 */
.slot-machine {
  background: linear-gradient(135deg, #7a8450, #5c6339);
  border-radius: 22px;
  border: 3px solid #4b5230;
  padding: 24px 16px;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.25),
    0 5px 0 rgba(70, 76, 42, 0.45);
  position: relative;
}
/* 캐비닛 상단 리벳 장식 */
.slot-machine::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 16px;
  right: 16px;
  height: 6px;
  background-image: radial-gradient(circle 3px, rgba(245, 232, 168, 0.4) 3px, transparent 4px);
  background-size: 24px 6px;
  background-repeat: repeat-x;
  pointer-events: none;
}
.slot-reels {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.slot-reel {
  width: 80px;
  height: 96px;
  background: var(--color-surface);
  border: 3px solid #fffdf5;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.12),
    0 3px 0 rgba(0, 0, 0, 0.22);
  user-select: none;
  transition: box-shadow 0.3s ease;
}
[data-theme="dark"] .slot-reel {
  border-color: #57491f;
}
/* 릴 멈춤 — 통통 (스프링 강화) */
.reel-stop { animation: reelBounce .45s var(--bm-spring); }
@keyframes reelBounce {
  0%   { transform: translateY(-12px) scale(1.05); }
  55%  { transform: translateY(4px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

/* 결과 */
.slot-result {
  text-align: center;
  min-height: 56px;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fdf6da;
}
.slot-result-label { font-weight: 800; font-size: 1.1rem; }
.slot-result-net { font-weight: 900; font-size: 1.4rem; }
/* 잭팟 — 기계 들썩 + 버터 글로우 */
.slot-result.jackpot {
  color: #ffe9ad;
  text-shadow: 0 0 18px rgba(255, 233, 173, 0.65);
  animation: slotPop .5s var(--bm-spring);
}
.slot-result.win { color: #d8e8b0; }
.slot-result.even { color: rgba(253, 246, 218, 0.7); }
.slot-result.lose { color: #f0a496; }
@keyframes slotPop {
  0%   { transform: scale(0.7) rotate(-2deg); }
  50%  { transform: scale(1.22) rotate(2deg); }
  100% { transform: scale(1); }
}
/* 잭팟 시 릴 창 버터빛 점멸 */
.slot-result.jackpot ~ * .slot-reel,
.slot-machine:has(.slot-result.jackpot) .slot-reel {
  animation: reelGlow 0.7s ease-in-out 2;
}
@keyframes reelGlow {
  0%, 100% { box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 0 rgba(0, 0, 0, 0.22); }
  50% { box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.08), 0 0 22px rgba(255, 233, 173, 0.85); }
}
.slot-machine:has(.slot-result.jackpot) {
  animation: cabinetShake 0.55s ease-in-out;
}
@keyframes cabinetShake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-1deg) translateY(-2px); }
  40% { transform: rotate(1deg); }
  60% { transform: rotate(-0.7deg); }
  80% { transform: rotate(0.5deg); }
}

/* 당기기 버튼 — 폭신한 빨강 레버 */
.slot-lever {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #e0604c, #f0875e);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(160, 50, 35, 0.4);
  transition: transform 0.2s var(--bm-spring), filter 0.2s ease;
}
.slot-lever:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: scale(1.02);
}
.slot-lever:active:not(:disabled) {
  transform: scale(0.96) translateY(2px);
  box-shadow: 0 2px 0 rgba(160, 50, 35, 0.4);
}
.slot-lever:disabled { opacity: 0.5; cursor: not-allowed; }

/* 배당표 */
.slot-paytable {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-sub);
}
.slot-paytable summary {
  cursor: pointer;
  font-weight: 700;
  padding: 8px 0;
}
.slot-paytable summary:hover { color: var(--text); }
.slot-paytable table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.slot-paytable td {
  padding: 6px 8px;
  border-bottom: 1.5px dashed var(--bm-line);
}
.slot-paytable td:first-child { font-size: 1.05rem; }
.slot-paytable td:last-child { text-align: right; font-weight: 800; color: var(--text); }
.slot-paytable-note { margin-top: 10px; text-align: center; }
