/* Word-Link Crossword — Custom Styles */
/* "Silent Authority" Japanese Minimalism Design System */

/* Material Symbols config */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* ─── Crossword Grid ─── */
.crossword-grid {
    display: grid;
    grid-template-columns: repeat(15, minmax(0, 1fr));
    gap: 1px;
    background-color: #2d3435;
    border: 2px solid #2d3435;
}

.grid-cell {
    aspect-ratio: 1 / 1;
    position: relative;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.1s ease;
    user-select: none;
}

.grid-cell.black {
    background-color: #2d3435;
    cursor: default;
}

.grid-cell.active {
    background-color: #ffe16d; /* primary-fixed: gold highlight */
}

.grid-cell.highlighted {
    background-color: #f2f4f4; /* surface-container-low */
}

.grid-cell.incorrect {
    background-color: #fe8b70; /* error-container */
    animation: shake 0.3s ease;
}

.grid-cell.correct {
    background-color: #d4f5d0;
    animation: pulse-success 0.5s ease;
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    color: #2d3435;
    pointer-events: none;
}

.cell-text {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(0.75rem, 2vw, 1.25rem);
    font-weight: 700;
    text-transform: uppercase;
    color: #2d3435;
    pointer-events: none;
}

/* ─── Clue list active state ─── */
.clue-item.active-clue {
    background-color: rgba(255, 225, 109, 0.2); /* primary-container/20 */
}

.clue-item.active-clue p {
    opacity: 1;
    font-weight: 700;
}

/* ─── Clue scrollbar (minimalist) ─── */
.clue-scroll::-webkit-scrollbar { width: 2px; }
.clue-scroll::-webkit-scrollbar-track { background: transparent; }
.clue-scroll::-webkit-scrollbar-thumb { background: #adb3b4; }

/* ─── Animations ─── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@keyframes pulse-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.crossword-grid {
    animation: fade-in 0.4s ease-out;
}

/* ─── Responsive adjustments ─── */
@media (max-width: 768px) {
    .crossword-grid {
        gap: 0.5px;
        border-width: 1px;
    }
    .cell-number {
        font-size: 7px;
        top: 1px;
        left: 1px;
    }
}