/**
 * Hero Slot Game 5x3 Styles
 * Full-size 5x3 mini slot machine with 9 paylines for hero section
 */

/* CSS Variables */
.la-hero-slot--5x3 {
    --slot-symbol-size: 55px;
    --slot-reel-height: calc(var(--slot-symbol-size) * 3);
    --slot-gap: 3px;
    --slot-gold: #fbbf24;
    --slot-gold-dark: #d97706;
    --slot-purple: #7c3aed;
    --slot-purple-dark: #4c1d95;
    --slot-bg: #1e1b4b;
    --slot-border-radius: 16px;
}

/* Main container */
.la-hero-slot--5x3 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

/* Background aura/glow effect */
.la-hero-slot--5x3::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 350px;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(124, 58, 237, 0.4) 0%,
        rgba(99, 102, 241, 0.25) 30%,
        rgba(251, 191, 36, 0.15) 50%,
        rgba(251, 191, 36, 0.05) 70%,
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(30px);
    animation: auraBreathing5x3 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.la-hero-slot--5x3::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 450px;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(251, 191, 36, 0.1) 0%,
        rgba(124, 58, 237, 0.08) 40%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(50px);
    animation: auraBreathing5x3 4s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes auraBreathing5x3 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

/* Machine frame */
.la-hero-slot--5x3 .la-hero-slot__machine {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, var(--slot-purple) 0%, var(--slot-purple-dark) 100%);
    border-radius: var(--slot-border-radius);
    padding: 10px;
    box-shadow:
        0 0 0 3px var(--slot-gold),
        0 0 40px rgba(251, 191, 36, 0.4),
        0 0 80px rgba(124, 58, 237, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.4);
    /* Ensure crisp rendering */
    isolation: isolate;
}

/* Top bar with lights */
.la-hero-slot--5x3 .la-hero-slot__top-bar {
    background: linear-gradient(180deg, var(--slot-gold) 0%, var(--slot-gold-dark) 100%);
    border-radius: 8px 8px 0 0;
    padding: 6px 10px;
    margin: -10px -10px 10px -10px;
    border-radius: var(--slot-border-radius) var(--slot-border-radius) 0 0;
}

.la-hero-slot--5x3 .la-hero-slot__lights {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.la-hero-slot--5x3 .la-hero-slot__light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fef3c7;
    box-shadow: 0 0 8px 2px rgba(254, 243, 199, 0.8);
    animation: slotLightPulse5x3 1.5s ease-in-out infinite;
}

.la-hero-slot--5x3 .la-hero-slot__light--1 { animation-delay: 0s; }
.la-hero-slot--5x3 .la-hero-slot__light--2 { animation-delay: 0.12s; }
.la-hero-slot--5x3 .la-hero-slot__light--3 { animation-delay: 0.24s; }
.la-hero-slot--5x3 .la-hero-slot__light--4 { animation-delay: 0.36s; }
.la-hero-slot--5x3 .la-hero-slot__light--5 { animation-delay: 0.48s; }
.la-hero-slot--5x3 .la-hero-slot__light--6 { animation-delay: 0.6s; }
.la-hero-slot--5x3 .la-hero-slot__light--7 { animation-delay: 0.72s; }
.la-hero-slot--5x3 .la-hero-slot__light--8 { animation-delay: 0.84s; }
.la-hero-slot--5x3 .la-hero-slot__light--9 { animation-delay: 0.96s; }

@keyframes slotLightPulse5x3 {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Reels wrapper */
.la-hero-slot--5x3 .la-hero-slot__reels-wrapper {
    position: relative;
    background: var(--slot-bg);
    border-radius: 8px;
    padding: 6px;
    overflow: hidden;
    /* Ensure no blur inheritance */
    filter: none;
    backdrop-filter: none;
}

/* Reels container - 5 reels */
.la-hero-slot--5x3 .la-hero-slot__reels {
    display: flex;
    gap: var(--slot-gap);
    position: relative;
}

/* Individual reel */
.la-hero-slot--5x3 .la-hero-slot__reel {
    width: var(--slot-symbol-size);
    height: var(--slot-reel-height);
    overflow: hidden;
    background: linear-gradient(180deg, #0f0a2e 0%, #1a1445 50%, #0f0a2e 100%);
    border-radius: 4px;
    position: relative;
    /* Ensure crisp symbols */
    filter: none;
}

/* Reel strip - holds all symbols */
.la-hero-slot--5x3 .la-hero-slot__reel-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Symbol */
.la-hero-slot--5x3 .la-hero-slot__symbol {
    width: var(--slot-symbol-size);
    height: var(--slot-symbol-size);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--slot-symbol-size) * 0.58);
    line-height: 1;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.la-hero-slot--5x3 .la-hero-slot__symbol.winning {
    animation: slotSymbolWin5x3 0.5s ease-in-out infinite alternate;
    position: relative;
    z-index: 6;
}

.la-hero-slot--5x3 .la-hero-slot__symbol.winning::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, transparent 70%);
    border-radius: 6px;
    z-index: -1;
    animation: symbolGlowPulse5x3 0.5s ease-in-out infinite alternate;
}

@keyframes slotSymbolWin5x3 {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 6px var(--slot-gold));
    }
    100% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px var(--slot-gold)) drop-shadow(0 0 20px rgba(251, 191, 36, 0.6));
    }
}

@keyframes symbolGlowPulse5x3 {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* =========================================================================
   WIN LINES - 9 Paylines
   ========================================================================= */

.la-hero-slot--5x3 .la-hero-slot__win-line {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg,
        var(--slot-gold) 0%,
        #fff 20%,
        var(--slot-gold) 50%,
        #fff 80%,
        var(--slot-gold) 100%
    );
    background-size: 200% 100%;
    opacity: 0;
    pointer-events: none;
    border-radius: 2px;
    z-index: 5;
}

/* Line end circles */
.la-hero-slot--5x3 .la-hero-slot__win-line::before,
.la-hero-slot--5x3 .la-hero-slot__win-line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, var(--slot-gold) 40%, transparent 70%);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow:
        0 0 8px var(--slot-gold),
        0 0 16px var(--slot-gold),
        inset 0 0 4px rgba(255, 255, 255, 0.5);
    border: 2px solid #fff;
}

.la-hero-slot--5x3 .la-hero-slot__win-line::before { left: -6px; }
.la-hero-slot--5x3 .la-hero-slot__win-line::after { right: -6px; }

/* 9 Paylines positioning (same as Estonian Slot):
   Line 1: Middle row (horizontal) - 2,2,2,2,2
   Line 2: Top row (horizontal) - 1,1,1,1,1
   Line 3: Bottom row (horizontal) - 3,3,3,3,3
   Line 4: V-shape - 1,2,3,2,1
   Line 5: Inverted V - 3,2,1,2,3
   Line 6: Zigzag down - 2,1,2,3,2
   Line 7: Zigzag up - 2,3,2,1,2
   Line 8: W-shape - 1,3,1,3,1
   Line 9: M-shape - 3,1,3,1,3
*/

/* Horizontal lines - span full width */
.la-hero-slot--5x3 .la-hero-slot__win-line--1,
.la-hero-slot--5x3 .la-hero-slot__win-line--2,
.la-hero-slot--5x3 .la-hero-slot__win-line--3 {
    left: -6px;
    right: -6px;
}

/* Line 1: Middle row */
.la-hero-slot--5x3 .la-hero-slot__win-line--1 {
    top: 50%;
    transform: translateY(-50%);
}

/* Line 2: Top row */
.la-hero-slot--5x3 .la-hero-slot__win-line--2 {
    top: calc(var(--slot-symbol-size) / 2 + 6px);
}

/* Line 3: Bottom row */
.la-hero-slot--5x3 .la-hero-slot__win-line--3 {
    bottom: calc(var(--slot-symbol-size) / 2 + 6px);
}

/* Non-horizontal lines use SVG for complex paths */
/* For simplicity, we'll use clip-path and transforms for V, inverted V shapes */

/* Line 4: V-shape (1,2,3,2,1) */
.la-hero-slot--5x3 .la-hero-slot__win-line--4 {
    left: 50%;
    top: 50%;
    width: 300px;
    transform: translate(-50%, -50%);
    background: none;
    height: auto;
    border-radius: 0;
}

.la-hero-slot--5x3 .la-hero-slot__win-line--4::before,
.la-hero-slot--5x3 .la-hero-slot__win-line--4::after {
    display: none;
}

/* Line 5-9: Complex shapes - we'll handle these via JS-created SVG overlays */
/* For now, simple horizontal approximation, JS will create actual path */
.la-hero-slot--5x3 .la-hero-slot__win-line--4,
.la-hero-slot--5x3 .la-hero-slot__win-line--5,
.la-hero-slot--5x3 .la-hero-slot__win-line--6,
.la-hero-slot--5x3 .la-hero-slot__win-line--7,
.la-hero-slot--5x3 .la-hero-slot__win-line--8,
.la-hero-slot--5x3 .la-hero-slot__win-line--9 {
    display: none; /* Will be replaced by SVG */
}

/* SVG win lines container */
.la-hero-slot--5x3 .la-hero-slot__win-lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.la-hero-slot--5x3 .la-hero-slot__win-lines-svg path {
    fill: none;
    stroke: var(--slot-gold);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    filter: drop-shadow(0 0 4px var(--slot-gold));
}

.la-hero-slot--5x3 .la-hero-slot__win-lines-svg path.active {
    opacity: 1;
    animation: winLinePulse5x3 0.4s ease-in-out infinite alternate;
}

@keyframes winLinePulse5x3 {
    0% {
        stroke-width: 3;
        filter: drop-shadow(0 0 4px var(--slot-gold));
    }
    100% {
        stroke-width: 4;
        filter: drop-shadow(0 0 10px var(--slot-gold)) drop-shadow(0 0 20px rgba(251, 191, 36, 0.6));
    }
}

/* Controls */
.la-hero-slot--5x3 .la-hero-slot__controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Spin button - project colors */
.la-hero-slot--5x3 .la-hero-slot__spin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 0 #059669,
        0 6px 20px rgba(16, 185, 129, 0.4);
    /* Prevent double-tap zoom on mobile */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.la-hero-slot--5x3 .la-hero-slot__spin-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow:
        0 6px 0 #047857,
        0 8px 25px rgba(16, 185, 129, 0.5);
}

.la-hero-slot--5x3 .la-hero-slot__spin-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #059669,
        0 4px 15px rgba(16, 185, 129, 0.3);
}

.la-hero-slot--5x3 .la-hero-slot__spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.la-hero-slot--5x3 .la-hero-slot__spin-btn.spinning {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    box-shadow:
        0 4px 0 #dc2626,
        0 6px 20px rgba(239, 68, 68, 0.4);
}

.la-hero-slot--5x3 .la-hero-slot__spin-btn.spinning .la-hero-slot__spin-icon {
    animation: spinIconRotate5x3 0.6s linear infinite;
}

@keyframes spinIconRotate5x3 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.la-hero-slot--5x3 .la-hero-slot__spin-icon {
    width: 18px;
    height: 18px;
}

/* Decorative sparkles */
.la-hero-slot--5x3 .la-hero-slot__sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.la-hero-slot--5x3 .la-hero-slot__sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--slot-gold);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: sparkleTwinkle5x3 2s ease-in-out infinite;
}

.la-hero-slot--5x3 .la-hero-slot__sparkle--1 { top: 8%; left: 3%; animation-delay: 0s; }
.la-hero-slot--5x3 .la-hero-slot__sparkle--2 { top: 12%; right: 5%; animation-delay: 0.4s; }
.la-hero-slot--5x3 .la-hero-slot__sparkle--3 { bottom: 18%; left: 8%; animation-delay: 0.8s; }
.la-hero-slot--5x3 .la-hero-slot__sparkle--4 { bottom: 12%; right: 3%; animation-delay: 1.2s; }
.la-hero-slot--5x3 .la-hero-slot__sparkle--5 { top: 40%; left: 2%; animation-delay: 0.3s; }
.la-hero-slot--5x3 .la-hero-slot__sparkle--6 { top: 45%; right: 2%; animation-delay: 0.9s; }

@keyframes sparkleTwinkle5x3 {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* =========================================================================
   WIN ANIMATION
   ========================================================================= */

/* Win overlay container */
.la-hero-slot--5x3 .la-hero-slot__win-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    overflow: hidden;
}

.la-hero-slot--5x3.has-win .la-hero-slot__win-overlay {
    opacity: 1;
}

/* Screen flash effect on win */
.la-hero-slot--5x3 .la-hero-slot__win-flash {
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(251, 191, 36, 0.6) 30%,
        rgba(251, 191, 36, 0.3) 50%,
        transparent 70%
    );
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

.la-hero-slot--5x3.has-win .la-hero-slot__win-flash {
    animation: screenFlash5x3 0.8s ease-out forwards;
}

.la-hero-slot--5x3.has-win.big-win .la-hero-slot__win-flash {
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 1) 0%,
        rgba(34, 197, 94, 0.7) 30%,
        rgba(34, 197, 94, 0.4) 50%,
        transparent 70%
    );
    animation: screenFlashBig5x3 1s ease-out forwards;
}

@keyframes screenFlash5x3 {
    0% { opacity: 0; transform: scale(0.5); }
    15% { opacity: 1; transform: scale(1.2); }
    30% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 0.4; }
    100% { opacity: 0; transform: scale(1.5); }
}

@keyframes screenFlashBig5x3 {
    0% { opacity: 0; transform: scale(0.3); }
    10% { opacity: 1; transform: scale(1.3); }
    20% { opacity: 0.9; transform: scale(1); }
    35% { opacity: 0.7; transform: scale(1.1); }
    50% { opacity: 0.5; }
    70% { opacity: 0.2; }
    100% { opacity: 0; transform: scale(1.8); }
}

/* WIN text */
.la-hero-slot--5x3 .la-hero-slot__win-text {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    text-shadow:
        0 0 10px var(--slot-gold),
        0 0 20px var(--slot-gold),
        0 0 40px var(--slot-gold),
        0 2px 0 #b8860b,
        0 4px 0 #8b6914;
    background: linear-gradient(180deg, #fff 0%, #fcd34d 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    transform: scale(0);
    animation: none;
}

.la-hero-slot--5x3.has-win .la-hero-slot__win-text {
    animation: winTextPop5x3 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards,
               winTextPulse5x3 1s ease-in-out 0.6s infinite;
}

/* BIG WIN style */
.la-hero-slot--5x3.has-win.big-win .la-hero-slot__win-text {
    font-size: 1.6rem;
    background: linear-gradient(180deg, #fff 0%, #22c55e 50%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow:
        0 0 10px #22c55e,
        0 0 20px #22c55e,
        0 0 40px #22c55e,
        0 2px 0 #15803d,
        0 4px 0 #166534;
}

@keyframes winTextPop5x3 {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(5deg); }
    70% { transform: scale(0.9) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes winTextPulse5x3 {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) brightness(1);
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 4px 15px rgba(251, 191, 36, 0.8)) brightness(1.1);
    }
}

/* Falling coins - scattered across the whole machine */
.la-hero-slot--5x3 .la-hero-slot__win-coins {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: visible;
    pointer-events: none;
}

.la-hero-slot--5x3 .la-hero-slot__win-coin {
    position: absolute;
    top: -20px;
    font-size: 1rem;
    opacity: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    /* GPU acceleration for iOS */
    will-change: transform, opacity;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.la-hero-slot--5x3.has-win .la-hero-slot__win-coin {
    animation: coinFall5x3 var(--coin-duration, 1.6s) ease-out forwards;
    animation-delay: var(--coin-delay, 0s);
}

/* Scatter 16 coins across the entire width */
.la-hero-slot--5x3 .la-hero-slot__win-coin--1  { left: 3%;  --coin-rotate: 540deg;  --coin-duration: 1.4s; --coin-delay: 0s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--2  { left: 95%; --coin-rotate: -480deg; --coin-duration: 1.7s; --coin-delay: 0.1s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--3  { left: 18%; --coin-rotate: 720deg;  --coin-duration: 1.5s; --coin-delay: 0.04s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--4  { left: 82%; --coin-rotate: -600deg; --coin-duration: 1.8s; --coin-delay: 0.15s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--5  { left: 35%; --coin-rotate: 450deg;  --coin-duration: 1.3s; --coin-delay: 0.07s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--6  { left: 65%; --coin-rotate: -540deg; --coin-duration: 1.6s; --coin-delay: 0.18s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--7  { left: 10%; --coin-rotate: 630deg;  --coin-duration: 1.9s; --coin-delay: 0.02s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--8  { left: 88%; --coin-rotate: -720deg; --coin-duration: 1.4s; --coin-delay: 0.12s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--9  { left: 28%; --coin-rotate: 480deg;  --coin-duration: 1.7s; --coin-delay: 0.08s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--10 { left: 50%; --coin-rotate: -450deg; --coin-duration: 1.5s; --coin-delay: 0.2s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--11 { left: 5%;  --coin-rotate: 810deg;  --coin-duration: 1.6s; --coin-delay: 0.05s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--12 { left: 72%; --coin-rotate: -630deg; --coin-duration: 1.8s; --coin-delay: 0.16s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--13 { left: 42%; --coin-rotate: 560deg;  --coin-duration: 1.5s; --coin-delay: 0.03s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--14 { left: 58%; --coin-rotate: -500deg; --coin-duration: 1.7s; --coin-delay: 0.13s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--15 { left: 22%; --coin-rotate: 680deg;  --coin-duration: 1.4s; --coin-delay: 0.09s; }
.la-hero-slot--5x3 .la-hero-slot__win-coin--16 { left: 78%; --coin-rotate: -580deg; --coin-duration: 1.6s; --coin-delay: 0.22s; }

@keyframes coinFall5x3 {
    0% {
        opacity: 1;
        -webkit-transform: translateY(0) rotate(0deg) scale(1);
        transform: translateY(0) rotate(0deg) scale(1);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        -webkit-transform: translateY(350px) rotate(var(--coin-rotate, 720deg)) scale(0.5);
        transform: translateY(350px) rotate(var(--coin-rotate, 720deg)) scale(0.5);
    }
}

/* BIG WIN - bigger coins */
.la-hero-slot--5x3.has-win.big-win .la-hero-slot__win-coin {
    font-size: 1.3rem;
    --coin-duration: 1.3s;
}

/* =========================================================================
   WIN STATE
   ========================================================================= */

/* Win state */
.la-hero-slot--5x3.has-win .la-hero-slot__machine {
    animation: slotMachineWin5x3 0.5s ease-in-out;
}

/* Intensify aura on win */
.la-hero-slot--5x3.has-win::before {
    background: radial-gradient(
        ellipse at center,
        rgba(251, 191, 36, 0.6) 0%,
        rgba(251, 191, 36, 0.4) 30%,
        rgba(124, 58, 237, 0.2) 60%,
        transparent 100%
    );
    animation: auraWinPulse5x3 0.5s ease-in-out infinite alternate;
}

.la-hero-slot--5x3.has-win::after {
    background: radial-gradient(
        ellipse at center,
        rgba(251, 191, 36, 0.3) 0%,
        rgba(34, 197, 94, 0.15) 50%,
        transparent 70%
    );
}

@keyframes auraWinPulse5x3 {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

@keyframes slotMachineWin5x3 {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.02); }
    75% { transform: scale(0.99); }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 768px) {
    .la-hero-slot--5x3 {
        --slot-symbol-size: 48px;
        --slot-gap: 3px;
        padding: 15px;
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    .la-hero-slot--5x3::before {
        width: 320px;
        height: 280px;
    }

    .la-hero-slot--5x3::after {
        width: 400px;
        height: 360px;
    }

    .la-hero-slot--5x3 .la-hero-slot__spin-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .la-hero-slot--5x3 .la-hero-slot__light {
        width: 6px;
        height: 6px;
    }

    .la-hero-slot--5x3 .la-hero-slot__lights {
        gap: 4px;
    }

    .la-hero-slot--5x3 .la-hero-slot__win-text {
        font-size: 1.5rem;
    }

    .la-hero-slot--5x3.has-win.big-win .la-hero-slot__win-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .la-hero-slot--5x3 {
        --slot-symbol-size: 52px;
        --slot-gap: 2px;
        width: 100%;
        padding: 10px 10px 30px;
    }

    .la-hero-slot--5x3::before {
        width: 260px;
        height: 230px;
        filter: blur(20px);
    }

    .la-hero-slot--5x3::after {
        width: 320px;
        height: 290px;
        filter: blur(35px);
    }

    .la-hero-slot--5x3 .la-hero-slot__machine {
        padding: 8px;
    }

    .la-hero-slot--5x3 .la-hero-slot__top-bar {
        padding: 5px 8px;
        margin: -8px -8px 8px -8px;
    }

    .la-hero-slot--5x3 .la-hero-slot__spin-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }

    .la-hero-slot--5x3 .la-hero-slot__spin-icon {
        width: 14px;
        height: 14px;
    }

    .la-hero-slot--5x3 .la-hero-slot__win-text {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .la-hero-slot--5x3.has-win.big-win .la-hero-slot__win-text {
        font-size: 1rem;
    }

    .la-hero-slot--5x3 .la-hero-slot__win-coin {
        font-size: 0.85rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .la-hero-slot--5x3 {
        --slot-symbol-size: 44px;
        --slot-gap: 2px;
        padding: 8px;
    }

    .la-hero-slot--5x3 .la-hero-slot__machine {
        padding: 6px;
    }

    .la-hero-slot--5x3 .la-hero-slot__top-bar {
        padding: 4px 6px;
        margin: -6px -6px 6px -6px;
    }

    .la-hero-slot--5x3 .la-hero-slot__reels-wrapper {
        padding: 4px;
    }

    .la-hero-slot--5x3 .la-hero-slot__spin-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .la-hero-slot--5x3 .la-hero-slot__light,
    .la-hero-slot--5x3 .la-hero-slot__sparkle,
    .la-hero-slot--5x3 .la-hero-slot__symbol.winning,
    .la-hero-slot--5x3 .la-hero-slot__symbol.winning::before,
    .la-hero-slot--5x3 .la-hero-slot__spin-btn.spinning .la-hero-slot__spin-icon,
    .la-hero-slot--5x3::before,
    .la-hero-slot--5x3::after,
    .la-hero-slot--5x3.has-win::before,
    .la-hero-slot--5x3.has-win .la-hero-slot__win-text,
    .la-hero-slot--5x3.has-win .la-hero-slot__win-coin,
    .la-hero-slot--5x3.has-win .la-hero-slot__win-flash,
    .la-hero-slot--5x3 .la-hero-slot__win-lines-svg path.active {
        animation: none;
    }

    .la-hero-slot--5x3.has-win .la-hero-slot__win-text {
        transform: scale(1);
        opacity: 1;
    }

    .la-hero-slot--5x3 .la-hero-slot__win-lines-svg path.active {
        opacity: 1;
    }

    .la-hero-slot--5x3 .la-hero-slot__reel-strip {
        transition: none;
    }
}

/* =========================================================================
   LUCKY WINNER MODAL
   ========================================================================= */

.la-lucky-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.la-lucky-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.la-lucky-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

/* Content */
.la-lucky-modal__content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, #1e1b4b 0%, #0f0a2e 100%);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    box-shadow:
        0 0 0 3px var(--slot-gold, #fbbf24),
        0 0 60px rgba(251, 191, 36, 0.4),
        0 0 120px rgba(124, 58, 237, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.la-lucky-modal.is-active .la-lucky-modal__content {
    transform: scale(1) translateY(0);
}

/* Close button */
.la-lucky-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.la-lucky-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: rotate(90deg);
}

/* Confetti */
.la-lucky-modal__confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.la-lucky-modal__confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
}

.la-lucky-modal.is-active .la-lucky-modal__confetti-piece {
    animation: confettiFall 2.5s ease-out forwards;
}

/* Confetti positions and colors */
.la-lucky-modal__confetti-piece--1  { left: 5%;  background: #fbbf24; animation-delay: 0s; }
.la-lucky-modal__confetti-piece--2  { left: 15%; background: #7c3aed; animation-delay: 0.1s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--3  { left: 25%; background: #22c55e; animation-delay: 0.05s; }
.la-lucky-modal__confetti-piece--4  { left: 35%; background: #ef4444; animation-delay: 0.15s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--5  { left: 45%; background: #3b82f6; animation-delay: 0.08s; }
.la-lucky-modal__confetti-piece--6  { left: 55%; background: #fbbf24; animation-delay: 0.2s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--7  { left: 65%; background: #ec4899; animation-delay: 0.03s; }
.la-lucky-modal__confetti-piece--8  { left: 75%; background: #7c3aed; animation-delay: 0.12s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--9  { left: 85%; background: #22c55e; animation-delay: 0.07s; }
.la-lucky-modal__confetti-piece--10 { left: 95%; background: #fbbf24; animation-delay: 0.18s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--11 { left: 10%; background: #3b82f6; animation-delay: 0.25s; }
.la-lucky-modal__confetti-piece--12 { left: 20%; background: #ef4444; animation-delay: 0.3s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--13 { left: 30%; background: #ec4899; animation-delay: 0.22s; }
.la-lucky-modal__confetti-piece--14 { left: 40%; background: #7c3aed; animation-delay: 0.28s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--15 { left: 60%; background: #22c55e; animation-delay: 0.35s; }
.la-lucky-modal__confetti-piece--16 { left: 70%; background: #fbbf24; animation-delay: 0.4s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--17 { left: 80%; background: #3b82f6; animation-delay: 0.32s; }
.la-lucky-modal__confetti-piece--18 { left: 90%; background: #ef4444; animation-delay: 0.38s; border-radius: 50%; }
.la-lucky-modal__confetti-piece--19 { left: 50%; background: #ec4899; animation-delay: 0.42s; }
.la-lucky-modal__confetti-piece--20 { left: 0%;  background: #fbbf24; animation-delay: 0.45s; border-radius: 50%; }

@keyframes confettiFall {
    0% {
        top: -20px;
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    100% {
        top: 110%;
        opacity: 0;
        transform: rotate(720deg) scale(0.5);
    }
}

/* Trophy */
.la-lucky-modal__trophy {
    margin-bottom: 16px;
}

.la-lucky-modal__trophy-icon {
    font-size: 4rem;
    display: block;
    animation: trophyBounce 0.6s ease-out;
    filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.5));
}

@keyframes trophyBounce {
    0% { transform: scale(0) rotate(-20deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    70% { transform: scale(0.9) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Title */
.la-lucky-modal__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
    background: linear-gradient(180deg, #fff 0%, #fcd34d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.la-lucky-modal__subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* Casino card */
.la-lucky-modal__casino {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(99, 102, 241, 0.2) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.la-lucky-modal__casino-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.la-lucky-modal__casino-badge span:first-child {
    font-size: 0.8rem;
}

.la-lucky-modal__casino-logo {
    max-width: 140px;
    max-height: 60px;
    margin: 12px auto 16px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.la-lucky-modal__casino-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 12px 0 16px;
}

.la-lucky-modal__casino-bonus {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

.la-lucky-modal__casino-bonus-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.la-lucky-modal__casino-bonus-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.la-lucky-modal__casino-spins {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

.la-lucky-modal__casino-spins-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fbbf24;
}

.la-lucky-modal__casino-spins-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.la-lucky-modal__casino-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.la-lucky-modal__star {
    color: rgba(255, 255, 255, 0.3);
}

.la-lucky-modal__star.filled {
    color: #fbbf24;
}

.la-lucky-modal__casino-rating span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 8px;
    font-weight: 600;
}

/* Actions */
.la-lucky-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.la-lucky-modal__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 4px 15px rgba(34, 197, 94, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.la-lucky-modal__cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(34, 197, 94, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.la-lucky-modal__review {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.la-lucky-modal__review:hover {
    color: #fff;
    text-decoration: underline;
}

/* Disclaimer */
.la-lucky-modal__disclaimer {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .la-lucky-modal__content {
        padding: 24px 16px;
        border-radius: 20px;
    }

    .la-lucky-modal__trophy-icon {
        font-size: 3rem;
    }

    .la-lucky-modal__title {
        font-size: 1.4rem;
    }

    .la-lucky-modal__subtitle {
        font-size: 0.9rem;
    }

    .la-lucky-modal__casino-bonus-value {
        font-size: 1.25rem;
    }

    .la-lucky-modal__cta {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}
