/* Modal Overlay */
.paytable-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0;
}

.paytable-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Paytable Container */
.paytable-container .paytable-content * {
    font-family: system-ui;
}
.paytable-container {
    overflow: hidden;
    border: none;
    border-top: solid 6px #373737;
    border-right: solid 6px #3a3a3a;
    width: 100%;
    height: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.paytable-overlay.active .paytable-container {
    transform: scale(1);
}

/* Header */
.paytable-header {
    padding: 10px;
    position: relative;
    background-image: linear-gradient(#0000004f, #0000004f), url(./../assets/blocks/block-stone.png);
    background-size: 100px 100px;
    image-rendering: pixelated;
    border-bottom: solid 1px;

}

.paytable-header h2 {
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: white;
    font-weight: 400;
    text-shadow: 2px 2px 0 black;
    margin: 5px;
    margin-right: 55px;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #707070;
    border: solid 4px;
    border-top-color: #aaaaaa;
    border-left-color: #aaaaaa;
    border-bottom-color: #565656;
    border-right-color: #565656;
    outline: solid 3px black;
    color: white;
    height: 40px;
    text-shadow: black 2px 2px 0;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
    background: #811818;
    border-top-color: #d27878;
    border-bottom-color: #600505;
    border-right-color: #600505;
    border-left-color: #d27878;
}

/* Content Area */
.paytable-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background-image: linear-gradient(#0000004f, #0000004f), url(./../assets/blocks/block-dirt-top.png);
    background-size: 100px 100px;
    image-rendering: pixelated;
}

/* Scrollbar Styling */
.paytable-content::-webkit-scrollbar {
    width: 5px;
}

.paytable-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 0;
}

.paytable-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.47);
    border-radius: 0;
}

/* Paytable Sections */
.payout-section {
    background: rgb(0 0 0 / 38%);
    border-radius: 0;
    padding: 20px 25px;
    margin-bottom: 25px;
    color: white;
    font-size: 1.2rem;
}

.paytable-container .row > div {
    width: 25%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 6px 4px;
    overflow-wrap: break-word;
}
.paytable-container .row:first-of-type {
    font-weight: bold;
    text-align: center;
}
.paytable-container .row {
    display: flex;
    justify-content: space-between;
}
.paytable-container #symbol-table .card-icon .payout
{
    width: 100%;
    overflow: hidden;
    font-size: 12px;
    text-align: center;
}
.paytable-container #symbol-table .card-icon .multiplier
{
    width: 100%;
    overflow: hidden;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}
.paytable-container #symbol-table .card-icon
{
    padding: 5px;
    border: solid 1px #00000052;
}
.paytable-container #symbol-table img
{
    width: 100%;
}
.paytable-container #symbol-table
{
    display: grid;
    grid-template-columns: repeat(13, calc(100%/13));
}
.payout-section h3 {
    font-size: 24px;
    margin-bottom: 25px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.payout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.payout-item:hover {
    background: rgba(255,215,0,0.1);
    transform: translateX(5px);
}

.payout-item .hand-name {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.payout-item .multiplier {
    color: #ffd700;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.special-note {
    background: linear-gradient(135deg, rgba(255,215,0,0.2) 0%, rgba(255,237,78,0.2) 100%);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    color: white;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .paytable-container {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
    }

    .paytable-header h2 {
        font-size: 24px;
    }

    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .paytable-content {
        padding: 20px;
    }

    .payout-section {
        padding: 20px;
    }

    .payout-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .payout-item .hand-name {
        font-size: 16px;
    }
    .paytable-header {
       border-radius: 0;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .paytable-container {
        border-radius: 0;
        margin: 20px;
    }


}

@media screen and (max-width: 600px) {

    .paytable-container #symbol-table {
        grid-template-columns: repeat(4, calc(100% / 4));
    }
    .paytable-list
    {
        font-size: 12px;
    }
}
@media screen and (max-width: 400px) {
    .paytable-list
    {
        font-size: 10px;
    }
    .paytable-container #symbol-table {
        grid-template-columns: repeat(2, calc(100% / 4));
    }
}