/* Slotmachine-spezifische Styles - extrahiert aus style.css */

/* ### Slot Machine ### */

.sm_wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    /* min-height: 100vh; */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #3d3d3d;
    padding: 20px;
    overflow-x: hidden;
}

.sm_slot-machine {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 3px solid var(--primary);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow:
        0 10px 30px rgba(33, 115, 115, 0.15),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    width: min(100%, 780px);
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.sm_slot-machine::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--accent1), var(--primary));
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
    opacity: 0.3;
}

@keyframes borderGlow {
    0% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.sm_title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
    text-shadow: 0 2px 8px rgba(33, 115, 115, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sm_mode-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: center;
}

.sm_mode-btn {
    padding: 8px 14px;
    border: 2px solid var(--primary);
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    backdrop-filter: blur(5px);
}

.sm_mode-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 115, 115, 0.3);
    transform: scale(1.05);
}

.sm_mode-btn:hover {
    background: var(--accent1);
    border-color: var(--accent1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 64, 128, 0.3);
}

/* 3D Wheel */
.sm_machine-layout {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: clamp(20px, 4vw, 40px);
    margin: 30px 0;
}

.sm_slot-display {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

.sm_slot-viewport {
    width: 480px;
    max-width: 760px;
    height: 300px;
    /* height: clamp(220px, 48vw, 360px); */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.85));
    border: 3px solid var(--accent1);
    border-radius: 20px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        0 20px 40px rgba(33, 115, 115, 0.18);
    overflow: hidden;
    position: relative;
    perspective: 900px;
    margin: 0 auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.sm_slot-viewport::before,
.sm_slot-viewport::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 70px;
    pointer-events: none;
    z-index: 4;
}

.sm_slot-viewport::before {
    top: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
}

.sm_slot-viewport::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
}

.sm_slot-viewport.spinning {
    transform: translateY(-3px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        0 28px 55px rgba(33, 115, 115, 0.28);
}

/* .sm_center-mark {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 2px dashed rgba(33, 115, 115, 0.5);
    z-index: 5;
    filter: drop-shadow(0 0 8px rgba(33, 115, 115, 0.4));
}

.sm_center-label {
    position: absolute;
    top: calc(50% + 12px);
    right: 20px;
    transform: translateY(-50%);
    font-size: 12px;
    color: rgba(33, 115, 115, 0.8);
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 1px;
} */

.sm_stage {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    display: grid;
    place-items: center;
}

.sm_wheel {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
}

.sm_slice {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    padding: 6px 18px;
    min-height: 70px;
    line-height: 1.2;
    white-space: normal;
    /* max-width: clamp(220px,75vw,520px); */
    width: 370px;
    color: rgba(16, 19, 32, 0.85);
    font-weight: 600;
    letter-spacing: 0.3px;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 12px rgba(33, 115, 115, 0.15);
    text-align: center;
    font-size: 16px;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sm_slice.icon-mode {
    font-size: 34px;
}

.sm_slice.is-front {
    color: #102023;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 244, 248, 0.9));
    box-shadow:
        0 8px 24px rgba(33, 115, 115, 0.25),
        0 0 0 1.5px rgba(255, 64, 128, 1) inset;
    /* border: 1px solid var(--accent1); */
}

.sm_current {
    text-align: center;
    font-size: 15px;
    color: rgba(16, 16, 16, 0.7);
}

.sm_current strong {
    display: inline-block;
    margin-left: 6px;
    color: var(--accent1);
    font-size: 18px;
}

.sm_pull-lever {
    flex: 0 0 clamp(160px, 22vw, 220px);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    align-self: stretch;
}

.sm_lever-button {
    width: 100%;
    max-width: 220px;
    /* aspect-ratio: 3 / 4; */
    height: 300px;
    border: 3px solid var(--primary);
    border-radius: 20px;
    padding: 24px 18px;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)) no-repeat, linear-gradient(145deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow:
        0 18px 35px rgba(33, 115, 115, 0.3),
        inset 0 3px 14px rgba(255, 255, 255, 0.35);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        animation: blobMorph 20s ease-in-out infinite;
        will-change: border-radius, transform;
}

.sm_lever-button .sm_lever-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    text-transform: none;
    letter-spacing: 0.5px;
}

.sm_lever-button .sm_lever-emoji {
    font-size: clamp(36px, 6vw, 48px);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.sm_lever-button .sm_lever-text {
    font-size: 28px;
}

.sm_lever-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--accent1);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.25),
        0 0 0 2px rgba(255, 64, 128, 0.3);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    transition:
        opacity 0.25s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sm_lever-feedback.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.sm_lever-feedback.turbo {
    background: linear-gradient(135deg, #ff4080, #ff6ba0);
    color: #fff;
    box-shadow:
        0 12px 32px rgba(255, 64, 128, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.5);
}




/* Milestone Pop-ups */
.sm_milestone-popup {
    /* position: fixed wird jetzt per JS gesetzt */
    font-weight: 600;
    text-align: center;
    /* padding: 20px 30px;
    border-radius: 16px; */
    color: #fff;
    /* box-shadow:
        0 16px 40px rgba(76, 175, 80, 0.5),
        0 0 0 4px rgba(255, 255, 255, 0.6); */
    opacity: 0;
    pointer-events: none;
    z-index: 10000;
    white-space: normal;
    word-wrap: break-word;
    max-width: 90%;
    transition:
        opacity 0.4s ease,
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1.4;
}

.sm_milestone-popup.show {
    opacity: 1;
}

/* Small size - für Spin-States (gentle, medium, turbo) */
.sm_milestone-popup.sm_milestone-small {
    font-size: 12px;
    padding: 6px 12px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    /* box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.25),
        0 0 0 2px rgba(255, 64, 128, 0.3); */
}

.sm_milestone-popup.sm_milestone-small.turbo {
    background: linear-gradient(135deg, #ff4080, #ff6ba0);
    color: #fff;
    box-shadow:
        0 12px 32px rgba(255, 64, 128, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Medium size - für 20 Clicks (etwas größer als gentle/medium/turbo) */
.sm_milestone-popup.sm_milestone-medium {
    font-size: 20px;
    padding: 24px 36px;
    border-radius: 18px;
    box-shadow:
        0 20px 48px rgba(76, 175, 80, 0.6),
        0 0 0 5px rgba(255, 255, 255, 0.7);
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* Large size - für 50 Clicks (noch größer) */
.sm_milestone-popup.sm_milestone-large {
    font-size: 28px;
    padding: 32px 48px;
    border-radius: 20px;
    box-shadow:
        0 24px 56px rgba(255, 152, 0, 0.7),
        0 0 0 6px rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

/* XLarge size - für 100 Clicks (so groß wie der Spin-Button) */
.sm_milestone-popup.sm_milestone-xlarge {
    font-size: 32px;
    padding: 40px 60px;
    border-radius: 24px;
    max-width: 300px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 32px 64px rgba(156, 39, 176, 0.8),
        0 0 0 8px rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    line-height: 1.5;
}

.sm_milestone-popup.sm_milestone-xlarge.show {
    box-shadow:
        0 32px 64px rgba(156, 39, 176, 0.9),
        0 0 0 8px rgba(255, 255, 255, 1);
}

.sm_lever-button:is(:hover, :focus-visible) {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 26px 45px rgba(255, 64, 128, 0.45),
        inset 0 3px 14px rgba(255, 255, 255, 0.45);
}

.sm_lever-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 4px;
}

.sm_lever-button.is-pressed {
    transform: translateY(3px) scale(0.98);
    box-shadow:
        0 8px 18px rgba(255, 64, 128, 0.3),
        inset 0 3px 14px rgba(255, 255, 255, 0.35);
}

.sm_spin-btn {
    background: transparent;
    border: 2px dashed var(--primary);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.sm_spin-btn:hover {
    background: var(--primary);
    color: #fff;
    border-style: solid;
    box-shadow: 0 8px 20px rgba(33, 115, 115, 0.35);
}

.sm_hint {
    font-size: 12px;
    color: rgba(16, 16, 16, 0.5);
}

.sm_slot-viewport .sm_jackpot-effect {
    border-radius: inherit;
}

.sm_jackpot-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    animation: jackpotGlow 0.5s ease-in-out;
}

@keyframes jackpotGlow {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.sm_stats {
    margin-top: 30px;
    padding: 20px;
    background: rgba(33, 115, 115, 0.05);
    border: 1px solid rgba(33, 115, 115, 0.15);
    border-radius: 12px;
    font-size: 14px;
    color: #3d3d3d;
    backdrop-filter: blur(5px);
}

.sm_stats-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sm_stats-value {
    color: var(--accent1);
    font-weight: 600;
}

.sm_reset-btn {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.sm_reset-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 115, 115, 0.4);
}

.sm_haptic-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sm_haptic-indicator.active {
    opacity: 1;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

@media (max-width: 900px) {
    .sm_machine-layout {
        flex-direction: column;
        align-items: center;
    }

    .sm_slot-viewport {
        height: clamp(200px, 60vw, 260px);
        width: 80vw;
    }

    .sm_slice {
        font-size: 15px;
        width: 60vw;
    }

    .sm_pull-lever {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .sm_lever-button {
        max-width: 60%;
        height: 200px;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .sm_slot-machine {
        padding: 30px 20px;
        margin: 10px;
    }

    .sm_title {
        font-size: 24px;
    }

    .sm_slot-viewport {
        height: clamp(200px, 60vw, 260px);
        width: 80vw;
    }

    .sm_slice {
        font-size: 14px;
        width: 60vw;
    }

    .sm_slice.icon-mode {
        font-size: 28px;
    }

    .sm_pull-lever {
        width: 100%;
        max-width: 100%;
    }

    .sm_lever-button {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 4 / 1;
        height: auto;
        min-height: 140px;
        padding: 16px 20px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    .sm_lever-button .sm_lever-emoji {
        font-size: 32px;
    }

    .sm_lever-button .sm_lever-text {
        font-size: 24px;
    }

    /* Mobile Milestone Pop-ups */
    .sm_milestone-popup {
        max-width: 95%;
        padding: 16px 24px;
    }

    .sm_milestone-popup.sm_milestone-medium {
        font-size: 16px;
        padding: 18px 24px;
    }

    .sm_milestone-popup.sm_milestone-large {
        font-size: 20px;
        padding: 24px 32px;
    }

    .sm_milestone-popup.sm_milestone-xlarge {
        font-size: 22px;
        padding: 30px 40px;
        min-height: auto;
        max-height: 75vh;
    }
}
