/* Glücksrad Styles – Zentrierung über Page-Stage in optixmc-layout-fixes.css */
#viewTaeglich {
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    overflow: visible;
    position: relative;
}

@media (min-width: 769px) {
    .wheel-container {
        margin: 0 auto !important;
        max-width: 500px !important;
    }
    
    .wheel-wrapper {
        width: clamp(300px, 35vw, 500px) !important;
        height: clamp(300px, 35vw, 500px) !important;
        max-width: 500px !important;
        max-height: 500px !important;
    }
    
    .wheel-segment img {
        width: clamp(30px, 3vw, 60px) !important;
        height: clamp(30px, 3vw, 60px) !important;
    }
    
    .wheel-spin-btn {
        padding: clamp(0.8rem, 1.2vw, 1rem) clamp(1.5rem, 3vw, 2.5rem) !important;
        font-size: clamp(0.9rem, 1.5vw, 1.1rem) !important;
    }
    
    .wheel-pointer {
        top: clamp(-8px, -1.2vw, -24px) !important;
        border-left-width: clamp(8px, 1.2vw, 24px) !important;
        border-right-width: clamp(8px, 1.2vw, 24px) !important;
        border-top-width: clamp(16px, 2.4vw, 48px) !important;
    }
    
    .wheel {
        border-width: clamp(2px, 0.3vw, 8px) !important;
        box-shadow: 
            0 0 clamp(15px, 2.5vw, 60px) rgba(138, 156, 255, 0.4),
            inset 0 0 clamp(20px, 3vw, 80px) rgba(0, 0, 0, 0.4),
            0 clamp(3px, 0.4vw, 10px) clamp(10px, 1.5vw, 40px) rgba(0, 0, 0, 0.5) !important;
    }
    
    .wheel-divider {
        width: clamp(1.5px, 0.2vw, 4px) !important;
        height: calc(50% + clamp(2px, 0.3vw, 6px)) !important;
    }
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 600px;
    position: relative;
}

.wheel-wrapper {
    position: relative;
    width: clamp(180px, 50vw, 700px);
    height: clamp(180px, 50vw, 700px);
    margin: 0 auto;
    max-width: 700px;
    max-height: 700px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 clamp(25px, 4vw, 100px) rgba(138, 156, 255, 0.4),
        inset 0 0 clamp(30px, 5vw, 120px) rgba(0, 0, 0, 0.4),
        0 clamp(4px, 0.6vw, 16px) clamp(16px, 2.5vw, 64px) rgba(0, 0, 0, 0.5);
    border: clamp(3px, 0.5vw, 12px) solid #000000;
    transition: transform 0.1s linear;
    transform-origin: center;
    background: radial-gradient(circle at center, rgba(138, 156, 255, 0.1), rgba(20, 30, 80, 0.3));
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: 0 100%;
    /* Echtes Glücksrad: Perfekte Kuchenstück-Form - Spitze genau in der Mitte */
    clip-path: polygon(0 100%, 0 0, 100% 0);
    display: block;
    font-weight: 800;
    font-size: clamp(0.6rem, 1.5vw, 1.8rem);
    color: #ffffff;
    box-sizing: border-box;
    transition: filter 0.2s ease;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1;
}

/* Positioniere Diamant-Item-Bilder gleichmäßig zentriert zwischen den Trennlinien - immer gerade */
.wheel-segment img {
    position: absolute;
    top: 0;
    left: 50%;
    width: clamp(30px, 6vw, 120px);
    height: clamp(30px, 6vw, 120px);
    object-fit: contain;
    z-index: 10;
    transform-origin: center center;
    margin: 0;
    padding: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    pointer-events: none;
}

/* Idle-Animation: Zufälliges Wackeln wie ein Ei */
@keyframes diamondWiggle {
    0%, 100% { transform: translate(-140%, 70%) rotate(var(--icon-rotation, 0deg)); }
    25% { transform: translate(calc(-140% - 2px), calc(70% - 1px)) rotate(calc(var(--icon-rotation, 0deg) - 1deg)); }
    50% { transform: translate(calc(-140% + 1px), calc(70% + 2px)) rotate(calc(var(--icon-rotation, 0deg) + 1deg)); }
    75% { transform: translate(calc(-140% + 2px), calc(70% - 1px)) rotate(calc(var(--icon-rotation, 0deg) - 0.5deg)); }
}

.wheel-segment img.idle-animating {
    animation: diamondWiggle 0.6s ease-in-out;
}

/* Gerade schwarze Trennlinien zwischen Segmenten (vom Zentrum nach außen) */
.wheel-divider {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(2px, 0.3vw, 6px);
    height: calc(50% + clamp(3px, 0.4vw, 8px));
    background: #000000;
    transform-origin: center top;
    z-index: 5;
    pointer-events: none;
}

.wheel-segment:hover {
    filter: brightness(1.15);
}


.wheel-pointer {
    position: absolute;
    top: clamp(-12px, -2vw, -48px);
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: clamp(12px, 2vw, 48px) solid transparent;
    border-right: clamp(12px, 2vw, 48px) solid transparent;
    border-top: clamp(24px, 4vw, 96px) solid #8a9cff;
    z-index: 10;
    filter: drop-shadow(0 clamp(1px, 0.15vw, 4px) clamp(3px, 0.45vw, 12px) rgba(0, 0, 0, 0.6));
}

.wheel-center {
    display: none;
}

.wheel-center-inner {
    display: none;
}

.wheel-spin-btn {
    padding: clamp(0.9rem, 2vw, 1.2rem) clamp(2rem, 5vw, 3rem);
    background: linear-gradient(135deg, rgba(12, 14, 28, 0.95), rgba(20, 30, 80, 0.9));
    border: clamp(2px, 0.4vw, 3px) solid rgba(138, 156, 255, 0.6);
    border-radius: clamp(10px, 2vw, 16px);
    color: #8a9cff;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.6rem, 1.5vw, 0.9rem);
    box-shadow: 
        0 0 clamp(20px, 4vw, 40px) rgba(138, 156, 255, 0.4),
        0 clamp(4px, 0.8vw, 8px) clamp(16px, 3vw, 32px) rgba(0, 0, 0, 0.5),
        inset 0 0 clamp(10px, 2vw, 20px) rgba(138, 156, 255, 0.1);
    text-shadow: 0 0 clamp(8px, 1.5vw, 16px) rgba(138, 156, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.wheel-spin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 156, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.wheel-spin-btn:hover:not(:disabled)::before {
    left: 100%;
}

.wheel-spin-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(12, 14, 28, 1), rgba(20, 30, 80, 0.95));
    border-color: rgba(138, 156, 255, 0.9);
    transform: translateY(clamp(-2px, -0.4vw, -4px)) scale(1.02);
    box-shadow: 
        0 0 clamp(30px, 6vw, 60px) rgba(138, 156, 255, 0.6),
        0 clamp(6px, 1.2vw, 12px) clamp(24px, 4.5vw, 48px) rgba(0, 0, 0, 0.6),
        inset 0 0 clamp(15px, 3vw, 30px) rgba(138, 156, 255, 0.15);
    text-shadow: 0 0 clamp(12px, 2.5vw, 24px) rgba(138, 156, 255, 0.8);
}

.wheel-spin-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.wheel-spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.wheel-spin-text {
    letter-spacing: clamp(0.5px, 0.1vw, 1px);
}

.wheel.spinning {
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

@media (max-width: 768px) {
    .wheel-wrapper {
        width: clamp(180px, 60vw, 700px);
        height: clamp(180px, 60vw, 700px);
        max-width: 700px;
        max-height: 700px;
    }
    
    .wheel-segment {
        font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    }
}

/* Sehr kleine Bildschirme: Glücksrad dynamisch verkleinern */
@media (max-width: 480px) {
    .wheel-wrapper {
        width: clamp(180px, 75vw, 700px);
        height: clamp(180px, 75vw, 700px);
        max-width: 700px;
        max-height: 700px;
    }
    
    .wheel-segment {
        font-size: 0.7rem;
    }
}

/* Rot-Segment Glüh-Animation */
.wheel-segment.glowing {
    animation: segmentGlow 1s ease-in-out infinite;
    filter: brightness(1.5);
}

@keyframes segmentGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 68, 68, 0.6), inset 0 0 30px rgba(255, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 68, 68, 1), inset 0 0 50px rgba(255, 68, 68, 0.8);
    }
}

/* Plinko Modal */
.plinko-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.plinko-container {
    background: linear-gradient(135deg, rgba(12, 14, 28, 0.95), rgba(20, 30, 80, 0.9));
    border: 2px solid rgba(138, 156, 255, 0.6);
    border-radius: 16px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    box-shadow: 0 0 60px rgba(138, 156, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.plinko-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.plinko-header h2 {
    color: #8a9cff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 20px rgba(138, 156, 255, 0.6);
}

.plinko-close {
    background: transparent;
    border: 2px solid rgba(138, 156, 255, 0.6);
    color: #8a9cff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.plinko-close:hover {
    background: rgba(138, 156, 255, 0.2);
    border-color: rgba(138, 156, 255, 0.9);
    transform: scale(1.1);
}

.plinko-board {
    position: relative;
    width: 100%;
    min-height: 700px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 2rem 1rem;
    margin-bottom: 1rem;
    overflow: visible;
    contain: layout style paint;
}

.plinko-row {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 80px;
    position: relative;
    width: 100%;
}

.plinko-pin {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #fff, #8a9cff, #4d5fff);
    border-radius: 50%;
    box-shadow: 
        0 0 12px rgba(138, 156, 255, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.plinko-ball {
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #8a9cff 60%, #4d5fff);
    border-radius: 50%;
    box-shadow: 
        0 0 15px rgba(138, 156, 255, 0.9),
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    z-index: 10;
    will-change: transform;
    transform-origin: center center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: box-shadow 0.1s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plinko-ball:hover {
    box-shadow: 
        0 0 20px rgba(138, 156, 255, 1),
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 6px rgba(255, 255, 255, 0.4);
}

.plinko-multipliers {
    margin-bottom: 1rem;
}

.plinko-multiplier-row {
    display: block;
    position: relative;
    width: 100%;
    min-height: 50px;
    margin-top: 1rem;
}

.plinko-multiplier {
    text-align: center;
    padding: 0.5rem 0.4rem;
    min-width: 45px;
    width: auto;
    background: rgba(138, 156, 255, 0.1);
    border: 1px solid rgba(138, 156, 255, 0.3);
    border-radius: 8px;
    color: #8a9cff;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
}

.plinko-multiplier.highlighted {
    background: rgba(138, 156, 255, 0.4);
    border-color: rgba(138, 156, 255, 0.8);
    box-shadow: 0 0 20px rgba(138, 156, 255, 0.6);
    transform: scale(1.1);
}

.plinko-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.plinko-balls-left,
.plinko-total-multiplier {
    color: #8a9cff;
    font-size: 1.1rem;
    font-weight: 600;
}

.plinko-balls-left span:last-child,
.plinko-total-multiplier span:last-child {
    color: #fff;
    text-shadow: 0 0 10px rgba(138, 156, 255, 0.8);
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .plinko-container {
        padding: 0.75rem;
        width: 98vw;
        max-height: 98vh;
        max-width: 100%;
    }
    
    .plinko-header {
        margin-bottom: 1rem;
    }
    
    .plinko-header h2 {
        font-size: 1.2rem;
    }
    
    .plinko-close {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    
    .plinko-board {
        min-height: 350px;
        padding: 0.75rem 0.25rem;
        margin-bottom: 0.75rem;
    }
    
    .plinko-row {
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .plinko-pin {
        width: 6px;
        height: 6px;
    }
    
    .plinko-ball {
        width: 14px;
        height: 14px;
    }
    
    .plinko-multiplier {
        font-size: 0.65rem;
        padding: 0.25rem 0.15rem;
        min-width: 0;
    }
    
    .plinko-multiplier-row {
        gap: 2px;
    }
    
    .plinko-info {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .plinko-balls-left,
    .plinko-total-multiplier {
        font-size: 0.95rem;
    }
}

/* Sehr kleine Screens */
@media (max-width: 480px) {
    .plinko-container {
        padding: 0.5rem;
        width: 100vw;
        max-height: 100vh;
    }
    
    .plinko-board {
        min-height: 300px;
        padding: 0.5rem 0.15rem;
    }
    
    .plinko-row {
        gap: 6px;
        margin-bottom: 25px;
    }
    
    .plinko-pin {
        width: 5px;
        height: 5px;
    }
    
    .plinko-ball {
        width: 12px;
        height: 12px;
    }
    
    .plinko-multiplier {
        font-size: 0.55rem;
        padding: 0.2rem 0.1rem;
    }
}

