/* ═══════════════════════════════════════════════════════════════════════
   泊樂娛樂城 · ayes88 拉霸 Slot 彈窗  (prefix: slot-)
   self-contained · 與其他站不共用 class / 配色 / 機制
   配色:紅金霓虹拉霸機 (red-gold neon slot)
   ═══════════════════════════════════════════════════════════════════════ */

.slot-footer-promo,
.slot-backdrop {
  --slot-bg-deep:  #210406;
  --slot-bg-deep2: #4a0a0e;
  --slot-red:      #ff2d3d;
  --slot-red2:     #ff5e5e;
  --slot-gold:     #ffd54a;
  --slot-gold2:    #ffb300;
  --slot-ink:      #1c0405;
  --slot-text:     #fff0ec;
  --slot-muted:    #e0b6ae;
}

.slot-promo-active {
  padding-bottom: clamp(86px, 17vw, 128px);
}

.slot-footer-promo,
.slot-backdrop {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
}
.slot-footer-promo *,
.slot-backdrop * { box-sizing: border-box; }

/* ── Footer banner ────────────────────────────────────────────────── */
.slot-footer-promo {
  position: fixed;
  z-index: 2147483000;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid rgba(255, 213, 74, 0.5);
  border-radius: 10px;
  background: #1c0405;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}
.slot-footer-promo.is-visible { transform: translateY(0); opacity: 1; }
.slot-footer-promo a { display: block; min-height: 64px; }
.slot-footer-promo img { display: block; width: 100%; height: auto; }

.slot-footer-text {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 46px 14px 16px;
  color: #fff; font-size: 15px; font-weight: 700; flex-wrap: wrap; text-decoration: none;
}
.slot-footer-badge {
  padding: 2px 8px; border-radius: 999px; background: #ff2d3d;
  color: #fff; font-size: 12px; font-weight: 800;
}
.slot-footer-cta-pill {
  padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe790, #ffb300);
  color: #1c0405; font-size: 13px; font-weight: 900; white-space: nowrap;
}

.slot-footer-close,
.slot-close {
  position: absolute; z-index: 6; display: grid; place-items: center;
  width: 34px; height: 34px; border: 0; border-radius: 999px;
  color: #fff; background: rgba(0, 0, 0, 0.62); cursor: pointer;
  font-size: 22px; line-height: 1;
}
.slot-footer-close { top: 6px; right: 6px; }

/* ── Backdrop ─────────────────────────────────────────────────────── */
.slot-backdrop {
  position: fixed; inset: 0; z-index: 2147483001;
  display: grid; place-items: center; padding: 18px;
  background: rgba(12, 2, 4, 0.72);
  opacity: 0; transition: opacity 180ms ease;
}
.slot-backdrop.is-visible { opacity: 1; }

/* ── Card ─────────────────────────────────────────────────────────── */
.slot-card {
  position: relative;
  width: min(94vw, 440px);
  max-height: min(92vh, 780px);
  display: flex;
  flex-direction: column;
  color: var(--slot-text);
  border: 3px solid rgba(255, 45, 61, 0.5);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% 0%, #6e1116 0%, var(--slot-bg-deep2) 45%, var(--slot-bg-deep) 100%);
  box-shadow:
    0 0 0 4px rgba(255, 213, 74, 0.18),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 45, 61, 0.35);
  overflow: hidden;
  transform: translateY(14px) scale(0.985);
  transition: transform 180ms ease;
}
.slot-backdrop.is-visible .slot-card { transform: translateY(0) scale(1); }
.slot-close {
  top: 10px; right: 10px; width: 40px; height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.45);
  transition: transform .2s, background .2s;
}
.slot-close:hover { background: var(--slot-red); transform: rotate(90deg); }

/* marquee bulb border */
.slot-bulbs { position: absolute; inset: 6px; border-radius: 16px; pointer-events: none; z-index: 1; }
.slot-bulb {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--slot-gold);
  box-shadow: 0 0 8px var(--slot-gold), 0 0 14px var(--slot-gold2);
  animation: slotBulb 1.2s linear infinite;
}
@keyframes slotBulb {
  0%, 100% { background: var(--slot-gold); box-shadow: 0 0 9px var(--slot-gold), 0 0 16px var(--slot-gold2); opacity: 1; }
  50%      { background: var(--slot-red);  box-shadow: 0 0 9px var(--slot-red),  0 0 16px var(--slot-red); opacity: .65; }
}
.slot-card.slot-win .slot-bulb { animation-duration: .45s; }

/* three stacked zones */
.slot-inner { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0; flex: 1; }

/* ── Sticky header ────────────────────────────────────────────────── */
.slot-head {
  flex: none;
  padding: 22px 22px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #6e1116 0%, #4d0c12 80%, rgba(74, 10, 14, 0) 100%);
}
.slot-kicker {
  display: inline-block; font-size: 12.5px; letter-spacing: 1.5px; font-weight: 700;
  color: var(--slot-gold); background: rgba(255, 213, 74, 0.14);
  border: 1px solid rgba(255, 213, 74, 0.45); border-radius: 999px;
  padding: 4px 14px; margin-bottom: 8px;
}
.slot-title {
  font-size: clamp(24px, 7vw, 30px); font-weight: 900; letter-spacing: 1px; color: #fff;
  text-shadow: 0 0 6px var(--slot-red), 0 0 16px var(--slot-red), 0 0 30px rgba(255, 45, 61, 0.7);
  animation: slotGlow 2.2s ease-in-out infinite;
}
@keyframes slotGlow { 50% { text-shadow: 0 0 8px var(--slot-gold), 0 0 20px var(--slot-red), 0 0 38px rgba(255, 45, 61, 0.9); } }
.slot-sub { margin-top: 5px; font-size: clamp(13px, 3.6vw, 15px); color: var(--slot-text); }
.slot-sub b { color: var(--slot-gold); font-weight: 800; }

/* ── Scrollable body ──────────────────────────────────────────────── */
.slot-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 20px 8px;
}
.slot-cap {
  text-align: center; font-size: 13px; line-height: 1.6;
  color: var(--slot-muted); margin-bottom: 10px;
}
.slot-cap b { color: var(--slot-gold); font-weight: 900; }
.slot-cap strong { color: #fff; }

/* ── Slot machine ─────────────────────────────────────────────────── */
.slot-machine {
  margin: 8px auto 6px;
  width: min(88%, 340px);
  background: linear-gradient(180deg, #5e131a, #340a0f);
  border: 3px solid var(--slot-gold);
  border-radius: 18px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(255, 213, 74, 0.3);
  padding: 16px 14px 14px;
}
.slot-reels {
  display: flex; gap: 4%; justify-content: center;
  background: #14040a; border-radius: 12px; padding: 4%;
  border: 2px solid rgba(255, 255, 255, 0.08);
}
.slot-reel {
  position: relative;
  flex: 1 1 0; min-width: 0; max-width: 90px;
  aspect-ratio: 74 / 90;
  border-radius: 10px; overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #ffe9e6 100%);
  box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.25), inset 0 -8px 12px rgba(0, 0, 0, 0.25);
}
.slot-reel::before, .slot-reel::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22px; z-index: 3; pointer-events: none;
}
.slot-reel::before { top: 0; background: linear-gradient(180deg, rgba(30, 0, 6, 0.45), transparent); }
.slot-reel::after  { bottom: 0; background: linear-gradient(0deg, rgba(30, 0, 6, 0.45), transparent); }
.slot-strip { display: flex; flex-direction: column; will-change: transform; }
.slot-sym {
  height: 90px; flex: 0 0 90px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(34px, 11vw, 48px); line-height: 1;
  font-weight: 900; color: #8c2b2b;
}
.slot-payline {
  position: relative; height: 2px; margin: -46px 6px 0; z-index: 4;
  background: linear-gradient(90deg, transparent, var(--slot-red), transparent);
  box-shadow: 0 0 8px var(--slot-red);
}
.slot-machine.slot-win-glow { border-color: #fff; animation: slotMachWin .4s steps(2) 6; }
@keyframes slotMachWin { 50% { border-color: var(--slot-red); box-shadow: 0 0 30px var(--slot-red); } }

/* spin button */
.slot-spinwrap { display: flex; justify-content: center; margin-top: 14px; }
.slot-spin {
  appearance: none; border: none; cursor: pointer;
  font-family: inherit; font-size: clamp(18px, 5.5vw, 22px); font-weight: 900; letter-spacing: 4px;
  color: var(--slot-ink);
  background: radial-gradient(120% 120% at 30% 20%, #fff3c4, var(--slot-gold) 40%, var(--slot-gold2));
  border-radius: 14px; padding: 12px 40px; min-height: 52px;
  box-shadow: 0 6px 0 #b67d00, 0 8px 18px rgba(0, 0, 0, 0.4);
  transition: transform .08s, box-shadow .08s;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.slot-spin:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #b67d00, 0 4px 10px rgba(0, 0, 0, 0.4); }
.slot-spin:disabled { filter: grayscale(.4) brightness(.9); cursor: wait; }

.slot-hint {
  margin-top: 8px; text-align: center; font-size: 12.5px; color: var(--slot-muted);
  transition: opacity 200ms ease;
}

/* ── Win banner (JACKPOT reveal) ──────────────────────────────────── */
.slot-banner {
  margin: 12px auto 0; max-width: 360px; text-align: center;
  background: linear-gradient(90deg, var(--slot-red), #ff7a7a, var(--slot-red));
  color: #fff; font-weight: 900; font-size: clamp(15px, 4.5vw, 18px); letter-spacing: 1px;
  border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 0 22px rgba(255, 45, 61, 0.7);
  transform: scale(0); opacity: 0; height: 0; margin-top: 0; overflow: hidden;
  transition: transform .3s cubic-bezier(.2, 1.6, .4, 1), opacity .3s;
}
.slot-banner b { color: var(--slot-gold); }
.slot-card.slot-win .slot-banner { transform: scale(1); opacity: 1; height: auto; margin-top: 12px; animation: slotFlash .6s steps(2) infinite; }
@keyframes slotFlash { 50% { filter: brightness(1.4); } }

/* ── 活動總覽 ─────────────────────────────────────────────────────── */
.slot-acts {
  margin: 16px auto 4px; max-width: 380px;
  background: rgba(28, 4, 6, 0.55);
  border: 1px solid rgba(255, 45, 61, 0.32);
  border-radius: 16px;
  padding: 12px 12px 14px;
}
.slot-acts-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.slot-acts-title { font-size: 15px; font-weight: 800; letter-spacing: 1px; color: #fff; }
.slot-acts-note {
  font-size: 12px; font-weight: 700; color: var(--slot-gold);
  background: rgba(255, 213, 74, 0.12); border: 1px solid rgba(255, 213, 74, 0.4);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.slot-act {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 8px;
}
.slot-act:last-child { margin-bottom: 0; }
.slot-act-feat {
  background: linear-gradient(90deg, rgba(255, 45, 61, 0.22), rgba(255, 213, 74, 0.14));
  border: 1.5px solid var(--slot-gold);
  box-shadow: 0 0 16px rgba(255, 45, 61, 0.3);
}
.slot-badge {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: var(--slot-ink);
  background: linear-gradient(180deg, #fff0b0, var(--slot-gold2));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.slot-act-feat .slot-badge { background: linear-gradient(180deg, #ff9a9a, var(--slot-red)); color: #fff; }
.slot-act-body { flex: 1 1 auto; min-width: 0; }
.slot-act-label { font-size: 15px; font-weight: 800; color: var(--slot-text); line-height: 1.35; }
.slot-act-feat .slot-act-label { color: #fff; }
.slot-act-sub { font-size: 12.5px; color: var(--slot-muted); line-height: 1.3; margin-top: 1px; }
.slot-act-reward {
  flex: 0 0 auto; text-align: right;
  font-size: 20px; font-weight: 900; line-height: 1.1;
  color: var(--slot-gold);
  text-shadow: 0 0 8px rgba(255, 213, 74, 0.5);
  white-space: nowrap;
}
.slot-act-feat .slot-act-reward { color: #fff; text-shadow: 0 0 10px var(--slot-red), 0 0 4px var(--slot-red); }
.slot-act-reward small { display: block; font-size: 11px; font-weight: 700; color: var(--slot-muted); text-shadow: none; margin-top: 1px; }
.slot-act-feat .slot-act-reward small { color: #ffd9d2; }
.slot-acts-stack { margin-top: 10px; text-align: center; font-size: 13px; font-weight: 700; color: #fff; }
.slot-acts-stack b { color: var(--slot-gold); }

/* ── Sticky footer ────────────────────────────────────────────────── */
.slot-foot {
  flex: none;
  padding: 12px 20px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(0deg, var(--slot-bg-deep) 0%, #350810 70%, rgba(33, 4, 6, 0) 100%);
}
.slot-timer-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.slot-timer-label { font-size: 12px; color: var(--slot-muted); }
.slot-timer { display: flex; gap: 6px; }
.slot-tunit {
  min-width: 38px; padding: 4px 0; border-radius: 8px; text-align: center;
  background: rgba(255, 213, 74, 0.14); border: 1px solid rgba(255, 45, 61, 0.4);
}
.slot-tnum { font-size: 17px; font-weight: 900; color: var(--slot-gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.slot-tlbl { font-size: 10px; color: var(--slot-muted); }
.slot-timer-done { font-size: 14px; font-weight: 800; color: var(--slot-red2); }

.slot-cta {
  display: flex; align-items: center; justify-content: center;
  min-height: 54px; border-radius: 14px;
  color: var(--slot-ink); text-decoration: none;
  background: linear-gradient(90deg, var(--slot-gold), #fff0b0 50%, var(--slot-gold2));
  box-shadow: 0 8px 22px rgba(255, 179, 0, 0.45);
  font-size: clamp(17px, 5vw, 19px); font-weight: 900;
  transition: transform .15s, box-shadow .15s;
}
.slot-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 179, 0, 0.6); }
.slot-card.slot-win .slot-cta { animation: slotPulse 1.1s ease-in-out infinite; }
@keyframes slotPulse {
  50% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(255, 213, 74, 0.25), 0 12px 30px rgba(255, 179, 0, 0.6); }
}

.slot-terms { margin: 10px 0 0; font-size: 12.5px; color: var(--slot-muted); }
.slot-terms summary { cursor: pointer; color: var(--slot-gold); font-weight: 700; list-style: none; padding: 6px 0; }
.slot-terms summary::-webkit-details-marker { display: none; }
.slot-terms summary::before { content: "▸ "; }
.slot-terms[open] summary::before { content: "▾ "; }
.slot-terms p { margin: 6px 0 0; line-height: 1.6; color: #d8b6ae; }
.slot-rg { margin-top: 8px; text-align: center; font-size: 11.5px; color: #b08c86; }

/* ── Confetti ─────────────────────────────────────────────────────── */
.slot-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 7; border-radius: 22px; }
.slot-conf { position: absolute; top: -20px; font-size: 18px; will-change: transform; animation: slotFall linear forwards; }
@keyframes slotFall {
  0%   { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(560px) rotate(720deg); opacity: 0; }
}

/* ── Mobile: bottom drawer ────────────────────────────────────────── */
@media (max-width: 520px) {
  .slot-promo-active { padding-bottom: clamp(72px, 23vw, 106px); }
  .slot-footer-promo { right: 8px; bottom: 8px; left: 8px; }
  .slot-backdrop { place-items: end center; padding: 0; }
  .slot-card {
    width: 100%;
    max-height: 94vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
  }
  .slot-backdrop.is-visible .slot-card { transform: translateY(0); }
  .slot-head { padding: 20px 18px 10px; }
  .slot-body { padding: 10px 16px 8px; }
  .slot-foot { padding: 12px 16px 16px; }
  .slot-spin { letter-spacing: 3px; }
}

/* very narrow phones (down to 320px) */
@media (max-width: 360px) {
  .slot-head { padding: 18px 14px 8px; }
  .slot-body { padding: 8px 12px 8px; }
  .slot-foot { padding: 12px 12px 16px; }
  .slot-act { gap: 8px; padding: 9px 8px; }
  .slot-act-reward { font-size: 17px; }
  .slot-badge { width: 26px; height: 26px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .slot-footer-promo, .slot-backdrop, .slot-card, .slot-banner, .slot-cta, .slot-conf,
  .slot-bulb, .slot-title, .slot-machine.slot-win-glow { transition: none; animation: none; }
}
