.puzzle-grid {
    list-style-type: none;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(var(--puzzle-width), 1fr);
    border: 1px solid black;
    width: 35%;
    margin: 0 auto;
    max-width: 100%;
}

.puzzle-title {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    max-width: 100%;
}

.puzzle-description {
    text-align: center;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
    max-width: 100%;
}

.puzzle-score {
    text-align: center;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
    max-width: 100%;
}

.puzzle-cell {
    border: 1px solid black;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-size: max(calc(25vw / var(--puzzle-width)), 4rem);
    line-height: 1;
    font-family: monospace;
}

@media (max-width: 1024px) {
    .puzzle-grid {
        width: 55%;
    }
    
    .puzzle-cell {
        font-size: max(calc(50vw / var(--puzzle-width)), 2rem);
    }
}
/* Mobile responsive sizing */
@media (max-width: 768px) {
    .puzzle-grid {
        width: 75%;
    }
    
    .puzzle-cell {
        font-size: max(calc(75vw / var(--puzzle-width)) * 0.75, 1.5rem);
    }
}

@media (max-width: 480px) {
    .puzzle-grid {
        width: 90%;
    }
    
    .puzzle-cell {
        font-size: max(calc(75vw / var(--puzzle-width)) * 0.75, 1.5rem);
    }
}

.puzzle-cell-correct {
    background-color: rgba(0, 255, 0, 0.2);
}

.puzzle-cell-incorrect {
    background-color: rgba(255, 0, 0, 0.2);
}

.puzzle-cell-hint {
    background-color: rgba(204, 0, 255, 0.2);
}

.puzzle-cell-selected {
    border: 4px solid rgba(204, 0, 255);
}
