/* =========================================================
   COCKTAIL SLOT MACHINE
   Port aus Research/Design/Cocktail-Slot-Machine.html.
   Tokens stammen aus tokens.css — hier nur Slot-spezifische Klassen.
   ========================================================= */

.slot-root {
    position: relative;
    display: block;
    padding: 12px 4px 60px;
}

.slot-stage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    padding: 12px 12px 24px;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .slot-stage {
        grid-template-columns: 1fr auto;
        gap: 32px;
        padding: 28px 32px 40px;
    }
}

/* ============ CABINET ============ */
.cabinet {
    position: relative;
    padding: 22px 14px 26px;
    border-radius: 22px;
    background: linear-gradient(180deg, #1a0f2e 0%, #0c0619 100%);
    border: 1px solid var(--c-border-strong);
    box-shadow:
        0 0 0 1px rgba(255, 62, 200, 0.35),
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 62, 200, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cabinet::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 18px;
    pointer-events: none;
    border: 1px solid rgba(79, 245, 255, 0.28);
    box-shadow: inset 0 0 40px rgba(79, 245, 255, 0.08);
}

.cabinet::after {
    content: "";
    position: absolute;
    inset: 70px 16px 70px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(0deg, rgba(79, 245, 255, 0.07) 0 1px, transparent 1px 20px),
        repeating-linear-gradient(90deg, rgba(255, 62, 200, 0.07) 0 1px, transparent 1px 32px),
        radial-gradient(ellipse at 50% 0%, rgba(255, 62, 200, 0.2), transparent 60%);
    opacity: 0.6;
}

@media (min-width: 900px) {
    .cabinet {
        padding: 36px 32px 40px;
        border-radius: 28px;
    }

    .cabinet::before {
        inset: 8px;
        border-radius: 22px;
    }

    .cabinet::after {
        inset: 90px 32px 90px;
    }
}

/* ============ MARQUEE ============ */
.marquee {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 0 16px;
    margin: 0 0 16px;
    border-bottom: 1px dashed var(--c-hairline);
}

.marquee .title {
    font-family: "Audiowide", sans-serif;
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
        0 0 6px var(--c-primary),
        0 0 18px var(--c-primary),
        0 0 36px rgba(255, 62, 200, 0.5);
}

.marquee .bulb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-accent);
    box-shadow: 0 0 10px var(--c-accent), 0 0 20px var(--c-accent);
    animation: slotBulb 1.2s infinite alternate ease-in-out;
}

.marquee .bulb:nth-child(3) {
    animation-delay: 0.4s;
    background: var(--c-primary);
    box-shadow: 0 0 10px var(--c-primary), 0 0 20px var(--c-primary);
}

.marquee .bulb:nth-child(4) {
    animation-delay: 0.8s;
    background: var(--c-success);
    box-shadow: 0 0 10px var(--c-success), 0 0 20px var(--c-success);
}

@keyframes slotBulb {
    from {
        opacity: 0.4;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

@media (min-width: 900px) {
    .marquee {
        padding-bottom: 22px;
        margin-bottom: 22px;
    }

    .marquee .title {
        font-size: clamp(18px, 2.2vw, 26px);
        letter-spacing: 0.18em;
    }
}

/* ============ REELS ============ */
.reels {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(180deg, #07030d, #120a22);
    border: 1px solid var(--c-border);
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(79, 245, 255, 0.25);
}

.reel {
    position: relative;
    height: 170px;
    border-radius: 12px;
    background: linear-gradient(180deg, #0c0619, #1a0f2e);
    border: 1px solid var(--c-border-strong);
    overflow: hidden;
    box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.6);
}

.reel::before,
.reel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 3;
    pointer-events: none;
}

.reel::before {
    top: 0;
    background: linear-gradient(180deg, rgba(12, 6, 25, 0.95) 0%, rgba(12, 6, 25, 0) 100%);
}

.reel::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(12, 6, 25, 0.95) 0%, rgba(12, 6, 25, 0) 100%);
}

.reel-window {
    position: absolute;
    left: -1px;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    height: 84px;
    z-index: 2;
    pointer-events: none;
    border-top: 1px solid rgba(255, 62, 200, 0.5);
    border-bottom: 1px solid rgba(255, 62, 200, 0.5);
    box-shadow:
        0 0 18px rgba(255, 62, 200, 0.35),
        inset 0 0 30px rgba(255, 62, 200, 0.08);
    background: linear-gradient(180deg, rgba(255, 62, 200, 0.04), rgba(79, 245, 255, 0.04));
}

.reel-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.reel-item {
    height: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 8px;
}

.reel-thumb {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.reel-thumb .plate-overlay {
    position: absolute;
    inset: 0;
}

.reel-name {
    font-family: "Audiowide", sans-serif;
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--c-text);
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reel.spinning .reel-strip {
    filter: blur(1px);
}

.reel.spinning::before,
.reel.spinning::after {
    background-blend-mode: screen;
}

.reel.locked .reel-window {
    border-color: var(--c-success);
    box-shadow:
        0 0 26px rgba(57, 255, 154, 0.5),
        inset 0 0 40px rgba(57, 255, 154, 0.1);
    animation: slotLockPulse 0.6s ease-out;
}

@keyframes slotLockPulse {
    0% {
        transform: translateY(-50%) scale(1.08);
        box-shadow:
            0 0 40px rgba(57, 255, 154, 0.8),
            inset 0 0 60px rgba(57, 255, 154, 0.3);
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

@media (min-width: 900px) {
    .reels {
        gap: 14px;
        padding: 14px;
    }

    .reel {
        height: 220px;
    }

    .reel-window,
    .reel-item {
        height: 108px;
    }

    .reel-thumb {
        width: 78px;
        height: 78px;
        border-radius: 12px;
    }

    .reel-name {
        font-size: 10px;
    }

    .reel::before,
    .reel::after {
        height: 52px;
    }
}

/* ============ CONTROLS ============ */
.slot-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 20px;
}

@media (min-width: 900px) {
    .slot-controls {
        min-width: 220px;
        gap: 24px;
        margin-top: 0;
    }
}

.spin-btn {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 35% 30%, #8fffc9 0%, #39ff9a 35%, #19b267 70%, #0a6a3d 100%);
    color: #051a0e;
    font-family: "Audiowide", sans-serif;
    font-size: 22px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    box-shadow:
        0 0 40px rgba(57, 255, 154, 0.85),
        0 0 8px rgba(57, 255, 154, 1),
        0 0 0 2px rgba(57, 255, 154, 0.9),
        inset 0 4px 0 rgba(255, 255, 255, 0.35),
        inset 0 -10px 22px rgba(0, 60, 30, 0.55),
        0 20px 40px rgba(0, 0, 0, 0.6);
    border: 4px solid rgba(57, 255, 154, 0.55);
    cursor: pointer;
    transition: transform 0.12s;
    position: relative;
    min-height: 44px;
}

.spin-btn:not(:disabled):hover {
    transform: scale(1.03);
}

.spin-btn:not(:disabled):active {
    transform: scale(0.96);
    box-shadow:
        0 0 18px rgba(57, 255, 154, 0.5),
        inset 0 6px 14px rgba(0, 60, 30, 0.6),
        0 6px 14px rgba(0, 0, 0, 0.6);
}

.spin-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    background: radial-gradient(circle at 35% 30%, #6a6a7a 0%, #3a3a48 60%, #1a1a24 100%);
    color: #9a9aaa;
    box-shadow:
        inset 0 4px 0 rgba(255, 255, 255, 0.08),
        0 10px 20px rgba(0, 0, 0, 0.4);
}

.spin-btn .inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

.spin-btn .sub {
    font-size: 11px;
    letter-spacing: 0.3em;
    opacity: 0.7;
    font-weight: 600;
}

@media (min-width: 900px) {
    .spin-btn {
        width: 180px;
        height: 180px;
        font-size: 28px;
    }
}

.again-btn {
    padding: 0 20px;
    min-height: 44px;
    height: 48px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--c-border);
    color: var(--c-text-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-family: var(--f-mono);
    cursor: pointer;
}

.again-btn:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.slot-status {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-text-dim);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    min-height: 16px;
}

.slot-status.ready {
    color: var(--c-accent);
    text-shadow: 0 0 8px rgba(79, 245, 255, 0.5);
}

.slot-status.spinning {
    color: var(--c-primary);
    text-shadow: 0 0 8px rgba(255, 62, 200, 0.6);
}

.slot-status.done {
    color: var(--c-success);
    text-shadow: 0 0 8px rgba(57, 255, 154, 0.6);
}

/* ============ REVEAL MODAL ============ */
.reveal {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 13, 0.78);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.reveal.show {
    opacity: 1;
    pointer-events: auto;
}

.reveal-card {
    width: min(720px, 100%);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    border-radius: 18px;
    background: linear-gradient(180deg, #1a0f2e 0%, #0c0619 100%);
    border: 1px solid var(--c-primary);
    box-shadow:
        0 0 0 1px rgba(79, 245, 255, 0.3),
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 62, 200, 0.35);
    padding: 22px 18px;
    transform: scale(0.94);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

@media (min-width: 900px) {
    .reveal-card {
        padding: 28px;
        border-radius: 24px;
    }
}

.reveal.show .reveal-card {
    transform: scale(1);
}

.reveal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--c-border);
    color: var(--c-text-muted);
    min-height: 44px;
    cursor: pointer;
}

.reveal-close:hover {
    color: var(--c-text);
    border-color: var(--c-primary);
}

.reveal-kicker {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.26em;
    color: var(--c-accent);
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(79, 245, 255, 0.6);
    text-align: center;
}

.reveal-title {
    font-family: "Audiowide", sans-serif;
    font-size: clamp(28px, 5vw, 52px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    text-shadow:
        0 0 10px var(--c-primary),
        0 0 28px rgba(255, 62, 200, 0.55),
        0 0 48px rgba(255, 62, 200, 0.3);
    margin: 8px 0 4px;
    line-height: 1;
}

.reveal-cat {
    text-align: center;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--c-text-dim);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.reveal-hero {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--c-border-strong);
    box-shadow:
        0 0 30px rgba(255, 62, 200, 0.35),
        inset 0 0 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

@media (min-width: 900px) {
    .reveal-hero {
        aspect-ratio: 16 / 9;
    }
}

.reveal-hero .plate-bg {
    position: absolute;
    inset: 0;
}

.reveal-hero .plate-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.reveal-hero .rating-overlay {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(5, 3, 13, 0.7);
    border: 1px solid var(--c-border);
    backdrop-filter: blur(6px);
    display: flex;
    gap: 4px;
    color: var(--c-primary);
}

.reveal-hero .rating-overlay svg {
    width: 16px;
    height: 16px;
}

.reveal-desc {
    text-align: center;
    color: var(--c-text);
    font-size: clamp(14px, 1.6vw, 17px);
    line-height: 1.55;
    margin: 0 auto 22px;
    max-width: 540px;
}

.reveal-section-title {
    font-family: "Audiowide", sans-serif;
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-accent);
    text-shadow: 0 0 8px rgba(79, 245, 255, 0.5);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reveal-section-title::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--c-primary);
}

.reveal-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 22px;
}

@media (min-width: 900px) {
    .reveal-meta {
        gap: 10px;
    }
}

.reveal-meta .cell {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}

@media (min-width: 900px) {
    .reveal-meta .cell {
        padding: 12px 14px;
    }
}

.reveal-meta .cell .k {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--c-text-dim);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.reveal-meta .cell .v {
    font-size: 13px;
    color: var(--c-text);
    font-weight: 600;
    margin-top: 4px;
}

@media (min-width: 900px) {
    .reveal-meta .cell .v {
        font-size: 15px;
    }
}

.reveal-ings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.ing-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 8px;
    border-radius: 999px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    font-size: 13px;
    color: var(--c-text);
    font-weight: 500;
}

.ing-pill .ic {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: var(--c-surface-3);
    color: var(--c-primary);
    flex-shrink: 0;
}

.ing-pill.mixer .ic {
    color: var(--c-accent);
}

.ing-pill .ic svg {
    width: 18px;
    height: 18px;
}

.reveal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-reveal-primary,
.btn-reveal-ghost {
    padding: 0 22px;
    min-height: 44px;
    height: 52px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-reveal-primary {
    background: linear-gradient(180deg, #39ff9a, #19b267);
    color: #051a0e;
    box-shadow:
        0 0 16px rgba(57, 255, 154, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-family: "Audiowide", sans-serif;
    border: none;
}

.btn-reveal-ghost {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--c-border);
    color: var(--c-text);
    font-family: var(--f-mono);
}

.btn-reveal-ghost:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

/* confetti layer */
.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.confetti .piece {
    position: absolute;
    top: -20px;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
}

/* ============ REDUCED MOTION FALLBACK ============ */
@media (prefers-reduced-motion: reduce) {
    .reel-strip {
        transition: none !important;
    }
    .reel.spinning .reel-strip {
        filter: none !important;
    }
    .reel.locked .reel-window {
        animation: none !important;
    }
    .marquee .bulb {
        animation: none !important;
        opacity: 1;
    }
    .confetti .piece {
        display: none !important;
    }
    .reveal-card {
        transition: none !important;
        transform: scale(1) !important;
    }
    .reveal {
        transition: none !important;
    }
}
