/* Word Search Puzzle Styles */

/* Grid Overlay adjustments for Word Search */
/* .wordsearch-grid uses common puzzle-grid + specific columns */
.wordsearch-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    /* Default 12x12 */
    gap: 2px;
    background: var(--bg-primary);
    border: 2px solid var(--text-primary);
    user-select: none;
    width: 100%;
    aspect-ratio: 1/1;
}

/* .wordsearch-cell extends puzzle-cell */
.wordsearch-cell {
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    font-size: clamp(14px, 2vw, 20px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    aspect-ratio: 1/1;
    transition: background 0.1s;
}

.wordsearch-cell.selected {
    background: var(--primary-color);
    color: #fff;
}

.wordsearch-cell.found {
    background: #4CAF50;
    /* Success green */
    color: white;
}

/* Word List Sidebar */
.ws-word-list {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    min-width: 200px;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
}

.ws-word-list h3 {
    margin: 0 0 15px 0;
    font-size: var(--font-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ws-word {
    padding: 6px 10px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: var(--font-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.ws-word:last-child {
    border-bottom: none;
}

.ws-word.found {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.6;
}

.ws-word.found::before {
    content: '✓';
    color: #4CAF50;
    font-weight: 900;
}

/* Pause Overlay */
.pause-overlay-cust {
    border: 2px solid var(--text-primary) !important;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
}

.pause-icon-circle {
    background: var(--primary-color);
    padding: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 10px;
}

.pause-text {
    font-weight: 500;
    color: var(--text-primary);
}

.game-info-bar {
    justify-content: space-between !important;
}

/* Responsive */
@media (max-width: 600px) {
    .wordsearch-grid {
        width: 100% !important;
        max-width: 100% !important;
        aspect-ratio: 1/1;
        gap: 1px;
    }

    .wordsearch-cell {
        font-size: clamp(10px, 3vw, 16px);
        /* Scale down for mobile if grid is dense */
    }

    .puzzle-grid-wrapper {
        width: 100%;
        display: block;
        padding-left: 2px;
        padding-right: 2px;
    }
}
