/* Slots Game Styles */
.slots-game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.slots-game-container h2 {
    text-align: center;
    color: white;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.spins-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.spins-remaining {
    text-align: center;
    font-size: 18px;
    color: white;
    background: rgba(0,0,0,0.4);
    padding: 10px 15px;
    border-radius: 25px;
    display: inline-block;
}

.spin-counter {
    color: white;
    font-size: 18px;
    background: rgba(0,0,0,0.4);
    padding: 10px 15px;
    border-radius: 25px;
    display: inline-block;
}

.spins-count, .current-spin, .total-spins {
    font-weight: bold;
    color: #f7c948;
}

/* More realistic slots machine styling */
.slots-machine {
    background: linear-gradient(to bottom, #2a2a2a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 2px 10px rgba(255,255,255,0.1);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 3px solid #841011;
    position: relative;
    overflow: hidden;
}

/* Casino bulbs around the machine */
.slots-machine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 6px solid #222;
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
}

/* Generate the light bulbs around the border */
.slots-machine::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background-image: 
        radial-gradient(circle at 0% 0%, transparent 7px, #222 8px, #222 9px, transparent 10px),
        radial-gradient(circle at 100% 0%, transparent 7px, #222 8px, #222 9px, transparent 10px),
        radial-gradient(circle at 100% 100%, transparent 7px, #222 8px, #222 9px, transparent 10px),
        radial-gradient(circle at 0% 100%, transparent 7px, #222 8px, #222 9px, transparent 10px);
    background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px;
    background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

/* Add bulbs along the edges */
.slots-machine .casino-bulbs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

/* Top bulbs - flowing right */
.slots-machine .casino-bulbs::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 20px;
    right: 20px;
    height: 10px;
    background-image: radial-gradient(circle at center, var(--bulb-color, gold) 0%, var(--bulb-color, gold) 3px, #222 4px, #222 5px, transparent 6px);
    background-size: 20px 20px;
    background-position: center;
    background-repeat: repeat-x;
    animation: flow-lights-right 3s infinite linear;
}

/* Bottom bulbs - flowing left */
.slots-machine .casino-bulbs::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20px;
    right: 20px;
    height: 10px;
    background-image: radial-gradient(circle at center, var(--bulb-color, gold) 0%, var(--bulb-color, gold) 3px, #222 4px, #222 5px, transparent 6px);
    background-size: 20px 20px;
    background-position: center;
    background-repeat: repeat-x;
    animation: flow-lights-left 3s infinite linear;
}

/* Left bulbs - flowing down */
.slots-machine .side-bulbs-left {
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 5px;
    width: 10px;
    background-image: radial-gradient(circle at center, var(--bulb-color, gold) 0%, var(--bulb-color, gold) 3px, #222 4px, #222 5px, transparent 6px);
    background-size: 20px 20px;
    background-position: center;
    background-repeat: repeat-y;
    animation: flow-lights-down 3s infinite linear;
    z-index: 2;
    pointer-events: none;
}

/* Right bulbs - flowing up */
.slots-machine .side-bulbs-right {
    position: absolute;
    top: 20px;
    bottom: 20px;
    right: 5px;
    width: 10px;
    background-image: radial-gradient(circle at center, var(--bulb-color, gold) 0%, var(--bulb-color, gold) 3px, #222 4px, #222 5px, transparent 6px);
    background-size: 20px 20px;
    background-position: center;
    background-repeat: repeat-y;
    animation: flow-lights-up 3s infinite linear;
    z-index: 2;
    pointer-events: none;
}

/* Flow animations to make the lights move in a clockwise pattern */
@keyframes flow-lights-right {
    0% {
        background-position: 0 center;
        --bulb-color: rgb(255, 215, 0);
    }
    25% {
        --bulb-color: rgb(255, 0, 0);
    }
    50% {
        --bulb-color: rgb(0, 255, 255);
        background-position: 20px center;
    }
    75% {
        --bulb-color: rgb(255, 0, 255);
    }
    100% {
        background-position: 40px center;
        --bulb-color: rgb(255, 215, 0);
    }
}

@keyframes flow-lights-left {
    0% {
        background-position: 0 center;
        --bulb-color: rgb(255, 215, 0);
    }
    25% {
        --bulb-color: rgb(255, 0, 0);
    }
    50% {
        --bulb-color: rgb(0, 255, 255);
        background-position: -20px center;
    }
    75% {
        --bulb-color: rgb(255, 0, 255);
    }
    100% {
        background-position: -40px center;
        --bulb-color: rgb(255, 215, 0);
    }
}

@keyframes flow-lights-down {
    0% {
        background-position: center 0;
        --bulb-color: rgb(255, 215, 0);
    }
    25% {
        --bulb-color: rgb(255, 0, 0);
    }
    50% {
        --bulb-color: rgb(0, 255, 255);
        background-position: center 20px;
    }
    75% {
        --bulb-color: rgb(255, 0, 255);
    }
    100% {
        background-position: center 40px;
        --bulb-color: rgb(255, 215, 0);
    }
}

@keyframes flow-lights-up {
    0% {
        background-position: center 0;
        --bulb-color: rgb(255, 215, 0);
    }
    25% {
        --bulb-color: rgb(255, 0, 0);
    }
    50% {
        --bulb-color: rgb(0, 255, 255);
        background-position: center -20px;
    }
    75% {
        --bulb-color: rgb(255, 0, 255);
    }
    100% {
        background-position: center -40px;
        --bulb-color: rgb(255, 215, 0);
    }
}

/* Bulb colors animation */
:root {
    --bulb-color-1: red;
    --bulb-color-2: gold;
    --bulb-color-3: cyan;
    --bulb-color-4: magenta;
    --bulb-color-5: yellow;
}

/* Update the old animation that's not needed anymore */
@keyframes flash-bulbs {
    0% {
        --bulb-color: rgb(255, 215, 0);
        opacity: 0.4;
    }
    25% {
        --bulb-color: rgb(255, 0, 0);
        opacity: 0.8;
    }
    50% {
        --bulb-color: rgb(0, 255, 255);
        opacity: 0.6;
    }
    75% {
        --bulb-color: rgb(255, 0, 255);
        opacity: 0.8;
    }
    100% {
        --bulb-color: rgb(255, 255, 255);
        opacity: 1;
    }
}

/* Slot rows styling */
.slots-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 25px;
    background: #111;
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    border: 4px solid #444;
}

.slot {
    width: 120px;
    height: 120px;
    border: 4px solid #841011;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    background: #fff;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, 0.05) 100%);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 3;
}

.slot::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.slot-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #666;
    transition: transform 0.3s;
    transform-origin: center left;
    backface-visibility: hidden;
    z-index: 2;
}

.slot-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

/* Add multiple symbols for spinning animation */
.slots-row.spinning .slot-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400%;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='50' y='50' font-family='Arial' font-size='40' text-anchor='middle' dominant-baseline='middle' fill='%23222'%3E🍒%3C/text%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='50' y='50' font-family='Arial' font-size='40' text-anchor='middle' dominant-baseline='middle' fill='%23222'%3E7%3C/text%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='50' y='50' font-family='Arial' font-size='40' text-anchor='middle' dominant-baseline='middle' fill='%23222'%3E💎%3C/text%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='50' y='50' font-family='Arial' font-size='40' text-anchor='middle' dominant-baseline='middle' fill='%23222'%3E🍋%3C/text%3E%3C/svg%3E");
    background-size: 100% 25%;
    background-repeat: repeat-y;
}

.slot.stopping .slot-content::before,
.slot.revealed .slot-content::before {
    display: none;
}

.slots-row.spinning .slot-symbol {
    opacity: 0;
}

.slot-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 90%;
}

.slot-symbol img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.slot-symbol.winner {
    color: #f7c948;
}

.slot-symbol i {
    font-size: 48px;
    color: red;
}

/* Enhanced spin button */
.spin-button {
    background: linear-gradient(to bottom, #981518 0%, #841011 50%, #6a0c0d 100%);
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3), inset 0 1px 3px rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Button highlight animation */
.highlight-button {
    animation: pulse-highlight 1s infinite alternate;
    box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.7);
    position: relative;
}

.highlight-button::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 60px;
    background: transparent;
    border: 2px solid gold;
    animation: pulse-border 1s infinite alternate;
    pointer-events: none;
}

@keyframes pulse-highlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.4);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 8px rgba(255, 215, 0, 0.8);
    }
}

@keyframes pulse-border {
    0% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

.spin-button:hover {
    background: linear-gradient(to bottom, #a81a1d 0%, #981518 50%, #841011 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 3px rgba(255,255,255,0.3);
}

.spin-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2), inset 0 1px 3px rgba(255,255,255,0.3);
}

.spin-button:disabled {
    background: #555;
    transform: none;
    cursor: not-allowed;
    box-shadow: none;
}

.spin-button.disabled {
    background: #555;
    cursor: default;
    transform: none;
}

.slots-row.spinning .slot-content {
    animation: none;
}

@keyframes spin-vertical {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-25%);
    }
}

/* Stopping animation */
.slot.stopping .slot-content::before {
    animation: spin-slow-down 0.5s ease-out forwards !important;
}

@keyframes spin-slow-down {
    0% {
        transform: translateY(0);
        animation-timing-function: linear;
    }
    50% {
        transform: translateY(-12.5%);
        animation-timing-function: ease-out;
    }
    75% {
        transform: translateY(-18.75%);
        animation-timing-function: ease-in-out;
    }
    90% {
        transform: translateY(-22.5%);
        animation-timing-function: ease-in-out;
    }
    100% {
        transform: translateY(-25%);
    }
}

/* Revealed state with bounce effect */
.slot.revealed .slot-cover {
    transform: rotateY(90deg);
}

.slot.revealed .slot-content {
    opacity: 1;
    transition: none;
    animation: none;
}

/* Winner flash effect */
.slots-machine.winner-flash {
    animation: winner-flash 1.2s;
    box-shadow: 0 0 30px rgba(247, 201, 72, 0.8);
}

@keyframes winner-flash {
    0% {
        box-shadow: 0 0 10px rgba(247, 201, 72, 0.3);
    }
    25% {
        box-shadow: 0 0 30px rgba(247, 201, 72, 0.8);
    }
    50% {
        box-shadow: 0 0 10px rgba(247, 201, 72, 0.3);
    }
    75% {
        box-shadow: 0 0 30px rgba(247, 201, 72, 0.8);
    }
    100% {
        box-shadow: 0 0 10px rgba(247, 201, 72, 0.3);
    }
}

/* Blurred slots during spinning */
.slots-row.spinning .slot-content::before {
    animation: spin-vertical 0.03s linear infinite;
    filter: blur(4px);
}

/* Previous spins history */
.previous-spins {
    margin-top: 30px;
    background: #333;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.previous-spins h3 {
    color: white;
    text-align: center;
    margin-bottom: 15px;
    font-size: 22px;
}

.spins-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.spin-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    background: #444;
    color: white;
    transition: all 0.3s;
}

.spin-history-item:hover {
    transform: translateX(5px);
}

.spin-history-item.winner {
    border-left: 5px solid #f7c948;
}

.spin-history-item.no-win {
    border-left: 5px solid #666;
}

.ticket-number {
    font-weight: bold;
    color: #ccc;
}

.result-text {
    font-weight: bold;
}

.spin-history-item.winner .result-text {
    color: #f7c948;
}

/* Enhanced result display */
.spin-result {
    min-height: 60px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.current-result {
    font-size: 24px;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 50px;
    display: inline-block;
    animation: resultPopIn 0.5s forwards;
    transform: scale(0);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.current-result.winner {
    background: linear-gradient(to bottom, #f7d565 0%, #f7c948 50%, #e5b835 100%);
    color: #000;
    border: 2px solid #e5b835;
}

.current-result.no-win {
    background: linear-gradient(to bottom, #777 0%, #666 50%, #555 100%);
    color: white;
    border: 2px solid #555;
}

@keyframes resultPopIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slots-game-container {
        padding: 15px;
    }
    
    .spins-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .slot {
        width: 100px;
        height: 100px;
    }
    
    .spin-button {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .previous-spins {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .slots-row {
        gap: 10px;
        padding: 15px;
    }
    
    .slot {
        width: 80px;
        height: 80px;
    }
    
    .slot-symbol i {
        font-size: 36px;
    }
    
    .current-result {
        font-size: 18px;
    }
} 