* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 10px;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.loading-percentage {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Hide main content while loading */
body:not(.loaded) .live-wins,
body:not(.loaded) .container {
    opacity: 0;
    pointer-events: none;
}

/* Force portrait orientation - hide content in landscape */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    body {
        display: none !important;
    }
}

body {
    background: url('../images/background_.webp') no-repeat center center fixed;
    background-size: cover;
    color: white;
    margin: 0;
    padding: 0;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body::-webkit-scrollbar {
    display: none;
}

html {
    height: -webkit-fill-available;
}

/* Live Wins Section */
.live-wins {
    padding: 5px 15px 8px 15px;
    overflow: hidden;
    position: fixed;
    /* width: 100%; */
    /* left: -1%; */
    top: 0;
    z-index: 100;
    /* background: url('../images/windows_vin.webp') no-repeat center center; */
    background-size: cover;
    min-height: 80px;
    display: flex;
    align-items: flex-start;
    padding-top: 14px;
    contain: layout style;
}

.online-counter {
    display: none;
}

.win-items {
    display: flex;
    white-space: nowrap;
    width: max-content;
    will-change: transform;
    animation: scroll-infinite 120s linear infinite;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    
}

.win-item {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    flex-shrink: 0;
    min-width: 60px;
    height: 50px;
    /* GPU acceleration */
    transform: translateZ(0);
}

.win-item img {
    height: 40px;
    width: auto;
    /* max-width: 60px; */
    object-fit: contain;
    border-radius: 4px;
    display: block;
    transition: opacity 0.3s ease;
    backface-visibility: hidden; 
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);  
}

.win-item img:not([src]) {
    opacity: 0;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    justify-content: center;
    align-items: center;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.container::-webkit-scrollbar {
    display: none;
}

.content-wrapper {
    width: 100%;
    height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    margin-top: 100px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.content-wrapper::-webkit-scrollbar {
    display: none;
}

/* Cases Grid */
.cases {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* column-gap: 12px;
    row-gap: 30px; */
    justify-items: center;
    margin-top: 20px;
}

.case {
    background: url('../images/4.gif') no-repeat center center;
    background-size: 90% 90%;
    padding: 25px;
    /* border-radius: 20px; */
    text-align: center;
    /* transition: all 0.3s; */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 400px;
    width: 260px;
    margin: 0 auto;
}

.case:nth-child(2) {
    background-image: url('../images/3.gif');
}

.case:nth-child(3) {
    background-image: url('../images/2.gif');
}

.case:nth-child(4) {
    background-image: url('../images/1.gif');
}

.case::before {
    display: none;
}

.case-image {
    display: none;
}

.case h3, .case p {
    display: none;
}
 

/* Case Buttons */
.case-buttons {
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.open-button, .preview-button {
    width: 90%;
    height: 46px;
    cursor: pointer;
    font-size: 0;
    transition: all 0.3s;
    border-radius: 50px;
    padding: 0;
    position: relative;
    z-index: 10;
    border: none;
    margin: 0 auto;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.open-button {
    background: url('../images/open.webp') no-repeat center center;
    background-size: 100% 100%;
}

/* .open-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.5);
} */

.preview-button {
    background: url('../images/preview.webp') no-repeat center center;
    background-size: 100% 100%;
}

/* .preview-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.5);
} */

.possible-wins {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 10px;
}

/* Logo Section */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 20px;
}

.team-logo {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    /* opacity: 0.8; */
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.team-logo:hover {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(0, 255, 136, 0.3));
}

/* Animations */
@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.win-items.paused {
    animation-play-state: paused;
}

.win-items.stopped,
.win-items.updating {
    animation: none;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

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

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10px);
    }
}
