/* Random game ticket picker. Loaded after hub.css to replace the legacy slot hero. */
body.hub-page .hero-stage.glass-card {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(340px, 1.06fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 20px 42px;
    min-height: 390px;
    padding: 36px clamp(24px, 5vw, 56px);
    overflow: hidden;
    text-align: left;
    isolation: isolate;
    background:
        radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent-blue) 20%, transparent) 1px, transparent 1.5px) 0 0 / 16px 16px,
        linear-gradient(120deg, color-mix(in srgb, var(--accent-purple) 10%, var(--color-surface)), var(--color-surface) 58%);
}

.hero-stage::after {
    content: '';
    position: absolute;
    z-index: -1;
    right: 4%;
    bottom: 6%;
    width: 330px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 23, 42, .24);
    filter: blur(15px);
}

.hero-copy { display: grid; gap: 10px; align-content: center; }
.hero-eyebrow { color: var(--accent-purple); letter-spacing: .1em; }
.hero-title { max-width: 450px; margin: 0; background: none; color: var(--text-primary); }
.hero-desc { max-width: 390px; margin: 0; font-size: .96rem; line-height: 1.65; }

.hero-art {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    min-height: 302px;
}

.slot-machine { position: relative; width: min(100%, 390px); height: 300px; display: grid; place-items: center; }
.slot-ring { display: none; }

.machine-cabinet {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    width: 275px;
    min-height: 254px;
    padding: 18px 22px 17px;
    border: 6px solid #202a63;
    border-radius: 38px 38px 28px 28px;
    background: linear-gradient(145deg, #6673db 0%, #4654b5 48%, #303a93 100%);
    box-shadow: 0 16px 0 #20275f, 0 24px 28px rgba(30, 41, 59, .32), inset 0 2px 0 rgba(255, 255, 255, .34);
}

.machine-cabinet::before {
    content: '';
    position: absolute;
    inset: 9px;
    border: 2px solid rgba(255, 255, 255, .22);
    border-radius: 27px 27px 19px 19px;
    pointer-events: none;
}

.machine-label {
    position: relative;
    z-index: 1;
    color: #fff8c7;
    font: 800 .68rem/1 var(--font-mono);
    letter-spacing: .16em;
}

.slot-reel {
    z-index: 1;
    width: 172px;
    height: 112px;
    margin: 11px 0 12px;
    border: 7px solid #222b66;
    border-radius: 19px;
    background: linear-gradient(180deg, #fffdf0, #fff5b8);
    box-shadow: inset 0 5px 0 rgba(255,255,255,.8), inset 0 -8px 12px rgba(195, 142, 32, .2), 0 5px 0 rgba(31, 39, 94, .65);
    color: #26316c;
    font-size: 62px;
}
.slot-icon .icon-img { width: 62px; height: 62px; }

.machine-chute {
    position: relative;
    z-index: 1;
    width: 150px;
    height: 31px;
    padding: 6px 13px;
    border: 4px solid #20275f;
    border-radius: 9px 9px 15px 15px;
    background: #17224e;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .42);
}
.machine-chute span { display: block; height: 7px; border-radius: 8px; background: #f7c84a; box-shadow: 0 1px 0 #fff2a4; }

.ticket-stack { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.game-ticket {
    position: absolute;
    display: grid;
    place-items: center;
    width: 76px;
    height: 102px;
    border: 3px solid #27336f;
    border-radius: 12px;
    box-shadow: 0 9px 16px rgba(15, 23, 42, .24);
}
.game-ticket::before, .game-ticket::after { content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--color-surface); }
.game-ticket::before { top: -7px; } .game-ticket::after { bottom: -7px; }
.game-ticket img { width: 42px; height: 42px; }
.ticket-ladder { top: 7px; left: 13px; transform: rotate(-16deg); background: #a9f3e1; }
.ticket-dice { top: -8px; right: 22px; transform: rotate(14deg); background: #ffe36d; }
.ticket-croc { right: -1px; bottom: 12px; transform: rotate(12deg); background: #ffb7c5; }

.machine-spark { position: absolute; z-index: 3; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-amber); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-amber) 25%, transparent); }
.spark-one { top: 58px; right: 0; } .spark-two { bottom: 38px; left: 5px; width: 8px; height: 8px; background: var(--accent-emerald); }

.hero-actions { display: grid; justify-items: start; gap: 11px; }
.slot-lever {
    min-height: 54px;
    padding: 14px 25px;
    border: 2px solid rgba(255,255,255,.42);
    border-radius: 15px;
    background: linear-gradient(135deg, #ffca3a, #f2a919);
    color: #273067;
    box-shadow: 0 6px 0 #c47b12, 0 11px 22px rgba(185, 113, 12, .24);
}
.slot-lever:hover { transform: translateY(-2px) rotate(-1deg); }
.slot-lever:active { transform: translateY(4px); box-shadow: 0 2px 0 #c47b12; }
.slot-lever:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 4px; }
.slot-status { max-width: 340px; min-height: 3em; margin: 0; line-height: 1.45; text-align: left; }
.slot-status.picked { color: var(--accent-emerald); }

.slot-reel.spinning .slot-icon { animation: ticketReel .12s linear infinite; }
@keyframes ticketReel { 50% { transform: translateY(-6px) scale(.9); opacity: .55; } }
.slot-reel.landed .slot-icon { animation: ticketLand .4s cubic-bezier(.18,.89,.32,1.28); }
@keyframes ticketLand { 0% { transform: scale(1.35); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

@media (max-width: 767px) {
    body.hub-page .hero-stage.glass-card { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 14px; min-height: 0; padding: 30px 18px 27px; text-align: center; }
    .hero-copy { justify-items: center; gap: 7px; }
    .hero-title { font-size: clamp(2rem, 9vw, 2.65rem); }
    .hero-desc { max-width: 330px; font-size: .9rem; }
    .hero-art { grid-column: 1; grid-row: 2; min-height: 264px; }
    .slot-machine { height: 264px; transform: scale(.9); }
    .hero-actions { justify-items: center; grid-column: 1; grid-row: 3; }
    .slot-status { min-height: 4.35em; text-align: center; }
}

@media (min-width: 768px) and (max-width: 1020px) {
    body.hub-page .hero-stage.glass-card { grid-template-columns: minmax(250px, .8fr) minmax(300px, 1fr); gap: 18px; padding-inline: 30px; }
    .slot-machine { transform: scale(.88); }
}

@media (prefers-reduced-motion: reduce) {
    .slot-reel.spinning .slot-icon, .slot-reel.landed .slot-icon { animation: none; }
    .slot-lever { transition: none; }
}
