.app-container-wordsearch {
    max-width: 900px;
}

.wordsearch-layout {
    display: flex;
    gap: 30px;
    width: 100%;
    align-items: flex-start;
}

.grid-wrapper {
    flex-shrink: 0;
    margin: 0 auto;
    user-select: none;
    touch-action: none; /* prevent scrolling when swiping on grid */
}

.ws-grid {
    display: grid;
    gap: 2px;
    background: #4a4a4a;
    padding: 4px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.ws-cell {
    width: 35px;
    height: 35px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-color);
    text-transform: uppercase;
    cursor: crosshair;
    transition: background-color 0.1s;
    border-radius: 4px;
}

.ws-cell.highlight {
    background: var(--accent-blue);
    color: white;
}

.ws-cell.found {
    background: var(--success-green);
    color: white;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.ws-words {
    flex-grow: 1;
    background: rgba(255,255,255,0.7);
    padding: 20px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-light);
    min-height: 200px;
}

.ws-words h3 {
    margin: 0 0 15px 0;
    color: var(--accent-blue);
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    font-size: 1.1rem;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
    padding-bottom: 5px;
}

.ws-word-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.ws-word-list li {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.ws-word-list li .cz {
    font-size: 0.8rem;
    color: #888;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
}

.ws-word-list li.found-word {
    text-decoration: line-through;
    opacity: 0.4;
    color: var(--success-green);
}

@media (max-width: 800px) {
    .wordsearch-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .ws-cell {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    .ws-words {
        width: 100%;
        box-sizing: border-box;
    }
    
    .ws-word-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
