@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&display=swap');

:root {
    --primary-red: #d7371b;
    --primary-accent: #ff5e45;
    --primary-dark: #8a1f10;
    --neon-gold: #ffd700;
    --bg-dark: #050510;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(215, 55, 27, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: white;
}

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.container {
    text-align: center;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    margin: 0 auto;
}

.logo-container {
    margin-bottom: 40px;
    position: relative;
}

.logo-img {
    max-width: 175px;
    filter: drop-shadow(0 0 20px rgba(215, 55, 27, 0.5));
    animation: float 6s ease-in-out infinite;
}

#mainTitle {
    font-size: 1.6rem;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .logo-img {
        max-width: 140px;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }
}

.btn-random {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-accent));
    color: white;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(215, 55, 27, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.btn-random::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.btn-random:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 0 30px rgba(255, 94, 69, 0.6),
        0 0 60px rgba(215, 55, 27, 0.4);
}

.btn-random:hover::before {
    left: 100%;
}

.btn-random:active {
    transform: translateY(2px) scale(0.98);
}

.game-card-container {
    margin-top: 30px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.provider-column {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    border-radius: 20px;
    padding: 15px;
}

.provider-nav-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto 20px;
    width: 100%;
    max-width: 650px;
    gap: 10px;
}

.provider-titles-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    position: relative;
    height: 60px;
    width: 100%;
    max-width: 400px;
    perspective: 500px;
}

.nav-arrow {
    background: transparent;
    border: none;
    color: var(--primary-accent);
    cursor: pointer;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-arrow svg {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 0 10px rgba(215, 55, 27, 0.5));
}

.nav-arrow:hover {
    transform: scale(1.15);
    color: var(--primary-red);
}

.title-item {
    position: absolute;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(215, 55, 27, 0.2);
}

.title-item.active {
    font-size: 2rem;
    color: var(--primary-accent);
    transform: translateX(0) scale(1);
    z-index: 10;
    opacity: 1;
    text-shadow: 0 0 15px rgba(215, 55, 27, 0.6);
}

.title-item.left {
    font-size: 1.2rem;
    color: #cccccc;
    transform: translate(-90px, 35px) scale(0.75);
    z-index: 1;
    opacity: 1;
}

.title-item.right {
    font-size: 1.2rem;
    color: #cccccc;
    transform: translate(90px, 35px) scale(0.75);
    z-index: 1;
    opacity: 1;
}

.carousel-container {
    position: relative;
    height: 470px;
    width: 100%;
    display: flex;
    justify-content: center;
    perspective: 800px;
    overflow: visible;
}

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

.game-card {
    position: absolute;
    width: 312px;
    min-height: 403px;
    top: 15px;
    left: 50%;
    transform-origin: center bottom;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.game-card.card-active {
    transform: translateX(-50%) translateZ(0) scale(1);
    z-index: 10;
    opacity: 1;
    box-shadow: 0 0 20px rgba(215, 55, 27, 0.3);
    border-color: var(--primary-accent);
}

.game-card.card-left {
    transform: translateX(-100%) translateZ(-80px) scale(0.8) rotateY(15deg);
    z-index: 5;
    opacity: 0.6;
    filter: brightness(0.7);
}

.game-card.card-right {
    transform: translateX(0%) translateZ(-80px) scale(0.8) rotateY(-15deg);
    z-index: 5;
    opacity: 0.6;
    filter: brightness(0.7);
}

.game-card.card-left:hover,
.game-card.card-right:hover {
    opacity: 0.9;
    filter: brightness(0.9);
    transform: translateX(-100%) translateZ(-40px) scale(0.85) rotateY(10deg);
}

.game-card.card-right:hover {
    transform: translateX(0%) translateZ(-40px) scale(0.85) rotateY(-10deg);
}

.game-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .game-image {
    transform: scale(1.1);
}

.game-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(to right, #fff, var(--neon-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.rtp-badge {
    background: linear-gradient(45deg, var(--primary-red), var(--neon-gold));
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.rtp-badge.hidden {
    display: none;
}

.game-card.card-active.winning {
    animation: jackpotPulse 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 40px var(--neon-gold), 0 0 10px white;
    z-index: 20;
    border-color: var(--neon-gold);
}

.game-card.card-active.winning .game-title {
    color: var(--neon-gold);
    text-shadow: 0 0 10px var(--neon-gold);
}

.game-card.spinning .game-image {
    filter: blur(2px) brightness(1.2);
    transform: scale(0.95);
    transition: none;
}

@keyframes jackpotPulse {
    0% {
        transform: translateX(-50%) scale(1);
    }

    40% {
        transform: translateX(-50%) scale(1.15);
        filter: brightness(1.3);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .game-card-container {
        flex-direction: column;
        align-items: center;
    }

    .provider-column {
        width: 100%;
        max-width: 400px;
        margin-bottom: 40px;
    }

    .carousel-container {
        height: 340px;
    }

    .btn-random {
        width: 80%;
        padding: 12px 24px;
        font-size: 1rem;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body.modal-open .modal-overlay {
    opacity: 1;
    pointer-events: all;
}

body.modal-open .carousel-container {
    perspective: none;
    z-index: 50;
}

body.modal-open .game-card:not(.super-win) {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
}

.game-card.card-active.super-win {
    animation: superWinPopup 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    box-shadow: 0 0 50px var(--neon-gold), 0 0 20px white;
    border-color: var(--neon-gold);
    position: fixed;
    z-index: 50;
    top: 10%;
    left: 50%;
    transform: translateX(-50%) !important;
}

@keyframes superWinPopup {
    0% {
        transform: translateX(-50%) translateY(50px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateX(-50%) translateY(0) scale(1.1);
        opacity: 1;
        filter: brightness(1);
    }
}

.card-mini-logo {
    display: none;
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 80px;
    z-index: 60;
    filter: drop-shadow(0 0 10px rgba(215, 55, 27, 0.5));
    margin-bottom: 15px;
}

.card-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    background: var(--primary-red);
    color: white;
    border: 2px solid var(--neon-gold);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 60;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.card-close-btn:hover {
    background: var(--primary-accent);
    transform: scale(1.1);
}

.game-card.card-active.super-win .card-mini-logo {
    display: block;
}

.game-card.card-active.super-win .card-close-btn {
    opacity: 1;
    visibility: visible;
}

.notifications-container {
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    transition: all 0.5s ease;
}

.game-card.card-active.super-win .notifications-container {
    height: 75px;
    opacity: 1;
    margin-top: 8px;
}

.card-play-btn {
    height: 0;
    opacity: 0;
    overflow: hidden;
    width: 90%;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-top: 0;
}

.game-card.card-active.super-win .card-play-btn {
    height: 35px;
    opacity: 1;
    margin-top: 5px;
    margin-bottom: 5px;
}

.scrolling-winners-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: scrollInfinite 6s linear infinite;
}

.fake-notification {
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    padding: 0 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    height: 25px;
}

.fake-notification .name {
    color: #ddd;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.fake-notification .amount {
    color: var(--neon-gold);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes scrollInfinite {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-125px);
    }
}