/* Dragon Tiger and Lucky 77 on top of the Tin Patti style sheet (header, chips, timer, sheets and pop-up come from there). */

/* ---------------------------------------------------------------- shared */
.game-content { justify-content: space-between; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; }
.road { position: relative; z-index: 3; flex: none; display: flex; align-items: center; gap: 4px; margin: 0 10px 6px; padding: 5px 8px; border-radius: 999px; overflow: hidden; }
.road > span { font-size: 9px; font-weight: 800; letter-spacing: 1.4px; color: var(--soft); text-transform: uppercase; margin-right: 2px; }
.bead { flex: none; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 900; border: 1.5px solid rgba(255,255,255,.55); }
.bead img { width: 15px; height: 15px; object-fit: contain; }
.bead.new { box-shadow: 0 0 0 2px var(--gold), 0 0 10px var(--gold); }
.bets { display: grid; gap: 6px; padding: 0 10px 6px; }
.bet { --c: #8e6bff; position: relative; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px 6px; border-radius: 16px;
  background: linear-gradient(175deg, color-mix(in srgb, var(--c) 42%, #14123a), rgba(14, 12, 40, .92) 70%); border: 1.5px solid color-mix(in srgb, var(--c) 80%, #fff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 16px rgba(0,0,0,.4); }
.bet-name { font-size: 11px; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; }
.bet-x { font-size: 22px; font-weight: 900; line-height: 1; color: var(--gold); text-shadow: 0 2px 0 rgba(60,25,0,.7), 0 0 14px rgba(255,200,61,.5); }
.bet-pot { font-size: 9px; color: var(--soft); text-transform: uppercase; letter-spacing: 1px; }
.bet-pot b { font-size: 12.5px; color: #fff; margin-left: 3px; letter-spacing: 0; }
.bet-you { margin-top: 3px; font-size: 10px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.38); }
.bet-you b { color: var(--gold); }
.bet.has-chip::after { content: ""; position: absolute; top: -7px; right: -4px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, #8e6bff 0 45%, #fff 46% 62%, #8e6bff 63%); box-shadow: 0 4px 8px rgba(0,0,0,.5); transition: opacity .15s ease; }
.bet.is-pending::after { opacity: .45; filter: saturate(.6); }
.bet.is-pending .bet-you { opacity: .6; }
.is-dim { filter: saturate(.35) brightness(.55); }
.bet.is-winner { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 26px rgba(255,200,61,.75); transform: translateY(-4px); }
.verdict { padding: 7px 24px; border-radius: 999px; font-size: 17px; font-weight: 900; background: var(--grad); box-shadow: 0 0 28px rgba(255,79,163,.75), inset 0 1px 0 rgba(255,255,255,.4); white-space: nowrap; }

/* ---------------------------------------------------------------- Dragon Tiger */
.game-viewport.dt { background: linear-gradient(180deg, rgba(11,11,26,0) 0%, rgba(11,11,26,.05) 52%, rgba(11,11,26,.82) 80%, #0b0b1a 100%), url("../assets/dragon_tiger/bg.webp") center top / cover no-repeat, #0b0b1a; }
.dt .brand-title { letter-spacing: 1.5px; }
.brand-sub { display: inline-block; margin-top: 5px; padding: 3px 12px; border-radius: 999px; background: rgba(12, 8, 40, .62); color: #e4dcff; }
.arena { --m: clamp(150px, 32vh, 272px); position: relative; width: 100%; flex: 1; min-height: 0; }
.fighter { position: absolute; bottom: 44px; height: var(--m); width: auto; filter: drop-shadow(0 8px 18px rgba(0,0,0,.55)); }
.fighter.left { left: -34px; }
.fighter.right { right: -44px; }
.fighter.win { filter: drop-shadow(0 0 20px var(--gold)) drop-shadow(0 8px 18px rgba(0,0,0,.55)); transform: translateY(-6px) scale(1.04); }
.deck-table { position: absolute; left: -22%; right: -22%; bottom: -46px; height: 112px; border-radius: 50% 50% 0 0 / 62px 62px 0 0;
  background: linear-gradient(180deg, #3a2488 0%, #1c1454 45%, #0b0b1a 100%); border-top: 3px solid #ff4fa3; box-shadow: 0 -6px 30px rgba(255,79,163,.45), inset 0 3px 0 rgba(255,255,255,.18); }
.duel { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; gap: 14px; z-index: 2; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.slot .pcard { --w: clamp(54px, 15vw, 66px); transform: none; margin: 0; }
.slot.win .pcard { box-shadow: 0 0 0 2.5px var(--gold), 0 0 24px var(--gold); transform: translateY(-6px) scale(1.06); }
.ribbon { font-size: 10px; font-weight: 900; letter-spacing: 1.6px; padding: 3px 11px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.65); }
.ribbon.d { background: linear-gradient(135deg, #7c4dff, #27c6e3); }
.ribbon.t { background: linear-gradient(135deg, #ff7a1a, #ff3d86); }
.vs { align-self: center; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 22px; font-size: 16px; font-weight: 900; font-style: italic;
  background: radial-gradient(circle at 50% 30%, #fff3b0, #ffc83d 45%, #b86f00); color: #3a1200; border: 3px solid #fff2c4; box-shadow: 0 0 24px rgba(255,200,61,.8); }
.dt .bets { grid-template-columns: 1fr .78fr 1fr; }
.bet.dragon { --c: #7c4dff; }
.bet.tie { --c: #12b886; }
.bet.tiger { --c: #ff5c4d; }
.bead.d { background: linear-gradient(135deg, #7c4dff, #27c6e3); }
.bead.t { background: linear-gradient(135deg, #ff7a1a, #ff3d86); }
.bead.e { background: linear-gradient(135deg, #12b886, #27e3a1); color: #06251a; }

/* ---------------------------------------------------------------- Lucky 77 */
.game-viewport.l7 { background:
  radial-gradient(120% 52% at 50% 36%, rgba(255,79,163,.42), transparent 62%),
  radial-gradient(90% 40% at 50% 100%, rgba(142,107,255,.35), transparent 70%),
  linear-gradient(180deg, #150b3d 0%, #2b1266 34%, #1a0c46 62%, #0b0b1a 100%); }
.l7 .sunburst { position: absolute; left: 50%; top: 38%; width: 190%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; opacity: .2; animation: spin 40s linear infinite;
  background: repeating-conic-gradient(#ff9ad0 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0 22%, transparent 56%); mask: radial-gradient(circle, #000 0 22%, transparent 56%); }
.l7 .stars { position: absolute; inset: 0 0 35% 0; pointer-events: none; opacity: .8; background:
  radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent 60%), radial-gradient(1px 1px at 28% 8%, #fff, transparent 60%), radial-gradient(2px 2px at 84% 14%, #ffd9ef, transparent 60%),
  radial-gradient(1px 1px at 72% 30%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 6% 44%, #c9b8ff, transparent 60%), radial-gradient(1px 1px at 93% 52%, #fff, transparent 60%),
  radial-gradient(1.5px 1.5px at 52% 5%, #fff, transparent 60%), radial-gradient(1px 1px at 40% 27%, #ffd9ef, transparent 60%); }
.l7 .floaty { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 35% 30%, #fff3b0 0 14%, #ffd54a 15% 48%, #f2a30f 49% 60%, #ffcf45 61% 74%, #b86f00 75%);
  box-shadow: 0 0 14px rgba(255,200,61,.65); }
.brand-title.gold { background: linear-gradient(180deg, #fffbe0 15%, #ffe27a 45%, #ffb11f 70%, #ff7ab8); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 4px;
  filter: drop-shadow(0 2px 0 rgba(80,20,90,.95)) drop-shadow(0 0 18px rgba(255,177,31,.6)); }
.slotbox { position: relative; width: calc(100% - 22px); margin-top: auto; margin-bottom: auto; padding-top: clamp(60px, 10.5vh, 92px); }
.cat { position: absolute; left: 50%; top: 0; translate: -50% 0; height: clamp(74px, 13vh, 112px); width: auto; z-index: 3; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.machine { position: relative; z-index: 2; padding: 17px 14px 15px; border-radius: 34px 34px 24px 24px;
  background: linear-gradient(180deg, #7a3ce0 0%, #4b1fa6 38%, #2a1070 100%) padding-box, linear-gradient(180deg, #fff3b0, #ffc83d 30%, #b86f00 62%, #ffe27a) border-box;
  border: 5px solid transparent; box-shadow: 0 0 34px rgba(255,79,163,.55), 0 18px 34px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.35); }
.bulbs { position: absolute; left: 22px; right: 22px; display: flex; justify-content: space-between; }
.bulbs.top { top: 5px; } .bulbs.bottom { bottom: 4px; }
.bulbs i { width: 7px; height: 7px; border-radius: 50%; background: #fff6c9; box-shadow: 0 0 8px 2px rgba(255,214,90,.9); animation: blink 1s steps(1) infinite; }
.bulbs i:nth-child(even) { animation-delay: .5s; }
@keyframes blink { 50% { background: #ff8fc6; box-shadow: 0 0 8px 2px rgba(255,79,163,.9); } }
.reels { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 8px; border-radius: 20px; background: #150a3a; box-shadow: inset 0 4px 14px rgba(0,0,0,.75), 0 0 0 2px rgba(255,226,122,.75); }
.reel { position: relative; height: clamp(104px, 17.5vh, 156px); border-radius: 13px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #b9a6ee 0%, #fff 30%, #fff 70%, #b9a6ee 100%); box-shadow: inset 0 0 0 1px rgba(80,40,160,.35); }
.reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(21,10,58,.72), transparent 30%, transparent 70%, rgba(21,10,58,.72)); }
.reel img { width: 80%; height: 38%; object-fit: contain; flex: none; filter: drop-shadow(0 4px 5px rgba(40,10,90,.35)); }
.reel img.side { opacity: .75; scale: .82; }
.reel.spinning img { filter: blur(5px) drop-shadow(0 4px 5px rgba(40,10,90,.35)); scale: 1 1.25; }
.payline { position: absolute; left: -4px; right: -4px; top: 50%; height: 3px; translate: 0 -50%; background: linear-gradient(90deg, #ff4fa3, rgba(255,79,163,.15) 18%, rgba(255,79,163,.15) 82%, #ff4fa3); box-shadow: 0 0 12px #ff4fa3; z-index: 2; }
.payline::before, .payline::after { content: ""; position: absolute; top: 50%; translate: 0 -50%; border: 9px solid transparent; }
.payline::before { left: -3px; border-left-color: #ffc83d; } .payline::after { right: -3px; border-right-color: #ffc83d; }
.machine.is-win { animation: glow .7s ease-in-out infinite alternate; }
.machine.is-win .reel::after { background: linear-gradient(180deg, rgba(21,10,58,.8), transparent 26%, transparent 74%, rgba(21,10,58,.8)); }
.machine.is-win .reel img.mid { scale: 1.14; filter: drop-shadow(0 0 12px #ffc83d); }
@keyframes glow { to { box-shadow: 0 0 62px rgba(255,200,61,.95), 0 18px 34px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.35); } }
.plate { margin: 8px auto 0; width: fit-content; padding: 4px 16px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 2.4px; color: #3a1200;
  background: linear-gradient(180deg, #fff3b0, #ffc83d 60%, #f09a0c); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.l7 .machine { padding-top: 15px; padding-bottom: 12px; }
.l7 .bets { grid-template-columns: repeat(3, 1fr); }
.l7 .bet img { width: 42px; height: clamp(24px, 4vh, 34px); object-fit: contain; margin-bottom: 1px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.bet.melon { --c: #12b886; } .bet.seven { --c: #ffb11f; } .bet.mango { --c: #ff7a1a; }
.bead.l { width: 22px; height: 22px; background: rgba(255,255,255,.92); }

/* ---------------------------------------------------------------- the half-height sheet inside a room */
@media (max-height: 660px) {
  .brand-sub, .road { display: none; }
  .brand-title { white-space: nowrap; font-size: 19px; letter-spacing: 1px; }
  .brand-title.gold { letter-spacing: 2px; }
  .arena { --m: clamp(130px, 37vh, 208px); }
  .fighter { bottom: 22px; }
  .fighter.left { left: -26px; } .fighter.right { right: -34px; }
  .deck-table { bottom: -66px; }
  .slot { gap: 2px; }
  .slot .pcard { --w: 40px; }
  .vs { width: 34px; height: 34px; font-size: 12px; margin-bottom: 14px; }
  .ribbon { font-size: 8.5px; padding: 2px 8px; }
  .bets { gap: 5px; padding-bottom: 4px; }
  .bet { padding: 3px 4px 4px; border-radius: 12px; }
  .bet-name { font-size: 9.5px; }
  .bet-x { font-size: 17px; }
  .bet-you { margin-top: 1px; padding: 1px 8px; }
  .verdict { padding: 5px 16px; font-size: 14px; }
  .slotbox { padding-top: 40px; }
  .cat { height: 58px; }
  .l7 .machine { padding: 9px 10px; }
  .l7 .plate, .l7 .bulbs { display: none; }
  .reels { padding: 5px; gap: 5px; }
  .reel { height: clamp(88px, 21vh, 124px); gap: 2px; }
  .l7 .bet img { height: 20px; width: 28px; margin: 0; }
}

/* ---------------------------------------------------------------- the running game */
#road { display: flex; gap: 4px; overflow: hidden; min-width: 0; flex: 1; }
.road-beads { display: flex; gap: 4px; }
.status { flex: none; display: flex; justify-content: center; align-items: center; height: clamp(50px, 7.6vh, 62px); }
.status .timer-circle { width: clamp(40px, 6.4vh, 54px); }
.game-viewport.is-closed .chips { opacity: .55; }
/* the two pictures of the people at the foot of each result card */
.dt .result-emblem { --face: url("../assets/dragon_tiger/dragon.webp"); background: var(--face) center 8% / 150% no-repeat, radial-gradient(circle, #4a36a6, #17123f); }
.dt [data-seat="tiger"] .result-emblem { --face: url("../assets/dragon_tiger/tiger.webp"); }
.l7 .result-emblem { --face: url("../assets/lucky77/cat.webp"); background: var(--face) center 10% / 135% no-repeat, radial-gradient(circle, #4a36a6, #17123f); }
/* Dragon Tiger: the card holder, and a card turning over */
.slot .card-face { display: flex; justify-content: center; }
.slot .card-face.turn .pcard { animation: dt-turn .55s cubic-bezier(.2, 1.4, .4, 1) backwards; }
@keyframes dt-turn { from { transform: rotateY(90deg) scale(.8); } }
.vs.win { box-shadow: 0 0 0 3px var(--gold), 0 0 34px var(--gold); transform: scale(1.15); }
.slot, .fighter, .vs, .bet { transition: filter .3s ease, transform .25s cubic-bezier(.2, 1.4, .4, 1); }
/* Lucky 77: the reels while they turn */
.reel.spinning img { animation: reel-run .12s linear infinite; }
@keyframes reel-run { from { translate: 0 -9px; } to { translate: 0 9px; } }
.reel.stopped { animation: reel-stop .35s cubic-bezier(.3, 1.9, .5, 1); }
@keyframes reel-stop { from { translate: 0 -14px; } }
/* history list */
.round-list { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; }
.round-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 12px; color: var(--soft); }
.round-row b { color: #fff; text-align: right; }
@media (max-height: 660px) { .status { height: 40px; } .status .timer-circle { width: 34px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .sunburst, .bulbs i, .reel.spinning img, .reel.stopped, .machine.is-win, .slot .card-face.turn .pcard { animation: none !important; } }

/* ---------------------------------------------------------------- Lucky 77 on any height: the reels give way, never the timer */
.brand { flex: none; }
.l7 .stage > .slotbox { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.slotbox .machine { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.slotbox .reels { flex: 0 1 auto; min-height: 64px; height: calc(clamp(104px, 17.5vh, 156px) + 16px); grid-template-rows: minmax(0, 1fr); }
.slotbox .reel { height: auto; min-height: 0; }
.slotbox .plate, .slotbox .bulbs { flex: none; }
@media (max-height: 760px) {
  .brand-logo { height: 40px; }
  .brand-sub { margin-top: 2px; }
  .l7 .stage > .slotbox { padding-top: 54px; }
  .slotbox .cat { height: 66px; }
}
@media (max-height: 660px) {
  .brand-logo { height: 30px; }
  .l7 .stage > .slotbox { padding-top: 40px; }
  .slotbox .cat { height: 54px; }
  .slotbox .reels { height: calc(clamp(88px, 21vh, 124px) + 10px); }
}
@media (min-height: 661px) and (max-height: 700px) {
  .l7 .brand-sub, .l7 .plate { display: none; }
}

/* ---------------------------------------------------------------- Lucky 77: the machine first (owner, 2026-11-26: bigger reels,
   smaller title in the corner, smaller bet panels and chips). The app keeps clear of the phone's bars itself, so no inset here. */
.game-viewport.l7 .game-header { padding-top: 6px; }
.game-viewport.l7 .stage { position: relative; }
.game-viewport.l7 .stage > .brand { position: absolute; left: 12px; top: 8px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 0; }
.game-viewport.l7 .brand-logo { display: block; height: 22px; margin: 0; }
.game-viewport.l7 .brand-title { font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.game-viewport.l7 .brand-sub { display: none; }
.game-viewport.l7 .stage > .slotbox { flex: 1 1 0; min-height: 0; justify-content: center; margin: 0; padding-top: 0; width: calc(100% - 14px); }
.game-viewport.l7 .slotbox .cat { position: relative; left: auto; top: auto; translate: none; align-self: center; flex: none; height: clamp(58px, 11vh, 92px); margin-bottom: -16px; }
.game-viewport.l7 .machine { padding: 15px 10px 12px; }
.game-viewport.l7 .slotbox .reels { height: clamp(150px, 31vh, 270px); min-height: 80px; gap: 6px; padding: 6px; }
.game-viewport.l7 .reel img { height: 42%; width: 88%; }
.game-viewport.l7 .status { height: 46px; }
.game-viewport.l7 .status .timer-circle { width: 42px; font-size: 17px; }
.game-viewport.l7 .verdict { padding: 5px 18px; font-size: 15px; }
.game-viewport.l7 .road { margin-bottom: 5px; padding: 3px 8px; }
.game-viewport.l7 .bets { gap: 5px; padding: 0 8px 4px; }
.game-viewport.l7 .bet { padding: 4px 3px 4px; border-radius: 13px; gap: 0; }
.game-viewport.l7 .bet img { height: 24px; width: 32px; margin: 0; }
.game-viewport.l7 .bet-name { font-size: 9px; letter-spacing: 1.2px; }
.game-viewport.l7 .bet-x { font-size: 16px; }
.game-viewport.l7 .bet-pot { font-size: 8px; }
.game-viewport.l7 .bet-pot b { font-size: 10.5px; }
.game-viewport.l7 .bet-you { margin-top: 1px; padding: 1px 8px; font-size: 9px; }
.game-viewport.l7 .coin-area { padding: 3px 10px 5px; }
.game-viewport.l7 .balance-row { margin-bottom: 5px; }
.game-viewport.l7 .coin-balance, .game-viewport.l7 .history-btn { height: 26px; }
.game-viewport.l7 .history-btn { width: 26px; }
.game-viewport.l7 .history-btn.orb-btn { width: 34px; height: 34px; }
.game-viewport.l7 .chip-item { width: clamp(40px, 11.5vw, 48px); }
.game-viewport.l7 .chip-item span { font-size: 11px; }
.game-viewport.l7 .chip-item.active { transform: translateY(-4px) scale(1.08); }
@media (max-height: 660px) {
  .game-viewport.l7 .brand-logo { display: none; }
  .game-viewport.l7 .brand-title { font-size: 14px; }
  .game-viewport.l7 .slotbox .cat { height: 46px; margin-bottom: -12px; }
  .game-viewport.l7 .slotbox .reels { height: clamp(96px, 28vh, 170px); }
  .game-viewport.l7 .machine { padding: 8px; }
  .game-viewport.l7 .road { display: none; }
  .game-viewport.l7 .status { height: 38px; }
  .game-viewport.l7 .status .timer-circle { width: 34px; font-size: 13px; }
  .game-viewport.l7 .bet img { display: none; }
  .game-viewport.l7 .chip-item { width: 40px; }
}
/* the coin that would sit on the corner title */
.game-viewport.l7 > i.floaty:nth-of-type(1), .game-viewport.l7 > i.floaty:nth-of-type(5) { display: none; }

/* Wish Live Pro: coins are bought outside the game, so the page has no Top Up button (like our other games) */
.game-viewport.l7 .btn-topup { display: none; }
