/* ====== MAZE GAME ====== */
.maze-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
}

.maze-grid {
    display: grid;
    gap: 1px;
    background: var(--border-subtle);
    padding: 1px;
    border-radius: 4px;
    width: 100%;
    max-width: fit-content;
    margin: 0 auto;
    touch-action: none;
    /* Prevent default touch behaviors to allow custom drag handling */
}

.maze-cell {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    user-select: none;
    transition: background 0.15s;
    touch-action: none;
    /* Prevent default touch behaviors */
    -webkit-touch-callout: none;
    /* Prevent iOS callout menu */
}

.maze-wall {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
}

.maze-path {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
}

.maze-path:hover {
    background: rgba(255, 255, 255, 0.08);
}

.maze-start {
    background: rgba(34, 197, 94, 0.7);
    color: #fff;
    font-weight: bold;
    border-radius: 2px;
}

.maze-end {
    background: rgba(239, 68, 68, 0.7);
    color: #fff;
    font-weight: bold;
    border-radius: 2px;
}

.maze-visited {
    background: rgba(6, 182, 212, 0.3);
    border: 1px solid var(--accent-cyan);
}

.maze-status {
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary);
    text-align: center;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .maze-container {
        padding: 0 8px;
    }

    .maze-cell {
        width: calc((100vw - 32px) / 9);
        max-width: 32px;
        height: calc((100vw - 32px) / 9);
        max-height: 32px;
        font-size: 14px;
        min-width: 24px;
        min-height: 24px;
    }
}