@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{
    background-image: url('../img/bg-square.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

@media (orientation: portrait) {
    body {
        background-image: url('../img/bg-vertical.webp');
    }
}

@media (orientation: landscape) {
    body {
        background-image: url('../img/bg-horizontal.webp');
    }
}

.ad-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

.ad-section img {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    object-fit: contain;
}

.game-container {
    padding-top: 25px;
    padding-bottom: 5px;
}

.game-section {
    margin-top: 25px;
}

.noscript-message {
    margin: 10px auto;
    max-width: 700px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #fff;
    text-align: center;
    background-color: rgba(231, 76, 60, 0.95);
}

.language-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 0;
}

.language-link {
    min-width: 38px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.2;
    background-color: rgba(0, 0, 0, 0.35);
}

.language-link:hover,
.language-link.is-active {
    color: #fff;
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.reel-container {
    background-color: #2c3e50;
    border-radius: 10px;
    padding: 5px;
    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;
    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;
    position: absolute;
    top: 0;
    left: 0;
}

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

#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: 1.35em;
    font-weight: bold;
    margin-top: 8px;
    margin-bottom: 0;
}

.result-win {
    color: #ffd54f;
    text-shadow: 0 0 12px rgba(255, 213, 79, 0.9);
    animation: winPulse 0.6s ease-in-out 3;
}

@keyframes winPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

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

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

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

.slot-machine .row {
    margin: 0;
}

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

.available-images {
    background-color: #2c3e50;
    border-radius: 10px;
    padding: 8px;
}

.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: 3px;
}

.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: 2px;
    background-color: rgba(44, 62, 80, 0.9);
    border-radius: 4px;
    margin-top: 2px;
    font-size: 0.85rem;
    line-height: 1.1;
}

.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 {
    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;
}
