* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* ============================================
   INTERACTIVE CRYSTAL KALEIDOSCOPE BACKGROUND
   ============================================ */

.environment-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a15 0%, #151530 25%, #0d0d20 50%, #101025 75%, #080815 100%);
}

/* Crystal prism layers - ULTRA enhanced kaleidoscope effect */
.crystal-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    will-change: transform;
}

.crystal-layer-1 {
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(138, 43, 227, 0.7) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(0, 150, 255, 0.6) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 0, 128, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(212, 175, 55, 0.3) 0%, transparent 50%);
    filter: blur(20px);
    animation: crystalPulse1 12s ease-in-out infinite;
    will-change: opacity;
}


.crystal-layer-3 {
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(138, 43, 227, 0.25) 0deg 10deg,
            transparent 10deg 20deg,
            rgba(212, 175, 55, 0.2) 20deg 30deg,
            transparent 30deg 40deg,
            rgba(0, 150, 255, 0.25) 40deg 50deg,
            transparent 50deg 60deg
        );
    animation: crystalRotateReverse 20s linear infinite;
    will-change: transform;
    /* Make larger than screen to hide edges during rotation */
    width: 300vw;
    height: 300vh;
    left: -100%;
    top: -100%;
}


@keyframes crystalPulse1 {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes crystalRotateReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* Win effect - intensified crystal glow */
.environment-container.win-active .crystal-layer-1 {
    filter: blur(20px) brightness(1.3);
    opacity: 0.9;
}

.environment-container.win-active .crystal-layer-3 {
    animation-duration: 10s;
    opacity: 0.6;
}


/* ============================================
   CRYSTAL SHARD EFFECTS (replacing confetti)
   ============================================ */

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

/* Crystal shard that falls */
.crystal-shard {
    position: absolute;
    top: -30px;
    animation: crystalFall linear forwards;
    will-change: transform;
}

/* Different crystal shard shapes using clip-path */
.crystal-shard.diamond {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.crystal-shard.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.crystal-shard.hexagon {
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
}

.crystal-shard.star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes crystalFall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) rotate(180deg) translateX(20px) scale(1.1);
    }
    50% {
        transform: translateY(50vh) rotate(360deg) translateX(-10px) scale(0.9);
    }
    75% {
        transform: translateY(75vh) rotate(540deg) translateX(15px) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translateY(110vh) rotate(720deg) translateX(0) scale(0.8);
        opacity: 0;
    }
}

/* Sparkle effect for crystals */
.crystal-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    border-radius: 50%;
    animation: sparkle 1s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Win animations for crystal symbols */
.symbol {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    position: relative;
    transition: transform 0.3s ease;
}

.symbol img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.symbol.crystal-red img { filter: drop-shadow(0 0 10px rgba(255, 50, 50, 0.6)); }
.symbol.crystal-purple img { filter: drop-shadow(0 0 10px rgba(138, 43, 227, 0.6)); }
.symbol.crystal-blue img { filter: drop-shadow(0 0 10px rgba(0, 150, 255, 0.6)); }
.symbol.crystal-green img { filter: drop-shadow(0 0 10px rgba(0, 200, 100, 0.6)); }
.symbol.crystal-orange img { filter: drop-shadow(0 0 10px rgba(255, 150, 0, 0.6)); }

/* Win animations */
.symbol.win-shake {
    animation: crystalShake 0.5s ease-in-out 3;
}

.symbol.win-bounce {
    animation: crystalBounce 0.6s ease-in-out 2;
}

.symbol.win-pulse {
    animation: crystalPulse 0.4s ease-in-out 3;
}

.symbol.win-sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    animation: symbolSparkle 0.8s ease-out 2;
    pointer-events: none;
}

/* Particle fragments that fall from winning crystals */
.crystal-fragment {
    position: absolute;
    width: 8px;
    height: 8px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    pointer-events: none;
    z-index: 200;
    animation: fragmentFall 1s ease-out forwards;
}

@keyframes crystalShake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-8deg) scale(1.05); }
    75% { transform: rotate(8deg) scale(1.05); }
}

@keyframes crystalBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

@keyframes crystalPulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.15);
        filter: brightness(1.3);
    }
}

@keyframes symbolSparkle {
    0% { 
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes fragmentFall {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 20px), var(--ty, 60px)) rotate(360deg) scale(0.3);
        opacity: 0;
    }
}

/* Game container - slots centered, rules absolute positioned */
.game-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    position: relative;
    z-index: 100;
    padding: 20px;
}

.game-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 700px;
    position: relative;
}

/* Rules panel - absolute on right side, wider towards game */
.rules-panel {
    position: absolute;
    right: -170px;
    top: 0;
    display: block;
    background: linear-gradient(145deg, rgba(0,0,0,0.8) 0%, rgba(30,30,30,0.9) 100%);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 15px;
    width: 250px;
}

.slot-machine {
    position: relative;
    z-index: 100;
    background: linear-gradient(145deg, 
        rgba(26, 26, 62, 0.95) 0%, 
        rgba(20, 20, 50, 0.95) 30%, 
        rgba(15, 15, 45, 0.95) 70%,
        rgba(26, 26, 62, 0.95) 100%);
    box-shadow: 
        0 0 30px rgba(138, 43, 227, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.rules-panel h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(138, 43, 227, 0.8);
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rules-panel ul {
    list-style: none;
    color: #fff;
}

.rules-panel li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.rules-panel li:last-child {
    border-bottom: none;
}

.rules-panel li.highlight {
    background: rgba(138, 43, 227, 0.3);
    border-radius: 5px;
    padding: 6px;
    margin: 2px 0;
    animation: highlightPulseCrystal 0.5s ease 3;
}

@keyframes highlightPulseCrystal {
    0%, 100% { 
        background: rgba(138, 43, 227, 0.3);
        box-shadow: 0 0 10px rgba(138, 43, 227, 0.3);
    }
    50% { 
        background: rgba(138, 43, 227, 0.5);
        box-shadow: 0 0 20px rgba(138, 43, 227, 0.6);
    }
}

.rules-panel .symbol-preview {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.rules-panel .symbol-preview img {
    width: 24px;
    box-shadow: 
        0 0 40px rgba(138, 43, 227, 0.3),
        0 0 60px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.slot-machine {
    position: relative;
    z-index: 100;
    background: linear-gradient(145deg, 
        rgba(26, 26, 62, 0.7) 0%, 
        rgba(20, 20, 50, 0.8) 30%, 
        rgba(15, 15, 45, 0.8) 70%,
        rgba(26, 26, 62, 0.7) 100%);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 0 60px rgba(138, 43, 227, 0.4),
        0 0 100px rgba(0, 150, 255, 0.2),
        0 0 40px rgba(212, 175, 55, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(138, 43, 227, 0.5);
    width: 400px;
    flex-shrink: 0;
    margin: 0 auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Premium title with serif font */
.game-title {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    font-family: 'Times New Roman', 'Playfair Display', Georgia, serif;
    text-shadow: 
        0 0 10px rgba(138, 43, 227, 0.9),
        0 0 20px rgba(0, 150, 255, 0.7),
        0 0 30px rgba(138, 43, 227, 0.5),
        0 0 40px rgba(212, 175, 55, 0.3);
    letter-spacing: 4px;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #d4af37 25%,
        #a78bfa 50%, 
        #60a5fa 75%,
        #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gold-accented reels with glassmorphism */
.reel {
    width: 100px;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(145deg, 
        rgba(30, 30, 50, 0.8) 0%, 
        rgba(20, 20, 35, 0.9) 100%);
    border: 3px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;
    position: relative;
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(138, 43, 227, 0.4),
        0 0 30px rgba(212, 175, 55, 0.2);
}

/* Premium payline with gold */
.payline {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 98px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.6) 15%,
        rgba(138, 43, 227, 0.9) 30%,
        rgba(0, 150, 255, 1) 50%, 
        rgba(138, 43, 227, 0.9) 70%,
        rgba(212, 175, 55, 0.6) 85%,
        transparent 100%);
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.8), 
        0 0 40px rgba(138, 43, 227, 0.6),
        0 0 60px rgba(0, 150, 255, 0.4);
    z-index: 10;
    pointer-events: none;
}

/* SVG Crystals next to SPIN - closer and contrasting colors */
.spin-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
}

/* SVG Crystals - positioned on button edges with contrasting colors */
.spin-crystal {
    width: 28px;
    height: 44px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(255, 0, 128, 0.8));
    animation: crystalGlow 2s ease-in-out infinite;
}

/* Left crystal - bright pink/magenta to contrast with purple button */
.spin-crystal.crystal-left {
    margin-right: -8px;
    animation-delay: 0s;
}

/* Right crystal - emerald green to contrast with purple button */
.spin-crystal.crystal-right {
    margin-left: -8px;
    animation-delay: 1s;
}

@keyframes crystalGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 0, 128, 0.6)) drop-shadow(0 0 15px rgba(0, 255, 150, 0.4));
        transform: scale(1) translateY(0);
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 0, 128, 0.9)) drop-shadow(0 0 25px rgba(0, 255, 150, 0.6));
        transform: scale(1.08) translateY(-2px);
    }
}

/* Premium SPIN button with gold accents */
.spin-btn {
    flex: 1;
    padding: 20px 40px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 4px;
    font-family: 'Times New Roman', Georgia, serif;
    color: #fff;
    background: linear-gradient(145deg, 
        rgba(138, 43, 227, 0.9) 0%, 
        rgba(212, 175, 55, 0.6) 25%,
        rgba(0, 150, 255, 0.9) 50%,
        rgba(212, 175, 55, 0.6) 75%,
        rgba(138, 43, 227, 0.9) 100%);
    border: 3px solid rgba(212, 175, 55, 0.6);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 
        0 0 30px rgba(138, 43, 227, 0.5),
        0 0 60px rgba(212, 175, 55, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Gold shine animation */
.spin-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.spin-btn:hover::before {
    animation: goldShine 0.8s ease;
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 40px rgba(138, 43, 227, 0.7),
        0 0 80px rgba(212, 175, 55, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(212, 175, 55, 0.8);
}

@keyframes goldShine {
    0% { transform: translateX(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) rotate(45deg); opacity: 0; }
}

/* Glassmorphism panels */
.result-panel {
    background: linear-gradient(145deg, 
        rgba(15, 15, 30, 0.8) 0%, 
        rgba(25, 25, 40, 0.85) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 12px;
    text-align: center;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.result-panel.win {
    border-color: rgba(212, 175, 55, 0.8);
    background: linear-gradient(145deg, 
        rgba(212, 175, 55, 0.25) 0%, 
        rgba(138, 43, 227, 0.15) 50%,
        rgba(15, 15, 30, 0.8) 100%);
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.6), 
        inset 0 0 30px rgba(212, 175, 55, 0.2);
}

/* Premium balance display */
.balance-display {
    background: linear-gradient(145deg, 
        rgba(10, 10, 25, 0.8) 0%, 
        rgba(20, 20, 40, 0.85) 100%);
    border-radius: 10px;
    padding: 15px 25px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 
        0 0 30px rgba(138, 43, 227, 0.3),
        0 0 50px rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.balance-value {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    font-family: 'Times New Roman', Georgia, serif;
    text-shadow: 
        0 0 10px rgba(212, 175, 55, 0.9),
        0 0 20px rgba(138, 43, 227, 0.7),
        0 0 30px rgba(0, 150, 255, 0.5);
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #d4af37 30%,
        #a78bfa 60%, 
        #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Premium rules panel */
.rules-panel h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Times New Roman', Georgia, serif;
    text-shadow: 
        0 0 10px rgba(212, 175, 55, 0.9),
        0 0 20px rgba(138, 43, 227, 0.7);
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #d4af37 50%,
        #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal glassmorphism */
.modal-content {
    background: linear-gradient(145deg, 
        rgba(26, 26, 46, 0.9) 0%, 
        rgba(22, 33, 62, 0.95) 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 2px solid rgba(212, 175, 55, 0.5);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(138, 43, 227, 0.4),
        0 0 80px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-content h2 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 20px;
    font-family: 'Times New Roman', Georgia, serif;
    text-shadow: 
        0 0 10px rgba(212, 175, 55, 0.9),
        0 0 20px rgba(138, 43, 227, 0.7);
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #d4af37 30%,
        #a78bfa 60%, 
        #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gold modal button */
.modal-btn {
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Times New Roman', Georgia, serif;
    color: #fff;
    background: linear-gradient(145deg, 
        rgba(212, 175, 55, 0.9) 0%, 
        rgba(138, 43, 227, 0.9) 50%,
        rgba(212, 175, 55, 0.9) 100%);
    border: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 10px 30px rgba(212, 175, 55, 0.6),
        0 0 50px rgba(138, 43, 227, 0.5);
    border-color: rgba(212, 175, 55, 0.9);
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
        min-height: 100vh;
        height: 100vh;
    }
    
    .game-container {
        padding: 3px;
        min-height: 100vh;
        height: 100vh;
        align-items: flex-start;
        padding-top: 5px;
    }
    
    .game-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        width: 100%;
        max-width: 100%;
    }
    
    .slot-machine {
        width: 100%;
        max-width: 360px;
        padding: 8px;
        transform: scale(0.93);
        transform-origin: top center;
    }
    
    .machine-header {
        margin-bottom: 6px;
    }
    
    .game-title {
        font-size: 16px;
    }
    
    .reel {
        width: 65px;
        height: 130px;
    }
    
    .reel-strip {
        transform: translateY(-32px);
    }
    
    @keyframes smoothSpin {
        0% { transform: translateY(-32px); }
        100% { transform: translateY(-98px); }
    }
    
    @keyframes reelBlur {
        0% { transform: translateY(-32px); }
        50% { transform: translateY(-34px); }
        100% { transform: translateY(-32px); }
    }
    
    .symbol {
        width: 65px;
        height: 65px;
        font-size: 32px;
    }
    
    .symbol img {
        max-width: 42px;
        max-height: 42px;
    }
    
    .slot-grid {
        gap: 4px;
        margin-bottom: 6px;
    }
    
    .payline {
        top: 63px;
        height: 3px;
    }
    
    .result-panel {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        padding: 6px 8px;
        margin-bottom: 6px;
    }
    
    .result-text {
        font-size: 11px;
    }
    
    .win-amount {
        font-size: 14px;
    }
    
    .bet-panel {
        padding: 6px;
        margin-bottom: 6px;
        gap: 6px;
    }
    
    .bet-input {
        padding: 6px;
        font-size: 14px;
    }
    
    .quick-bets {
        flex-wrap: wrap;
        gap: 0px !important;
    }
    
    .bet-btn {
        min-width: 40px;
        padding: 4px 2px;
        font-size: 9px;
    }
    
    .controls {
        gap: 8px;
    }
    
    .balance-display {
        padding: 6px 10px;
    }
    
    .balance-label {
        font-size: 9px;
        margin-bottom: 2px;
    }
    
    .balance-value {
        font-size: 14px;
    }
    
    .spin-btn {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .rules-panel {
        display: none;
    }
    
    .rules-btn {
        display: block;
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .mute-btn {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .header-buttons {
        gap: 6px;
    }
}

/* Desktop - hide modal button */
@media (min-width: 769px) {
    .rules-btn {
        display: none;
    }
    
    .rules-modal {
        display: none !important;
    }
}

/* SVG Crystal Slot Logo */
.game-logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(138, 43, 227, 0.6));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(138, 43, 227, 0.5)) drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(138, 43, 227, 0.8)) drop-shadow(0 0 40px rgba(212, 175, 55, 0.5));
    }
}

.machine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.game-title {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(138, 43, 227, 0.8),
        0 0 20px rgba(0, 150, 255, 0.6),
        0 0 30px rgba(138, 43, 227, 0.4);
    letter-spacing: 3px;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rules-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(138, 43, 227, 0.6);
    background: transparent;
    color: #a78bfa;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rules-btn:hover {
    background: rgba(138, 43, 227, 0.3);
    color: #fff;
    box-shadow: 0 0 15px rgba(138, 43, 227, 0.5);
}

/* Header buttons container */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mute button */
.mute-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(138, 43, 227, 0.6);
    background: transparent;
    font-size: 16px;
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mute-btn:hover {
    background: rgba(138, 43, 227, 0.3);
    color: #fff;
    box-shadow: 0 0 15px rgba(138, 43, 227, 0.5);
}

.mute-btn.muted {
    border-color: #888;
    opacity: 0.6;
}

/* Result panel - fixed height to prevent jumping */
.result-panel {
    background: linear-gradient(145deg, 
        rgba(15, 15, 30, 0.9) 0%, 
        rgba(25, 25, 40, 0.95) 100%);
    border: 3px solid rgba(138, 43, 227, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 12px;
    text-align: center;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.result-panel.win {
    border-color: rgba(138, 43, 227, 0.8);
    background: linear-gradient(145deg, 
        rgba(138, 43, 227, 0.2) 0%, 
        rgba(15, 15, 30, 0.9) 100%);
    box-shadow: 
        0 0 30px rgba(138, 43, 227, 0.5), 
        inset 0 0 20px rgba(138, 43, 227, 0.2);
    animation: winPulseStrong 0.6s ease infinite;
}

.result-panel.lose {
    border-color: rgba(255, 100, 100, 0.6);
    background: linear-gradient(145deg, 
        rgba(255, 50, 50, 0.15) 0%, 
        rgba(15, 15, 30, 0.9) 100%);
    box-shadow: 0 0 20px rgba(255, 100, 100, 0.3);
    animation: losePulse 0.5s ease;
}

@keyframes winPulseStrong {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(138, 43, 227, 0.4), 
            inset 0 0 10px rgba(138, 43, 227, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 40px rgba(138, 43, 227, 0.7), 
            inset 0 0 25px rgba(138, 43, 227, 0.4);
    }
}

@keyframes losePulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 100, 100, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 100, 100, 0.5); }
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.result-text {
    color: #a78bfa;
    font-size: 14px;
    font-weight: 600;
}

.result-panel.win .result-text {
    color: #fff;
    font-weight: 700;
    text-shadow: 
        0 0 10px rgba(138, 43, 227, 0.8),
        0 0 20px rgba(0, 150, 255, 0.5);
}

.result-panel.lose .result-text {
    color: #ff8a8a;
    font-weight: 600;
}

.win-amount {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(138, 43, 227, 0.8),
        0 0 20px rgba(0, 150, 255, 0.5);
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Slot grid - 3 reels horizontal */
.slot-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}

/* Single reel container */
.reel {
    width: 100px;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(145deg, 
        rgba(30, 30, 50, 0.9) 0%, 
        rgba(20, 20, 35, 0.95) 100%);
    border: 3px solid rgba(138, 43, 227, 0.5);
    border-radius: 10px;
    position: relative;
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(138, 43, 227, 0.3);
}

/* Payline indicator */
.payline {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 98px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(138, 43, 227, 0.8) 20%, 
        rgba(0, 150, 255, 1) 50%, 
        rgba(138, 43, 227, 0.8) 80%, 
        transparent 100%);
    box-shadow: 
        0 0 15px rgba(138, 43, 227, 0.8), 
        0 0 30px rgba(0, 150, 255, 0.5);
    z-index: 10;
    pointer-events: none;
}

/* Position reel-strip to show center row in the middle with partial top/bottom */
.reel-strip {
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(-50px);
    will-change: transform;
}

.reel-strip.spinning {
    animation: reelBlur 0.05s linear infinite;
}

/* No blur - just position change for crisp emojis */
@keyframes reelBlur {
    0% { transform: translateY(-50px); }
    50% { transform: translateY(-52px); }
    100% { transform: translateY(-50px); }
}

.symbol {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #fff 0%, #f0f0f0 100%);
}

.symbol img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.symbol.emoji {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Bet panel */
.bet-panel {
    background: linear-gradient(145deg, 
        rgba(20, 20, 35, 0.8) 0%, 
        rgba(30, 30, 50, 0.9) 100%);
    border: 2px solid rgba(138, 43, 227, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bet-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bet-label {
    color: #888;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
}

.bet-input {
    background: linear-gradient(145deg, 
        rgba(10, 10, 25, 0.9) 0%, 
        rgba(20, 20, 40, 0.9) 100%);
    border: 2px solid rgba(138, 43, 227, 0.5);
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    text-shadow: 0 0 10px rgba(138, 43, 227, 0.5);
}

.bet-input:focus {
    outline: none;
    border-color: rgba(138, 43, 227, 0.8);
    box-shadow: 0 0 15px rgba(138, 43, 227, 0.4);
}

.quick-bets {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.bet-btn {
    flex: 1;
    padding: 8px 5px;
    background: linear-gradient(145deg, 
        rgba(60, 60, 80, 0.8) 0%, 
        rgba(40, 40, 60, 0.9) 100%);
    border: 2px solid rgba(138, 43, 227, 0.4);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bet-btn:hover {
    background: linear-gradient(145deg, 
        rgba(80, 80, 100, 0.9) 0%, 
        rgba(60, 60, 80, 0.9) 100%);
    border-color: rgba(138, 43, 227, 0.7);
    box-shadow: 0 0 15px rgba(138, 43, 227, 0.3);
}

.bet-btn.reset-btn {
    background: linear-gradient(145deg, 
        rgba(200, 50, 100, 0.8) 0%, 
        rgba(150, 30, 70, 0.9) 100%);
    border-color: rgba(255, 100, 150, 0.5);
    color: #fff;
}

.bet-btn.reset-btn:hover {
    background: linear-gradient(145deg, 
        rgba(220, 70, 120, 0.9) 0%, 
        rgba(180, 50, 90, 0.9) 100%);
    border-color: rgba(255, 120, 170, 0.7);
    box-shadow: 0 0 15px rgba(255, 100, 150, 0.4);
}

.bet-btn.active {
    background: linear-gradient(145deg, 
        rgba(138, 43, 227, 0.9) 0%, 
        rgba(0, 150, 255, 0.9) 100%);
    border-color: rgba(138, 43, 227, 0.8);
    color: #fff;
    box-shadow: 0 0 15px rgba(138, 43, 227, 0.5);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.balance-display {
    background: linear-gradient(145deg, 
        rgba(10, 10, 25, 0.9) 0%, 
        rgba(20, 20, 40, 0.9) 100%);
    border-radius: 10px;
    padding: 15px 25px;
    border: 2px solid rgba(138, 43, 227, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 20px rgba(138, 43, 227, 0.2);
}

.balance-label {
    color: #a78bfa;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.balance-value {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(138, 43, 227, 0.8),
        0 0 20px rgba(0, 150, 255, 0.5);
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-value.pulse {
    animation: balancePulse 0.5s ease;
}

@keyframes balancePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Win amount fly animation */
.win-fly {
    position: fixed;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(138, 43, 227, 0.8),
        0 0 20px rgba(0, 150, 255, 0.6),
        0 0 30px rgba(138, 43, 227, 0.4);
    pointer-events: none;
    z-index: 1000;
    transition: all 1s cubic-bezier(0.25, 0.1, 0.25, 1);
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.spin-btn {
    flex: 1;
    padding: 20px 40px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    background: linear-gradient(145deg, 
        rgba(138, 43, 227, 0.9) 0%, 
        rgba(0, 150, 255, 0.9) 50%,
        rgba(138, 43, 227, 0.9) 100%);
    border: 2px solid rgba(138, 43, 227, 0.6);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 
        0 0 20px rgba(138, 43, 227, 0.4),
        0 0 40px rgba(0, 150, 255, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.spin-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.spin-btn:hover::before {
    animation: crystalShine 0.8s ease;
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 30px rgba(138, 43, 227, 0.6),
        0 0 60px rgba(0, 150, 255, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.spin-btn:active {
    transform: translateY(1px);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

@keyframes crystalShine {
    0% { transform: translateX(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) rotate(45deg); opacity: 0; }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(145deg, 
        rgba(26, 26, 46, 0.95) 0%, 
        rgba(22, 33, 62, 0.98) 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 2px solid rgba(138, 43, 227, 0.6);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(138, 43, 227, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

.rules-modal {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 
        0 0 10px rgba(138, 43, 227, 0.8),
        0 0 20px rgba(0, 150, 255, 0.5);
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-symbols {
    font-size: 50px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.result-symbols img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.result-symbols .emoji {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

#resultMessage {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-btn {
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, 
        rgba(138, 43, 227, 0.9) 0%, 
        rgba(0, 150, 255, 0.9) 100%);
    border: 2px solid rgba(138, 43, 227, 0.5);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(138, 43, 227, 0.3);
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 10px 30px rgba(138, 43, 227, 0.5),
        0 0 40px rgba(0, 150, 255, 0.4);
    border-color: rgba(138, 43, 227, 0.8);
}

.close-rules {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-rules:hover {
    color: #fff;
}

.rules-image-container {
    display: none;
    margin: 20px 0;
}

.rules-image-container.active {
    display: block;
}

.rules-image-container img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.rules-fallback {
    display: none;
}

.rules-fallback.active {
    display: block;
}

.rules-fallback h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(138, 43, 227, 0.8);
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rules-fallback ul {
    list-style: none;
    text-align: left;
    color: #fff;
}

.rules-fallback li {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rules-fallback li:last-child {
    border-bottom: none;
}

.rules-fallback .symbol-preview {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    margin-right: 10px;
}

.rules-fallback .symbol-preview .rules-crystal-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(138, 43, 227, 0.5));
}

.rules-fallback .payout {
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(138, 43, 227, 0.8);
}

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.loader.active {
    display: flex;
}

.loader span {
    color: #fff;
    font-size: 16px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(138, 43, 227, 0.8);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(138, 43, 227, 0.3);
    border-top-color: #8a2be2;
    border-right-color: #0096ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(138, 43, 227, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes spinReel {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Smooth spin animation for reels */
.reel.spinning .reel-strip {
    animation: smoothSpin 0.15s linear infinite;
}

@keyframes smoothSpin {
    0% { transform: translateY(-50px); }
    100% { transform: translateY(-150px); }
}

.win-animation {
    animation: winPulse 0.5s ease 3;
}

@keyframes winPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: inset 0 0 40px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.5);
    }
}

/* Reel win animation */
.reel.win-animation {
    animation: reelWinPulse 0.5s ease 3;
}

@keyframes reelWinPulse {
    0%, 100% { 
        box-shadow: inset 0 0 20px rgba(138, 43, 227, 0.5), 0 0 20px rgba(138, 43, 227, 0.3);
    }
    50% { 
        box-shadow: inset 0 0 40px rgba(138, 43, 227, 0.8), 0 0 40px rgba(0, 150, 255, 0.6);
    }
}

/* ============================================
   CRYSTAL SYMBOL ANIMATIONS
   ============================================ */

/* Crystal shake animation */
.symbol.win-shake {
    animation: crystalShake 0.5s ease-in-out 3;
}

@keyframes crystalShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-5px) rotate(-3deg); }
    50% { transform: translateX(5px) rotate(3deg); }
    75% { transform: translateX(-3px) rotate(-2deg); }
}

/* Crystal bounce animation */
.symbol.win-bounce {
    animation: crystalBounce 0.6s ease-in-out 3;
}

@keyframes crystalBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

/* Crystal pulse animation */
.symbol.win-pulse {
    animation: crystalPulse 0.5s ease-in-out 3;
}

@keyframes crystalPulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 5px currentColor);
    }
    50% { 
        transform: scale(1.15);
        filter: brightness(1.3) drop-shadow(0 0 20px currentColor);
    }
}

/* Crystal sparkle animation */
.symbol.win-sparkle {
    animation: crystalSparkle 0.4s ease-in-out 4;
    position: relative;
}

.symbol.win-sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: sparkleFlash 0.4s ease-in-out 4;
    pointer-events: none;
}

@keyframes crystalSparkle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
}

@keyframes sparkleFlash {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ============================================
   CRYSTAL COLOR GLOW CLASSES
   ============================================ */

.symbol.crystal-red {
    color: #ff3366;
    filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.6));
}

.symbol.crystal-purple {
    color: #8a2be2;
    filter: drop-shadow(0 0 8px rgba(138, 43, 226, 0.6));
}

.symbol.crystal-blue {
    color: #0096ff;
    filter: drop-shadow(0 0 8px rgba(0, 150, 255, 0.6));
}

.symbol.crystal-green {
    color: #00c864;
    filter: drop-shadow(0 0 8px rgba(0, 200, 100, 0.6));
}

.symbol.crystal-orange {
    color: #ff9600;
    filter: drop-shadow(0 0 8px rgba(255, 150, 0, 0.6));
}

/* ============================================
   CRYSTAL SHARD EFFECTS
   ============================================ */

.crystal-shard {
    position: fixed;
    top: -20px;
    z-index: 100;
    animation: shardFall linear forwards;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.crystal-shard.diamond {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.crystal-shard.triangle {
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.crystal-shard.hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.crystal-shard.star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes shardFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* Crystal sparkle effect */
.crystal-sparkle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px white, 0 0 20px 4px rgba(138, 43, 227, 0.5);
    animation: sparkleFade 1s ease-out forwards;
    z-index: 101;
}

@keyframes sparkleFade {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Crystal fragment burst effect */
.crystal-fragment {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    z-index: 200;
    animation: fragmentBurst 1s ease-out forwards;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

@keyframes fragmentBurst {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 30px), var(--ty, 50px)) rotate(360deg) scale(0);
        opacity: 0;
    }
}

/* ============================================
   CRYSTAL BACKGROUND ADDITIONAL ELEMENTS
   ============================================ */

.crystal-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
    filter: blur(50px);
    will-change: transform, opacity;
    background: radial-gradient(circle, rgba(138, 43, 227, 0.25) 0%, rgba(0, 150, 255, 0.15) 40%, transparent 70%);
}

.crystal-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatParticle linear infinite;
    pointer-events: none;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10vh) translateX(50px) scale(1);
        opacity: 0;
    }
}
