.table-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    padding: 10px;
    overflow-x: auto;
    margin-left: 0px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

table {
    border-collapse: collapse;
    width: auto !important;
    border: 3px solid #5a3e1b !important;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.6);
    font-size: 12px; /* Smaller text */
    width: max-content !important;
    overflow-x: visible !important;
}

th, td {
    border: 2px solid #8b5e3c !important;
    padding: 1px 3px 1px 3px !important;
    text-align: center;
    max-width: 15px !important;
    max-height: 10px !important;
    font-size: 11px;
    color: #3b2900;
    font-weight: bold;
}

th {
    background: linear-gradient(to bottom, #c6a36b, #9a7642);
    font-weight: bold;
    color: #f3e3b2 !important;
    text-shadow: 1px 1px 2px black !important;
    position: sticky !important;
    top: 0;
    z-index: 2;
}

.key-header {
    color: #f3e3b2 !important;
    font-weight: bold;
    background: linear-gradient(to right, #7a5835, #5a3e1b);
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    border-right: 2px solid #3b2900 !important;
}

td:hover {
    background: #d4b77a;
    color: #000;
    font-weight: bold;
    transition: 0.3s ease-in-out;
    box-shadow: inset 0 0 10px rgba(255, 255, 0, 0.8);
    cursor: pointer;
}

.zoom-container {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #3e2c18;
    border: 10px solid #8b5e3c;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border-image: url('https://www.toptal.com/designers/subtlepatterns/uploads/agedpaper.png') 30 stretch;
}

.zoom-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #3e2c18;
    border: 10px solid #8b5e3c;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border-image: url('https://www.toptal.com/designers/subtlepatterns/uploads/agedpaper.png') 30 stretch;
}

.zoomable-image {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
    transition: transform 0.5s ease, transform-origin 0.5s ease;
    border: 8px solid #704214;
    border-radius: 15px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.7);
}

.zoom-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
}

.zoom-reset {
    background: #8b5e3c;
    color: white;
    border: none;
    padding: 8px 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s ease;
}

.zoom-reset:hover {
    background: #704214;
}

#puzzle-code-input {
    color: black;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .table-container {
        max-width: 100%;
        overflow-x: auto;
    }

    table {
        font-size: 12px;
        box-shadow: none;
        width: max-content;
    }

    th, td {
        padding: 4px;
    }
}

@media (max-width: 480px) {
    .table-wrapper {
        margin-left: -15px;
    }

    .zoom-container {
        border: 2px solid #8b5e3c;
        padding: 0px;
    }

    .zoom-reset {
        font-size: 9px !important;
    }
}

.common-title {
    text-align: center !important;
    font-size: 2.5rem;
    font-weight: bold;
    color: #62401f !important;
    position: relative;
    margin-bottom: 30px;
}

.common-paragraph {
    font-size: 1.25rem;
    line-height: 2;
    text-align: justify;
    margin-bottom: 25px;
}

.common-paragraph ul {
    list-style: none;
}

.common-span {
    font-weight: bold;
    color: #62401f !important;
}
