/* ===== Slot games: shared layout + per-game themes (.theme-borneo / .theme-phuket) ===== */
.game-shell {
    /* Borneo Dream (default) palette */
    --accent: #4ff0cf; --accent-glow: rgba(60,255,200,.7);
    --gold: #ffd35a; --gold-soft: #ffe27a; --gold-deep: #b37a12; --ink: #4a2e00;
    --panel: linear-gradient(rgba(8,45,36,.92), rgba(3,20,16,.92)); --panel-solid: #031511;
    --border: #b8902f; --border-hi: #d8aa3a;
    --tile-a: #15493f; --tile-b: #061c18; --grid-a: #0b3a30; --grid-b: #031511;
    --frame: linear-gradient(145deg, #fff0a8, #c8942a 20%, #6b4a0e 50%, #c8942a 80%, #fff0a8);
    --frame-glow: rgba(255,200,70,.35);
    --cta-a: #2fd59a; --cta-b: #0a6a50; --cta-shadow: #04382a; --cta-glow: rgba(80,255,190,.4);
    --spin-a: #6fffc2; --spin-b: #14a676; --spin-c: #065a43;
    --round-a: #1a5448; --round-b: #06201b;
    --line: #5ffbe0; --modal: linear-gradient(#0d3a30, #051a15);
    --free-a: #2a3f9a; --free-b: #141f55; --free-line: #9fb8ff; --free-glow: rgba(120,150,255,.6);
    --text: #f6e7b4;
    position: relative; min-height: calc(100vh - var(--topbar-h, 60px)); min-height: calc(100dvh - var(--topbar-h, 60px));
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: 8px 10px 14px; box-sizing: border-box; overflow: hidden; gap: 6px; color: var(--text);
}
.game-shell.theme-phuket {
    --accent: #48e6ff; --accent-glow: rgba(72,230,255,.7);
    --gold: #ffd77a; --gold-soft: #ffe7a6; --gold-deep: #e0782f; --ink: #5a2408;
    --panel: linear-gradient(rgba(6,58,82,.9), rgba(3,28,46,.94)); --panel-solid: #04223a;
    --border: #f0be6a; --border-hi: #ffd08a;
    --tile-a: #1d7092; --tile-b: #07334c; --grid-a: #0d4f6e; --grid-b: #031a2c;
    --frame: linear-gradient(145deg, #fff3d6, #f2b56b 18%, #c8643a 48%, #f2b56b 80%, #fff3d6);
    --frame-glow: rgba(255,170,90,.4);
    --cta-a: #ff9b6a; --cta-b: #d24a3a; --cta-shadow: #6a1d15; --cta-glow: rgba(255,140,100,.45);
    --spin-a: #9ff4ff; --spin-b: #19a9d6; --spin-c: #0a4f7a;
    --round-a: #116288; --round-b: #052a40;
    --line: #fff07a; --modal: linear-gradient(#0b4a68, #052338);
    --free-a: #b0306a; --free-b: #4a1450; --free-line: #ffb3d9; --free-glow: rgba(255,120,190,.55);
    --text: #fff4dc;
}
.game-shell > * { position: relative; z-index: 2; }
.game-shell.shake { animation: shake .4s linear 2; }
@keyframes shake { 25% { transform: translate(-4px, 2px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-2px, -3px); } }

/* ---- Background scenery ---- */
.game-shell > .bg-layer, .game-shell > .bg-temple, .game-shell > .vines, .game-shell > .mist, .game-shell > .rays,
.game-shell > .sea-shimmer, .game-shell > .waves, .game-shell > .sun-glow, .game-shell > .palm-shade,
.game-shell > .ambient-canvas, .game-shell > .fx-layer { position: absolute; z-index: 0; pointer-events: none; }
.bg-layer { inset: 0; transition: background 1.2s, filter 1.2s; background:
    radial-gradient(ellipse at 50% -10%, rgba(255,230,150,.35), transparent 45%),
    radial-gradient(ellipse at 50% 30%, rgba(80,200,170,.30), transparent 60%),
    radial-gradient(ellipse at 10% 100%, rgba(20,120,60,.7), transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(10,100,90,.7), transparent 50%),
    linear-gradient(#0d3a30, #062019 60%, #030d0a); }
.free-mode .bg-layer { background:
    radial-gradient(ellipse at 50% -10%, rgba(180,160,255,.45), transparent 45%),
    radial-gradient(ellipse at 50% 30%, rgba(80,120,255,.35), transparent 60%),
    radial-gradient(ellipse at 10% 100%, rgba(90,40,160,.6), transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(30,80,180,.6), transparent 50%),
    linear-gradient(#141a48, #0a0f2a 60%, #04060f); }
.bg-temple { left: 50%; bottom: 0; width: min(900px, 120vw); height: 55vh; transform: translateX(-50%); opacity: .35;
    background:
    linear-gradient(#021310, #021310) 50% 100% / 90% 18% no-repeat,
    linear-gradient(#03201a, #03201a) 50% 82% / 70% 16% no-repeat,
    linear-gradient(#042a22, #042a22) 50% 66% / 50% 16% no-repeat,
    linear-gradient(#05332a, #05332a) 50% 50% / 32% 16% no-repeat,
    linear-gradient(#063c31, #063c31) 50% 34% / 16% 16% no-repeat; }
.vines { top: 0; width: 120px; height: 100%; opacity: .7;
    background: repeating-linear-gradient(180deg, transparent 0 18px, rgba(40,140,60,.55) 18px 30px),
                linear-gradient(90deg, rgba(10,60,30,.9), transparent);
    -webkit-mask: linear-gradient(#000, transparent 85%); mask: linear-gradient(#000, transparent 85%); }
.vines.left { left: 0; }
.vines.right { right: 0; transform: scaleX(-1); }
.mist { inset: 0; background: linear-gradient(90deg, transparent, rgba(200,255,240,.08), transparent); background-size: 200% 100%; animation: mist 18s linear infinite; }
@keyframes mist { to { background-position: -200% 0; } }
.rays { left: 50%; top: -20%; width: 140vw; height: 90vh; transform: translateX(-50%);
    background: repeating-conic-gradient(from 180deg at 50% 0%, rgba(255,240,180,.06) 0 4deg, transparent 4deg 12deg);
    -webkit-mask: radial-gradient(ellipse at 50% 0%, #000, transparent 70%); mask: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
    animation: sway 12s ease-in-out infinite alternate; }
@keyframes sway { to { transform: translateX(-50%) rotate(4deg); } }

/* Phuket Beach scenery */
.bg-layer.bg-phuket { background:
    linear-gradient(rgba(4,30,50,.15), rgba(3,20,36,.55)),
    url("../images/phuket-beach/background.svg") center 40% / cover no-repeat, #0a4d6e; }
.free-mode .bg-layer.bg-phuket { background:
    linear-gradient(rgba(120,30,90,.35), rgba(40,10,60,.65)),
    url("../images/phuket-beach/background.svg") center 40% / cover no-repeat, #3a1450; filter: saturate(1.25) hue-rotate(-18deg); }
.sea-shimmer { left: 0; right: 0; top: 42%; height: 26%; opacity: .55; mix-blend-mode: screen;
    background: repeating-linear-gradient(100deg, transparent 0 22px, rgba(255,255,255,.18) 22px 24px, transparent 24px 60px);
    background-size: 240px 100%; animation: shimmer 9s linear infinite;
    -webkit-mask: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
@keyframes shimmer { to { background-position: 240px 0; } }
.waves { left: -10%; right: -10%; bottom: 0; height: 22vh; }
.waves i { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    background: linear-gradient(rgba(140,235,255,.22), rgba(20,120,170,.12)); animation: wave 7s ease-in-out infinite alternate; }
.waves i:nth-child(2) { height: 70%; opacity: .8; animation-duration: 9s; animation-delay: -2s; }
.waves i:nth-child(3) { height: 40%; opacity: .7; animation-duration: 6s; animation-delay: -4s; background: linear-gradient(rgba(255,240,210,.18), rgba(240,200,140,.12)); }
@keyframes wave { from { transform: translateX(-3%) translateY(4px); } to { transform: translateX(3%) translateY(-6px); } }
.sun-glow { left: 50%; top: -18vh; width: 70vh; height: 70vh; transform: translateX(-50%); border-radius: 50%;
    background: radial-gradient(circle, rgba(255,226,150,.45), rgba(255,170,90,.12) 45%, transparent 70%); animation: glow 6s ease-in-out infinite alternate; }
.free-mode .sun-glow { background: radial-gradient(circle, rgba(255,150,200,.5), rgba(200,80,160,.15) 45%, transparent 70%); }
@keyframes glow { to { opacity: .65; transform: translateX(-50%) scale(1.06); } }
.palm-shade { top: 0; width: 34vw; max-width: 380px; height: 70%; opacity: .55;
    background:
        radial-gradient(ellipse 60% 14% at 30% 8%, rgba(2,30,24,.9), transparent 70%),
        radial-gradient(ellipse 50% 12% at 15% 22%, rgba(2,30,24,.85), transparent 70%),
        radial-gradient(ellipse 45% 10% at 45% 26%, rgba(2,30,24,.75), transparent 70%),
        linear-gradient(100deg, transparent 46%, rgba(30,20,10,.75) 47% 50%, transparent 51%) 0 0 / 100% 100% no-repeat;
    transform-origin: top left; animation: palm 8s ease-in-out infinite alternate; }
.palm-shade.left { left: 0; }
.palm-shade.right { right: 0; transform: scaleX(-1); animation-name: palm-r; }
@keyframes palm { to { transform: rotate(1.5deg); } }
@keyframes palm-r { to { transform: scaleX(-1) rotate(1.5deg); } }

.ambient-canvas { inset: 0; width: 100%; height: 100%; }

/* ---- Top line & header ---- */
.game-topline { width: 100%; max-width: 1150px; display: flex; align-items: center; justify-content: center; position: relative; }
.back-link { position: absolute; left: 0; top: 4px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 18px;
    background: rgba(0,0,0,.4); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 700; }
.back-link:hover { border-color: var(--gold); color: #fff; }
.game-header { display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; }
.logo { margin: 0; text-align: center; line-height: .9; font-family: Georgia, 'Times New Roman', serif; }
.logo:focus { outline: none; }
.logo span { display: block; font-size: clamp(28px, 5.2vw, 50px); letter-spacing: 3px; font-weight: 900;
    background: linear-gradient(#fff6c8, var(--gold) 45%, var(--gold-deep) 55%, var(--gold-soft)); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 0 var(--ink)) drop-shadow(0 0 14px rgba(255,200,60,.55)); }
.logo small { font-size: clamp(17px, 3.2vw, 30px); color: var(--accent); letter-spacing: 9px; text-shadow: 0 0 12px var(--accent-glow); }
.fs-counter { display: flex; align-items: baseline; gap: 6px; background: linear-gradient(var(--free-a), var(--free-b)); border: 2px solid var(--free-line); border-radius: 14px; padding: 6px 14px; font-weight: 700; box-shadow: 0 0 20px var(--free-glow); }
.fs-counter b { font-size: 26px; color: #fff; }
.fs-counter em { font-style: normal; opacity: .75; }
.fs-mult { margin-left: 8px; color: #ffe27a; font-size: 22px; text-shadow: 0 0 10px #ffb400; }
.demo-tag { font-size: 11px; opacity: .7; }

/* ---- Stage ---- */
.stage { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; max-width: 1150px; }
.side-panel { display: flex; flex-direction: column; gap: 10px; width: 150px; flex: 0 0 150px; }
.info-card { background: var(--panel); border: 2px solid var(--border); border-radius: 12px; padding: 10px; font-size: 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.info-card b { color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.info-card .ic { width: 48px; height: 48px; object-fit: contain; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.info-card.lines b { font-size: 34px; }
.glow-gold { box-shadow: 0 0 14px rgba(255,200,70,.35); }
.glow-blue { border-color: #6fc8ff; box-shadow: 0 0 14px rgba(90,180,255,.45); }
@keyframes bob { 50% { transform: translateY(-4px); } }
.mult-card .mult-val { font-size: 40px; color: #fff; text-shadow: 0 0 16px #6fc8ff; animation: pop .5s ease-out; }
@keyframes pop { from { transform: scale(2); opacity: 0; } }
.ladder { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.ladder i { font-style: normal; font-size: 10px; padding: 1px 4px; border-radius: 5px; background: rgba(0,0,0,.45); opacity: .55; }
.ladder i.on { background: #3d6aff; opacity: 1; color: #fff; }

/* ---- Reels ---- */
.reel-frame { position: relative; padding: 12px; border-radius: 16px; flex: 0 1 660px; min-width: 0;
    background: var(--frame); box-shadow: 0 0 50px var(--frame-glow), 0 10px 30px rgba(0,0,0,.6), inset 0 0 12px #000; }
.free-mode .reel-frame { box-shadow: 0 0 60px var(--free-glow), 0 10px 30px rgba(0,0,0,.6), inset 0 0 12px #000; }
.frame-gem { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #b6ffe8, #10b585 50%, #04473a); box-shadow: 0 0 12px #3fffc5; z-index: 6; }
.theme-phuket .frame-gem { background: radial-gradient(circle at 35% 35%, #fff, #ffc4d8 40%, #e86a8a 75%); box-shadow: 0 0 12px #ffb3c8; }
.frame-gem.tl { top: -8px; left: -8px; } .frame-gem.tr { top: -8px; right: -8px; }
.frame-gem.bl { bottom: -8px; left: -8px; } .frame-gem.br { bottom: -8px; right: -8px; }
.reel-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; background: radial-gradient(ellipse at 50% 30%, var(--grid-a), var(--grid-b)); padding: 6px; border-radius: 8px; }
.reel { position: relative; display: grid; grid-template-rows: repeat(3, 1fr); gap: 6px; overflow: hidden; border-radius: 8px; aspect-ratio: 1 / 3.1; min-width: 0; }
.reel .strip { display: flex; flex-direction: column; gap: 6px; animation: roll .22s linear infinite; }
.reel.spinning { grid-template-rows: 1fr; }
@keyframes roll { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.reel.anticipation { box-shadow: 0 0 0 3px #6fe8ff, 0 0 30px 8px #3fb8ff; animation: antic .4s ease-in-out infinite alternate; }
.reel.anticipation .strip { animation-duration: .12s; }
@keyframes antic { to { box-shadow: 0 0 0 3px #fff, 0 0 40px 14px #6fe8ff; } }
.reel.wild-reel { box-shadow: 0 0 0 3px var(--gold), 0 0 30px 6px #ffb400; }
.reel.wild-reel .tile { background: radial-gradient(circle, #a8820f, #3a2a04); animation: wildglow 1s ease-in-out infinite alternate; }
.theme-phuket .reel.wild-reel .tile { background: radial-gradient(circle, #23b39a, #064a4a); }
@keyframes wildglow { to { filter: brightness(1.3); } }
.wild-reel-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-12deg); font-weight: 900; font-size: clamp(16px, 3vw, 28px); letter-spacing: 3px; color: #fff6c8; text-shadow: 0 0 12px #ffb400, 0 2px 0 #4a2e00; animation: pop .6s ease-out; z-index: 4; }
.line-overlay { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); pointer-events: none; z-index: 5; }
.line-overlay polyline { fill: none; stroke: var(--line); stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 5px; filter: drop-shadow(0 0 6px var(--line)); stroke-dasharray: 2000; animation: draw .6s ease-out; }
@keyframes draw { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } }

/* ---- Tiles ---- */
.tile { aspect-ratio: 1 / 1; border-radius: 10px; display: flex; align-items: center; justify-content: center; position: relative; border: 2px solid rgba(255,215,110,.35); min-width: 0;
    background: radial-gradient(circle at 50% 35%, var(--tile-a), var(--tile-b)); box-shadow: inset 0 -6px 12px rgba(0,0,0,.5), inset 0 3px 6px rgba(255,255,255,.08); }
.sym-img { width: 86%; height: 86%; object-fit: contain; pointer-events: none; user-select: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.tile .tag { position: absolute; bottom: 2px; font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: 1px; color: #fff3b0; background: rgba(0,0,0,.6); padding: 0 5px; border-radius: 6px; }
.k-wild { background: radial-gradient(circle, #9a7614, #2c2305); border-color: var(--gold); }
.theme-phuket .k-wild { background: radial-gradient(circle, #2fbfa5, #063f3c); }
.k-wild .sym-img { animation: bob 2.4s ease-in-out infinite; }
.k-scatter { background: radial-gradient(circle, #1f7ab0, #051c30); border-color: #5fe0ff; }
.theme-phuket .k-scatter { background: radial-gradient(circle, #ff9a5a, #7a1f3a); border-color: #ffc27a; }
.k-scatter .sym-img { filter: drop-shadow(0 0 10px #5fe0ff); }
.theme-phuket .k-scatter .sym-img { filter: drop-shadow(0 0 10px #ffb06a); }
.k-high { border-color: #f0b84a; background: radial-gradient(circle at 50% 35%, #4a3410, #1a1205); }
.theme-phuket .k-high { background: radial-gradient(circle at 50% 35%, #2a5a8a, #0a1f3a); border-color: #ffd08a; }
.tile.blur { filter: blur(2px) brightness(.85); }
.tile.drop { animation: drop .38s cubic-bezier(.3,1.6,.5,1) both; animation-delay: var(--d); }
@keyframes drop { from { transform: translateY(-70%); opacity: 0; } to { transform: none; opacity: 1; } }
.tile.win { animation: winpulse .8s ease-in-out infinite; border-color: #fff1a8; box-shadow: 0 0 20px 5px var(--gold), inset 0 0 14px var(--gold); z-index: 3; }
.tile.win::after { content: ''; position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); background-size: 250% 100%; animation: shine 1.2s linear infinite; }
@keyframes winpulse { 50% { transform: scale(1.08); } }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* ---- Banners & win display ---- */
.feature-banner { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); z-index: 20; pointer-events: none; font-size: clamp(20px, 4vw, 40px); font-weight: 900; letter-spacing: 3px; white-space: nowrap;
    color: #fff6c8; text-shadow: 0 0 18px #ffb400, 0 3px 0 #4a2e00; animation: banner 2.2s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: translateX(-50%) scale(.4); } 15% { opacity: 1; transform: translateX(-50%) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-30px); } }
.line-info { min-height: 20px; font-size: 14px; color: var(--accent); text-shadow: 0 0 6px rgba(0,0,0,.9); text-align: center; }
.notice { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 14px; border-radius: 14px;
    background: rgba(90,20,10,.85); border: 1px solid #ff8a65; color: #ffe9df; font-size: 14px; text-align: center; }
.notice .pill { text-decoration: none; }
.bigwin-overlay { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(60,40,0,.55), rgba(0,0,0,.82)); cursor: pointer; animation: fadein .3s; overflow: hidden; }
.bigwin-overlay::before { content: ''; position: absolute; width: 900px; height: 900px; background: repeating-conic-gradient(rgba(255,210,80,.18) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: spinr 14s linear infinite; -webkit-mask: radial-gradient(#000, transparent 65%); mask: radial-gradient(#000, transparent 65%); }
.bigwin-title { position: relative; font-family: Georgia, serif; font-weight: 900; font-size: clamp(40px, 10vw, 96px); letter-spacing: 4px; text-align: center; animation: zoom .6s cubic-bezier(.3,1.6,.5,1);
    background: linear-gradient(#fff6c8, #ffd35a 45%, #b37a12 55%, #ffe58a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #4a2e00) drop-shadow(0 0 20px #ffb400); }
.tier-mega .bigwin-title { filter: drop-shadow(0 4px 0 #4a2e00) drop-shadow(0 0 26px #ff6a00); }
.tier-epic .bigwin-title { background: linear-gradient(#ffffff, #9ff 30%, #ff7af0 60%, #ffe58a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 4px 0 #2a004a) drop-shadow(0 0 30px #c45cff); }
.bigwin-amount { position: relative; font-size: clamp(34px, 8vw, 72px); font-weight: 900; color: #fff; text-shadow: 0 0 20px #ffb400; font-variant-numeric: tabular-nums; }
.bigwin-overlay small { position: relative; opacity: .75; margin-top: 10px; color: #fff; }
@keyframes zoom { from { transform: scale(.2); opacity: 0; } }
@keyframes fadein { from { opacity: 0; } }

/* coin shower (spawned by mnstFx.coins) */
.fx-layer { position: fixed !important; inset: 0; z-index: 45 !important; overflow: hidden; }
.fx-coin { position: absolute; top: -40px; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd35a 40%, #a06c0a); box-shadow: 0 0 10px #ffb400; animation: coinfall linear forwards; }
@keyframes coinfall { to { transform: translate(var(--drift), 110vh) rotateY(1080deg); } }

/* ---- Controls ---- */
.controls { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; width: 100%; max-width: 1000px;
    background: var(--panel); border: 2px solid var(--border); border-radius: 40px; padding: 8px 18px; box-sizing: border-box; box-shadow: 0 6px 24px rgba(0,0,0,.6); }
.credit { min-width: 110px; text-align: center; background: var(--panel-solid); border: 1px solid rgba(255,215,110,.35); border-radius: 12px; padding: 4px 10px; }
.credit small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--gold); opacity: .85; }
.credit strong { font-size: 20px; color: #fff; font-variant-numeric: tabular-nums; }
.credit.hl strong { color: #ffe27a; text-shadow: 0 0 8px #ffb400; }
.bet-box { display: flex; align-items: center; gap: 6px; }
.round { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--border-hi); background: radial-gradient(var(--round-a), var(--round-b)); color: var(--gold-soft); cursor: pointer; transition: transform .1s; padding: 0; }
.round .icon { width: 20px; height: 20px; }
.round:not(:disabled):hover { border-color: #fff3c0; }
.round:not(:disabled):active, .pill:not(:disabled):active { transform: scale(.9); }
.round.sm { width: 44px; height: 44px; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; border-radius: 14px; border: 2px solid var(--border-hi); background: linear-gradient(#7a5a12, #3a2a04); color: #ffe27a; font-weight: 800; font-size: 11px; padding: 6px 10px; cursor: pointer; letter-spacing: 1px; }
.theme-phuket .pill { background: linear-gradient(#c8643a, #6a2a14); }
.pill.auto.on { background: linear-gradient(#c33, #611); border-color: #f88; color: #fff; }
.tools { display: flex; gap: 8px; }
.spin-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -26px; }
.spin-btn { display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 50%; border: 4px solid var(--gold); color: #fff; cursor: pointer; padding: 0;
    background: radial-gradient(circle at 40% 30%, var(--spin-a), var(--spin-b) 45%, var(--spin-c)); box-shadow: 0 0 24px var(--cta-glow), inset 0 -6px 10px rgba(0,0,0,.4); transition: transform .1s; }
.spin-btn .icon { width: 44px; height: 44px; stroke-width: 2.6; }
.spin-btn:not(:disabled):hover { transform: scale(1.05); }
.spin-btn:not(:disabled):active { transform: scale(.92); }
.spin-btn.free { background: radial-gradient(circle at 40% 30%, #b8c8ff, #4a62ff 45%, #1a2580); border-color: #c9d4ff; }
.theme-phuket .spin-btn.free { background: radial-gradient(circle at 40% 30%, #ffc4e4, #d8408a 45%, #5a1050); border-color: #ffd3ea; }
.spin-btn.busy .spin-ic { display: inline-flex; animation: spinr .8s linear infinite; }
.auto-num { font-size: 32px; font-weight: 900; }
@keyframes spinr { to { transform: rotate(360deg); } }

/* ---- Modals ---- */
.bd-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 12px; animation: fadein .25s; }
.bd-modal { position: relative; overflow: hidden auto; background: var(--modal, linear-gradient(#123a44, #071a20)); border: 3px solid var(--border-hi, #d8aa3a); border-radius: 18px; padding: 20px; max-width: 560px; width: 100%; max-height: 90vh; max-height: 90dvh; box-sizing: border-box;
    text-align: center; color: var(--text, #f6e7b4); box-shadow: 0 0 40px rgba(255,200,70,.3); animation: zoom .4s cubic-bezier(.3,1.4,.5,1); }
.bd-modal:focus { outline: none; }
.bd-modal > * { position: relative; }
.bd-modal h2 { margin: 0 32px 12px; color: var(--gold, #ffd35a); letter-spacing: 2px; text-shadow: 0 0 12px rgba(255,180,0,.6); }
.bd-modal h3 { color: var(--accent, #4ff0cf); font-size: 15px; margin: 14px 0 6px; }
.bd-modal table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.bd-modal td, .bd-modal th { padding: 4px 6px; border-bottom: 1px solid rgba(255,215,110,.2); }
.bd-modal tbody th { font-weight: 600; }
.bd-modal tbody th small { opacity: .65; font-weight: 400; margin-left: 4px; }
.bd-modal td { text-align: right; font-variant-numeric: tabular-nums; }
.bd-modal thead th:not(:first-child) { text-align: right; }
.modal-close { position: absolute !important; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.35); color: inherit; cursor: pointer; padding: 0; }
.modal-close:hover { background: rgba(255,255,255,.12); }
.modal-close .icon { width: 18px; height: 18px; }
.modal-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.pt-ic { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; margin-right: 4px; }
.note { font-size: 12px; opacity: .85; }
.feature-list { font-size: 13px; padding-left: 18px; margin: 8px auto; display: inline-block; text-align: left; }
.feature-list.left { display: block; }
.feature-list li { margin: 4px 0; }
.lines-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; margin: 8px 0; }
.line-mini { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; }
.line-mini svg { width: 100%; height: auto; display: block; }
.line-mini rect { fill: rgba(255,255,255,.12); }
.line-mini rect.on { fill: var(--accent, #4ff0cf); }
.bd-modal .row { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 8px 0; flex-wrap: wrap; }
.bd-modal .row input[type=number] { width: 110px; }
.bd-modal .row input[type=range] { width: min(220px, 60vw); }
.bd-modal a { color: var(--accent, #4ff0cf); }
.big { font-size: clamp(40px, 10vw, 56px); font-weight: 900; margin: 6px 0; color: #ffe27a; text-shadow: 0 0 18px #ffb400; }
.bonus-back { background: radial-gradient(circle, rgba(20,40,80,.6), rgba(0,0,0,.88)); }
.bonus.fs { background: linear-gradient(var(--free-a, #1c2c78), var(--free-b, #0a0f30)); border-color: var(--free-line, #9fb8ff); box-shadow: 0 0 50px var(--free-glow, #5f7cff); }
.rays-burst { position: absolute !important; left: 50%; top: 40%; width: 800px; height: 800px; margin: -400px 0 0 -400px; background: repeating-conic-gradient(rgba(200,210,255,.14) 0 10deg, transparent 10deg 20deg); animation: spinr 20s linear infinite; pointer-events: none; }
.crystals { display: flex; justify-content: center; align-items: flex-end; gap: 10px; }
.crystals img { width: 64px; height: 64px; object-fit: contain; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 0 14px var(--accent, #5fe0ff)); }
.crystals img:nth-child(2) { animation-delay: .2s; width: 84px; height: 84px; }
.crystals img:nth-child(3) { animation-delay: .4s; }
.bonus.treasure { background: linear-gradient(#3a2a0a, #120c02); }
.theme-phuket .bonus.treasure { background: linear-gradient(#0f5a74, #04223a); }
.chests { display: flex; gap: 12px; justify-content: center; margin: 16px 0; }
.chest { width: 30%; aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--border-hi, #d8aa3a); background: radial-gradient(circle, rgba(255,255,255,.12), rgba(0,0,0,.35)); cursor: pointer; color: #ffe27a;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; transition: transform .2s, box-shadow .2s; }
.chest-img { width: 78%; height: auto; max-height: 72%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.chest:not(:disabled) { animation: bob 1.8s ease-in-out infinite; }
.chest:not(:disabled):nth-child(2) { animation-delay: .3s; }
.chest:not(:disabled):nth-child(3) { animation-delay: .6s; }
.chest:not(:disabled):hover, .chest:not(:disabled):focus-visible { transform: scale(1.08); box-shadow: 0 0 24px var(--gold, #ffd35a); }
.chest:disabled { cursor: default; opacity: .75; }
.chest.open { animation: pop .5s ease-out; }
.chest b { font-size: 15px; }
.chest.picked { box-shadow: 0 0 30px 8px var(--gold, #ffd35a); opacity: 1; background: radial-gradient(circle, rgba(255,200,80,.45), rgba(40,20,0,.5)); }

/* ---- Intro ---- */
.intro { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; overflow-y: auto;
    background: radial-gradient(ellipse at 50% 30%, rgba(30,120,95,.96), rgba(3,15,12,.98)); }
.theme-phuket .intro { background: linear-gradient(rgba(6,40,70,.55), rgba(3,18,32,.92)), url("../images/phuket-beach/background.svg") center / cover no-repeat, #06324c; }
.intro-logo { line-height: .85; font-family: Georgia, serif; animation: zoom .9s cubic-bezier(.3,1.5,.5,1); }
.intro-logo span { display: block; font-size: clamp(50px, 12vw, 110px); font-weight: 900; letter-spacing: 4px;
    background: linear-gradient(#fff6c8, var(--gold) 45%, var(--gold-deep) 55%, var(--gold-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 var(--ink)) drop-shadow(0 0 24px rgba(255,200,60,.6)); }
.intro-logo small { font-size: clamp(28px, 7vw, 64px); color: var(--accent); letter-spacing: 14px; text-shadow: 0 0 18px var(--accent-glow); }
.intro ul { list-style: none; padding: 0; margin: 6px 0; font-size: 15px; }
.intro li { margin: 4px 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.intro li .icon { width: 16px; height: 16px; color: var(--gold); }
.resume-note { background: rgba(0,0,0,.45); border: 1px solid var(--gold); border-radius: 12px; padding: 6px 12px; }
.disclaimer { opacity: .7; }

/* ---- Responsive ---- */
@media (max-width: 960px) { .side-panel { display: none; } }
@media (max-width: 640px) {
    .game-shell { padding: 6px 6px 12px; }
    .game-topline { flex-direction: column; gap: 4px; }
    .back-link { position: static; align-self: flex-start; }
    .reel-frame { flex: 1 1 100%; padding: 7px; }
    .reel-grid, .reel, .reel .strip { gap: 4px; }
    .controls { border-radius: 24px; gap: 8px; padding: 8px; margin-top: 34px; }
    .spin-wrap { order: -1; flex: 0 0 100%; margin: -44px 0 0; }
    .spin-btn { width: 76px; height: 76px; }
    .credit { min-width: 86px; padding: 4px 6px; }
    .credit strong { font-size: 15px; }
    .round.sm { width: 40px; height: 40px; }
    .demo-tag { display: none; }
    .vines { width: 50px; }
    .palm-shade { opacity: .35; }
    .chests { gap: 8px; }
}
@media (max-width: 380px) {
    .controls { gap: 6px; padding: 6px; }
    .credit { min-width: 76px; }
    .credit strong { font-size: 14px; }
    .round.sm { width: 38px; height: 38px; }
    .bet-box { gap: 4px; }
}
@media (min-height: 900px) and (min-width: 1200px) { .reel-frame { flex-basis: 720px; } }
