/* ==============================================
   Zip Styles (5x5 Path Logic Puzzle)
============================================== */

.zip-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    user-select: none;
    touch-action: none;
}

.zip-board-container {
    position: relative;
    margin: 20px auto;
    background-color: #0d1117;
    border: 4px solid #30363d;
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
    width: min(92vw, 450px);
    height: min(92vw, 450px);
    border-radius: 8px;
    overflow: hidden;
}

/* Layering: Grid and Numbers are ABOVE the SVG Line */
.zip-grid {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background: transparent;
}

.z-cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 8vw, 2.2rem);
    color: #c9d1d9;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    transition: background 0.2s, color 0.2s;
}

/* Block Style: Impassable areas */
.z-cell.block {
    background-color: #090c10;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.03) 5px, rgba(255,255,255,0.03) 10px);
    border: 1px solid rgba(0, 0, 0, 0.5);
    cursor: not-allowed;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.z-cell.number {
    color: #58a6ff;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.8);
    font-weight: bold;
}

.z-cell:not(.block):hover {
    background: rgba(255, 255, 255, 0.05);
}

/* SVG Line Overlay */
.zip-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.zip-line {
    fill: none;
    stroke: #f85149; 
    stroke-width: 12;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
    transition: stroke 0.3s ease;
}

.zip-line.solved {
    stroke: #3fb950;
    filter: drop-shadow(0 0 8px rgba(63, 185, 80, 0.6));
    opacity: 1;
}

.pixel-btn {
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 10px 20px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.pixel-btn.primary {
    border-color: #238636;
    color: #3fb950;
}

.pixel-btn:hover {
    background-color: #30363d;
    color: #fff;
}

.q-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.q-modal-content {
    background-color: #0d1117;
    border: 2px solid #3fb950;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border-radius: 12px;
}

.hidden { display: none !important; }