/* Vengi Slot: Seite /spielen. Nur auf dieser Seite geladen. */

.slot-page *, .slot-page *::before, .slot-page *::after { box-sizing: border-box; }
.slot-sec { padding-top: clamp(2rem, 5vw, 3.5rem); }

.slot-page {
    --s-nacht: #0e0c1a;
    --s-kabinett: #1a1730;
    --s-linie: #2c2850;
    --s-rot: #e31e24;
    --s-rot-hover: #c0181d;
    --s-rot-text: #e6393f;
    --s-blau: #4057a1;
    --s-blau-hell: #8fa4e8;
    --s-gold: #f5c84c;
    --s-line: rgba(255, 255, 255, .09);
    --s-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    position: relative;
    overflow: hidden;
}


/* ---------- Aufbau ---------- */
.slot-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
.slot-layout { gap: .75rem; }

/* ---------- Spielanleitung (Knopf) ---------- */
.slot-help { width: 100%; max-width: 560px; margin-inline: auto; display: flex; justify-content: flex-end; }
.slot-help__btn {
    display: inline-flex; align-items: center; gap: .45rem;
    min-height: 40px; padding: .4rem .85rem;
    border: 0; border-radius: 999px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--s-linie);
    color: rgba(255, 255, 255, .78);
    font: inherit; font-size: .88rem;
    cursor: pointer;
    transition: color .2s, box-shadow .2s;
}
.slot-help__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.slot-help__btn:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--s-blau); }
.slot-help__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- Gehaeuse ---------- */
.slot-machine {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    padding: clamp(12px, 3.5vw, 20px);
    border-radius: 28px;
    background: linear-gradient(180deg, #221e3d 0%, var(--s-kabinett) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .07),
        0 0 0 2px rgba(64, 87, 161, .35),
        0 40px 90px -30px rgba(64, 87, 161, .55),
        inset 0 1px 0 rgba(255, 255, 255, .1);
    isolation: isolate;
}
.slot-machine::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    padding: 2px;
    background: conic-gradient(from var(--slot-angle, 0deg), transparent 0 20%, var(--s-rot) 30%, transparent 45% 70%, var(--s-blau-hell) 80%, transparent 95%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .35;
    z-index: -1;
    transition: opacity .4s;
}
@property --slot-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.slot-machine.is-win::before { opacity: 1; animation: slot-spin-border 1.6s linear infinite; }
@keyframes slot-spin-border { to { --slot-angle: 360deg; } }

/* ---------- Anzeige ---------- */
.slot-hud {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.slot-hud__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .35);
    box-shadow: inset 0 0 0 1px var(--s-line);
}
.slot-hud__label {
    font-size: .78rem;
    color: rgba(255, 255, 255, .7);
}
.slot-hud__value {
    font-family: var(--s-head);
    font-weight: 700;
    font-size: clamp(1.05rem, 4.2vw, 1.4rem);
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.slot-hud__cell--win .slot-hud__value { color: var(--s-gold); }
.slot-hud__cell--win.is-on { box-shadow: inset 0 0 0 1px var(--s-rot), 0 0 22px -4px rgba(227, 30, 36, .7); }

/* ---------- Walzenfenster ---------- */
.slot-screen {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(90deg, transparent calc(33.333% - 1px), rgba(255, 255, 255, .07) calc(33.333% - 1px) calc(33.333% + 1px), transparent calc(33.333% + 1px) calc(66.666% - 1px), rgba(255, 255, 255, .07) calc(66.666% - 1px) calc(66.666% + 1px), transparent calc(66.666% + 1px)),
        radial-gradient(120% 80% at 50% 0%, #26215a 0%, #120f26 60%, #0a0815 100%);
    box-shadow: inset 0 0 0 1px rgba(64, 87, 161, .45), inset 0 12px 30px rgba(0, 0, 0, .55), inset 0 -12px 30px rgba(0, 0, 0, .55);
}
.slot-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .07) 0%, transparent 22%, transparent 78%, rgba(0, 0, 0, .25) 100%);
}
.slot-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 10 / 9;
    touch-action: manipulation;
    cursor: pointer;
}
.slot-stage canvas { display: block; width: 100% !important; height: 100% !important; }

.slot-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    color: rgba(255, 255, 255, .75);
    font-size: .9rem;
    transition: opacity .3s;
}
.slot-loading.is-done { opacity: 0; pointer-events: none; }
.slot-loading__dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--s-rot);
    animation: slot-pulse 1s ease-in-out infinite;
}
@keyframes slot-pulse { 50% { transform: scale(1.6); opacity: .4; } }

.slot-banner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .25s, transform .45s cubic-bezier(.2, 1.6, .4, 1);
    background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
}
.slot-banner.is-on { opacity: 1; transform: none; }
.slot-banner__title {
    font-family: var(--s-head);
    font-weight: 800;
    font-size: clamp(1.4rem, 6vw, 2.3rem);
    color: #fff;
    text-shadow: 0 0 18px rgba(227, 30, 36, .9), 0 2px 0 rgba(0, 0, 0, .4);
}
.slot-banner__amount {
    font-family: var(--s-head);
    font-weight: 800;
    font-size: clamp(2.2rem, 11vw, 4rem);
    font-variant-numeric: tabular-nums;
    color: var(--s-gold);
    text-shadow: 0 0 24px rgba(245, 200, 76, .7), 0 3px 0 rgba(0, 0, 0, .45);
}

/* ---------- Bedienung ---------- */
.slot-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.slot-bet { display: flex; align-items: center; gap: 6px; justify-self: start; }
.slot-bet__value {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3.2rem;
    font-family: var(--s-head);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.slot-bet__value small { font-family: 'Inter', sans-serif; font-weight: 500; font-size: .7rem; color: rgba(255, 255, 255, .7); }

.slot-round, .slot-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42);
    transition: background .2s, box-shadow .2s, transform .12s;
    -webkit-tap-highlight-color: transparent;
}
.slot-round { width: 44px; height: 44px; border-radius: 50%; }
.slot-round svg, .slot-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.slot-round:hover:not(:disabled), .slot-toggle:hover { background: rgba(255, 255, 255, .12); }
.slot-round:active:not(:disabled), .slot-toggle:active { transform: scale(.92); }
.slot-round:disabled { opacity: .35; cursor: default; }

.slot-toggles { display: flex; gap: 6px; justify-self: end; }
.slot-toggle {
    flex-direction: column;
    gap: 2px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: .72rem;
    font-weight: 600;
}
.slot-toggle[aria-pressed="true"] { color: #fff; background: var(--s-blau); box-shadow: inset 0 0 0 1px var(--s-blau-hell), 0 0 18px -4px var(--s-blau-hell); }
#slotSound[aria-pressed="false"] .slot-wave { opacity: .25; }

.slot-spin {
    position: relative;
    width: clamp(88px, 26vw, 112px);
    aspect-ratio: 1;
    border-radius: 50%;
    color: #fff;
    background: radial-gradient(circle at 50% 30%, #f0484d 0%, var(--s-rot) 45%, #b5161b 100%);
    box-shadow:
        0 0 0 4px var(--s-kabinett),
        0 0 0 6px rgba(227, 30, 36, .55),
        0 14px 30px -6px rgba(227, 30, 36, .75),
        inset 0 2px 0 rgba(255, 255, 255, .3),
        inset 0 -6px 12px rgba(0, 0, 0, .25);
    transition: transform .12s, filter .2s, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.slot-spin:hover:not(:disabled) { filter: brightness(1.1); }
.slot-spin:active:not(:disabled) { transform: scale(.94); }
.slot-spin:disabled { filter: grayscale(.6) brightness(.7); cursor: default; }
.slot-spin__label {
    position: relative;
    font-family: var(--s-head);
    font-weight: 700;
    font-size: clamp(1.25rem, 5vw, 1.5rem);
}
.slot-spin__ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--s-rot);
    opacity: 0;
    pointer-events: none;
}
.slot-spin.is-ready .slot-spin__ring { animation: slot-ring 2.4s ease-out infinite; }
@keyframes slot-ring { 0% { opacity: .7; transform: scale(.85); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
.slot-spin.is-spinning { background: radial-gradient(circle at 50% 30%, #4a4670 0%, #2c2850 55%, #1f1c3a 100%); box-shadow: 0 0 0 4px var(--s-kabinett), 0 0 0 6px rgba(143, 164, 232, .5), inset 0 2px 0 rgba(255, 255, 255, .2); }

.slot-machine button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.slot-keys {
    margin-top: 14px;
    text-align: center;
    font-size: .8rem;
    color: rgba(255, 255, 255, .62);
}

/* ---------- Regeln ---------- */
.slot-rules {
    position: fixed;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: auto;
    padding: clamp(18px, 4vw, 28px);
    border: 0;
    border-radius: .375rem;
    background: var(--s-kabinett);
    box-shadow: inset 0 0 0 1px var(--s-linie), 0 30px 80px -20px rgba(0, 0, 0, .8);
    color: #fff;
}
.slot-rules::backdrop { background: rgba(8, 7, 16, .78); backdrop-filter: blur(3px); }
.slot-rules[open] { animation: slot-pop .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes slot-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.slot-rules__close {
    position: absolute; top: 10px; right: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border: 0; border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, .78);
    cursor: pointer;
}
.slot-rules__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.slot-rules__close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.slot-rules__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.slot-rules__title { padding-right: 48px; }
.slot-rules__title, .slot-rules__sub {
    font-family: var(--s-head);
    font-weight: 700;
    color: #fff;
}
.slot-rules__title { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.05; }
.slot-rules__sub { font-size: 1.35rem; line-height: 1.05; margin-top: 1.75rem; }
.slot-steps { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.slot-steps li { display: flex; align-items: center; gap: .75rem; color: rgba(255, 255, 255, .85); }
.slot-steps li > span:first-child {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--s-rot);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}
.slot-steps b { color: #fff; }

.slot-paylines { display: flex; gap: 10px; margin-top: 1.4rem; flex-wrap: wrap; }
.slot-payline {
    display: grid;
    grid-template-columns: repeat(3, 12px);
    gap: 3px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .3);
}
.slot-payline i { width: 12px; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.slot-payline i.on { background: var(--s-rot); box-shadow: 0 0 8px rgba(227, 30, 36, .7); }
.slot-rules__note { margin-top: .6rem; font-size: .85rem; color: rgba(255, 255, 255, .65); }

.slot-paytable { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: 4px; }
.slot-paytable li {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: 6px 10px 6px 6px;
    border-radius: 12px;
}
.slot-paytable li:nth-child(odd) { background: rgba(255, 255, 255, .035); }
.slot-paytable li.is-wild { box-shadow: inset 3px 0 0 var(--s-rot); }
.slot-paytable img { width: 44px; height: 44px; object-fit: contain; }
.slot-paytable__name { color: rgba(255, 255, 255, .88); font-size: .95rem; display: flex; flex-direction: column; }
.slot-paytable__name small { font-size: .78rem; color: rgba(255, 255, 255, .64); }
.slot-paytable__pay { font-size: .85rem; color: rgba(255, 255, 255, .7); white-space: nowrap; }
.slot-paytable__pay b { font-family: var(--s-head); font-size: 1.3rem; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- Hinweis und rechtlicher Satz ---------- */
.slot-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    margin: 2.5rem auto 0;
    max-width: 960px;
    padding: 20px 22px;
    border-radius: .375rem;
    background: var(--s-kabinett);
    box-shadow: inset 0 0 0 1px var(--s-linie), inset 0 3px 0 var(--s-rot);
    animation: slot-rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.slot-cta[hidden] { display: none; }
@media (min-width: 640px) { .slot-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
.slot-cta__title { font-family: var(--s-head); font-weight: 700; font-size: 1.6rem; line-height: 1.05; color: #fff; }
.slot-cta__text { margin-top: .25rem; color: rgba(255, 255, 255, .8); font-size: .92rem; }
.slot-cta__btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: .8rem 1.4rem;
    border-radius: .375rem;
    background: var(--s-rot);
    color: #fff;
    font-weight: 600;
    transition: background .2s;
}
.slot-cta__btn:hover { background: var(--s-rot-hover); color: #fff; }
.slot-cta__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes slot-rise { from { opacity: 0; transform: translateY(16px); } }

.slot-legal {
    margin: 2rem auto 0;
    max-width: 40rem;
    text-align: center;
    font-size: .8rem;
    color: rgba(255, 255, 255, .6);
}

@media (prefers-reduced-motion: reduce) {
    .slot-machine.is-win::before, .slot-spin.is-ready .slot-spin__ring, .slot-loading__dot, .slot-rules[open] { animation: none; }
    .slot-banner { transition: opacity .2s; transform: none; }
}

/* Schmale Handys: Schalter untereinander, damit alles in eine Zeile passt */
@media (max-width: 479px) {
    .slot-controls { gap: 8px; }
    .slot-round { width: 40px; height: 40px; }
    .slot-bet { gap: 4px; }
    .slot-bet__value { min-width: 2.6rem; font-size: 1.15rem; }
    .slot-spin { width: 88px; }
    .slot-toggles { flex-direction: column; gap: 6px; }
    .slot-toggle { flex-direction: row; gap: 6px; width: 68px; height: 40px; border-radius: 12px; }
    .slot-toggle svg { width: 17px; height: 17px; }
}
