html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: transparent;
    font-family: var(--body-font-family);
}

a {
    text-decoration: none;
}

.button {
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: yellow;
    color: black;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

#game-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    border: 1px solid black;
    box-sizing: border-box;
    background-color: transparent;
    background-size: cover;
    background-position: center;
}

#game-container canvas {
    width: 100%;
    height: auto;
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    box-sizing: border-box;
}

.canvas-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* Make sure it doesn't block clicks */
    z-index: 2000;
    /* higher than canvas (default z-index: 0) */
}

#version,
#copyright {
    position: fixed;
    bottom: 2px;
    font-size: .7rem;
    color: rgb(255, 255, 255);
}

#version {
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#copyright,
#copyright a {
    right: 10px;
}

#copyright a {
    text-decoration: underline;
    color: var(--anchorColor);
}

#copyright a:hover {
    opacity: .8;
}

#time {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 1rem;
    color: rgb(255, 255, 255);
}


#menu {
    position: fixed;
    bottom: 5px;
    left: 10px;
    font-size: .75rem;
    color: rgb(255, 255, 255);
}



#context-lost-overlay {
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#openPaylinesModal {
    position: fixed;
    bottom: 70px;
    left: 10px;
    opacity: .5;
}

#sound {
    position: fixed;
    bottom: 25px;
    left: 10px;
    opacity: .5;
}

#sound img, #openPaylinesModal img {
width:2rem;
}




.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2c3e50, #1a2634);
    padding: 20px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #ffd700;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #fff;
}

.modal h2 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.modal h3 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 21px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.paylines-container {
    text-align: center;
    padding: 20px;
}

.paylines-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.bet-options {
    padding: 20px;
}

.bet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.bet-option {
    background: linear-gradient(135deg, #2c3e50, #1a2634);
    border: 2px solid #ffd700;
    color: #ffd700;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.bet-option:hover {
    background: #ffd700;
    color: #2c3e50;
    transform: scale(1.05);
}

.last-win-content {
    padding: 20px;
}

#lastWinsList {
    max-height: 400px;
    overflow-y: auto;
}

.win-entry {
    background: rgba(255, 215, 0, 0.1);
    margin: 10px 0;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.high-win-content,
.balance-content {
    padding: 20px;
    text-align: center;
    font-size: 18px;
    color: #ffd700;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffed4a;
}

.paylines-grid-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.payline-grid {
    border-collapse: collapse;
    margin: 10px;
}

.payline-grid td {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.3);
}

.payline-grid caption {
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 14px;
    text-align: center;
}

.active {
    background-color: #4CAF50;
}

.symbols-table-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.symbols-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.symbol-cell {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    width: 120px;
}

.symbol-cell div:first-child {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 14px;
}

.symbol-cell div:last-child {
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
}

#small-win-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Roboto', sans-serif;
    font-size: 44px;
    font-weight: bold;
    color: rgb(249, 253, 0);
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ff6600;
    pointer-events: none;
    opacity: 0;
    z-index: 999;
    transition: opacity 0.3s ease-in-out;
}

#small-win-indicator.animate {
    animation: popFade 2.8s ease-out forwards;
}

@keyframes popFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }

    40% {
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

#big-win-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    font-size: 64px;
    line-height: 1.2;
    color: gold;
    font-weight: bold;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
}

#big-win-indicator.animate {
    animation: bigWinPop 4s ease-out forwards;
}

@keyframes bigWinPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
        text-shadow: 0 0 0 transparent;
    }

    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }

    25% {
        transform: translate(-50%, -50%) scale(1);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
        text-shadow: 0 0 12px #ffc800, 0 0 24px #ffec8b;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

#loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
}

#loading-title {
    font-size: 24px;
    margin-bottom: 20px;
}

#loading-status {
    width: 300px;
    margin: 0 auto;
}

#loading-bar {
    background: #333;
    border-radius: 6px;
    height: 20px;
    overflow: hidden;
}

#loading-fill {
    background: lime;
    width: 0%;
    height: 100%;
    transition: width 0.3s ease;
}

#loading-text {
    margin-top: 5px;
    font-size: 14px;
}

.auto-spin-options {
    padding: 20px;
}

.auto-spin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.auto-spin-option {
    background: linear-gradient(135deg, #2c3e50, #1a2634);
    border: 2px solid #ffd700;
    color: #ffd700;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.auto-spin-option:hover {
    background: #ffd700;
    color: #2c3e50;
    transform: scale(1.05);
}