/* ==============================================
   Tango Styles (6x6 Logic Puzzle)
============================================== */

.tango-wrapper { 
    width: 100%; 
    max-width: 420px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 10px;
    box-sizing: border-box;
}

.tango-board-container { 
    position: relative; 
    background: #30363d; 
    padding: 6px; 
    border-radius: 12px; 
    /* Maintain squareness relative to viewport */
    width: 92vw;
    height: 92vw;
    max-width: 400px;
    max-height: 400px;
    margin: 10px auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.tango-grid { 
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    grid-template-rows: repeat(6, 1fr); 
    gap: 4px; 
    width: 100%; 
    height: 100%; 
    box-sizing: border-box;
}

.t-cell { 
    background: #161b22; 
    border-radius: 6px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    /* Strict font-size to keep icons contained within 6x6 cells */
    font-size: clamp(1rem, 6vw, 2rem); 
    cursor: pointer; 
    transition: transform 0.1s, background 0.2s; 
    user-select: none;
    position: relative;
    overflow: hidden; 
    line-height: 1;
    box-sizing: border-box;
}

/* Ensure inner symbols are centered and never exceed cell bounds */
.t-cell span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
}

.t-cell:active { 
    transform: scale(0.95); 
}

/* Renamed to t-fixed to avoid collision with Tailwind's .fixed utility */
.t-cell.t-fixed { 
    background: #0d1117; 
    cursor: default; 
    filter: brightness(0.9); 
}

.t-cell.error { 
    box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.7); 
    background: #2a1a1a; 
}

.t-cell:not(.t-fixed):hover { 
    background: #1f242c; 
}

/* Constraints Overlay */
.t-overlay { 
    position: absolute; 
    inset: 0; 
    pointer-events: none; 
    z-index: 10; 
}

.t-marker { 
    position: absolute; 
    width: 18px; 
    height: 18px; 
    background: #30363d; 
    border: 1px solid #444;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 11px; 
    font-weight: bold; 
    font-family: Arial, sans-serif;
    transform: translate(-50%, -50%); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 15;
}

.t-marker.eq { 
    color: #58a6ff; 
}

.t-marker.diff { 
    color: #f85149; 
}

/* UI Consistency */
.pixel-btn {
    background: #000;
    border: 2px solid #004400;
    color: #00ff00;
    padding: 8px 16px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pixel-btn:hover { background: #004400; color: #fff; }
.pixel-btn.primary { border-color: #00ff00; }

.q-modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; z-index: 2000; 
}

.q-modal-content { 
    background: #0d1117; border: 3px solid #00ffff; padding: 2.5rem; 
    text-align: center; border-radius: 12px; max-width: 440px; width: 90%; 
}

.hidden { display: none !important; }