/* Alphabet Maze Puzzle Styles */

.alpha-grid {
    /* Inherits display:grid from .puzzle-grid */
    gap: 6px;
    /* Specific to Maze */
    /* Remove background if generic fits, but Maze might want specific background */
    padding: 15px;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.alpha-cell {
    /* Dimensions handled by .puzzle-cell & grid */
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 800;
    /* Use clamp for responsive font size based on viewport */
    font-size: clamp(14px, 4vw, 24px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    aspect-ratio: 1/1;
    /* Ensure square cells */
    display: flex;
    align-items: center;
    justify-content: center;
}

.alpha-cell:hover:not(.active) {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.alpha-cell.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.alpha-cell.wrong {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    animation: shake 0.4s ease-in-out;
}

.alpha-cell.neighbor-hint {
    border-style: dashed;
    opacity: 0.8;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .alpha-grid {
        padding: 4px;
        gap: 3px;
        /* Use 100% of parent width to avoid viewport overflow issues */
        width: 100% !important;
        max-width: 100% !important;
        aspect-ratio: 1/1;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .puzzle-grid-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0;
    }

    .alpha-cell {
        /* Remove fixed dimensions */
        font-size: 16px;
        border-radius: 6px;
    }
}

/* Target Display */
.target-display-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.target-label {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.target-char {
    font-size: 64px;
    font-weight: 800;
    color: var(--primary-color);
}

/* Pause Overlay */
.pause-overlay-custom {
    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);
}
