.wsp-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", sans-serif;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: 0 auto;
}
.wsp-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 700px;
}
.wsp-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}
#timer {
    font-size: 16px;
    background: #eee;
    padding: 6px 10px;
    border-radius: 6px;
    color: #333;
}
.wsp-grid-list-wrapper {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}
#puzzle {
    flex: 1;
}
#puzzle table {
    touch-action: none;
    max-width: 100%;
    border-spacing: 4px;
    border-collapse: separate;
    border-spacing: 6px;
    /* adjust the spacing between cells */
    margin: 0 auto;
    padding: 10px;
    border-color: 0px;
}
#puzzle td {
    border: none;
    margin: 0;
    /* margin is not used between table cells when border-spacing is set */
    background: linear-gradient(to bottom right, #e0f0ff, #cce5ff);
    border-radius: 12px;
    box-shadow: inset 0 0 3px #ccc, 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 48px;
    height: 48px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    color: #003366;
    user-select: none;
    transition: transform 0.1s ease, background 0.3s ease;
}
#puzzle td:hover {
    background: #ffe0e0;
    transform: scale(1.08);
}
#puzzle td.selected {
    background: linear-gradient(to bottom right, #fff4c2, #ffd966);
    color: #333;
    transform: scale(1.05);
    box-shadow: inset 0 0 5px #ccc, 0 0 5px rgba(255, 215, 0, 0.6);
}
#puzzle td.found {
    background: linear-gradient(to bottom right, #b6e7a0, #82d173);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 6px rgba(0, 128, 0, 0.5);
}
#words ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
#words li {
    padding: 6px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #444;
    background: #f0f0f0;
    border-radius: 6px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    text-transform: uppercase;
}
#words li.found {
    color: #999;
    background: #ccc;
    text-decoration: line-through;
}
@media (max-width: 600px) {
    .wsp-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .wsp-grid-list-wrapper {
        flex-direction: column;
        align-items: center;
    }
    #puzzle td {
        width: 36px;
        height: 36px;
        font-size: 14px;
        border-radius: 10px;
    }
    #words ul {
        display: flex;
        flex-flow: row wrap;
        gap: 10px;
    }
    #words li {
        background: #f0f0f0;
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        color: #444;
        white-space: nowrap;
    }
}