@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Khmer:wght@100..900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
*{
    font-family: "Noto Sans Khmer", sans-serif;
    font-optical-sizing: auto;
    font-weight:700;
}
body{
    /* image background and color overlay  */
    background-image: url('images/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}
.reel-container {
    background-color: #2c3e50;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    perspective: 1000px;
    transform-style: preserve-3d;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1; /* Force 1:1 aspect ratio */
    width: 100%;
}

.reel-img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    transition: transform 0.3s ease;
    backface-visibility: hidden;
    will-change: transform;
    object-fit: cover; /* Ensure image covers the container while maintaining aspect ratio */
    position: absolute;
    top: 0;
    left: 0;
}

.slot-machine {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

#spinButton {
    background-color: #e74c3c;
    border: none;
    transition: all 0.3s ease;
    will-change: transform;
}

#spinButton:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

#result {
    min-height: 2em;
    font-weight: bold;
}

.sliding {
    animation: slideDown 0.2s linear infinite;
    will-change: transform;
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* Optimize animations for performance */
.reel-container, .reel-img, #spinButton, .sliding {
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure the slot machine container maintains proper spacing */
.slot-machine .row {
    margin: 0;
}

.slot-machine .col-4 {
    padding: 10px;
}

/* Image Preview Styles */
.available-images {
    background-color: #2c3e50;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
}

.image-preview {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    margin-bottom: 8px;
}

.image-preview:hover {
    transform: scale(1.05);
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-title {
    text-align: center;
    font-weight: bold;
    color: #fff;
    padding: 5px;
    background-color: rgba(44, 62, 80, 0.9);
    border-radius: 4px;
    margin-top: 5px;
}

.image-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
}

/* Sound Control */
.sound-control {
    z-index: 1000;
}

.sound-control .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sound-control .btn:hover {
    transform: scale(1.1);
}

.sound-control .bi {
    font-size: 1.2rem;
} 