/* Compatibility Matrix Styles */

.matrix-container {
    width: 100%;
    overflow-x: auto;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.matrix-grid {
    display: grid;
    grid-template-columns: auto repeat(12, 1fr);
    gap: 2px;
    min-width: 800px;
    /* Ensure it doesn't get too squished on mobile */
}

.matrix-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    position: relative;
    transition: all 0.2s ease;
}

/* Headers */
.matrix-header-col {
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--accent-gold);
    padding: 0.5rem;
    text-align: center;
    position: sticky;
    top: 0;
    background: rgba(5, 7, 20, 0.9);
    z-index: 10;
    border-bottom: 1px solid var(--glass-border);
}

.matrix-header-row {
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--accent-gold);
    padding: 0.5rem;
    text-align: right;
    position: sticky;
    left: 0;
    background: rgba(5, 7, 20, 0.9);
    z-index: 10;
    border-right: 1px solid var(--glass-border);
}

.corner-cell {
    z-index: 20;
    /* Higher than row/col headers */
    background: rgba(5, 7, 20, 1);
}

/* Data Cells */
.data-cell {
    cursor: pointer;
    border-radius: 4px;
    height: 40px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.data-cell:hover {
    transform: scale(1.1);
    z-index: 5;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Heatmap Colors */
.match-high {
    background-color: rgba(74, 222, 128, 0.2);
    /* Green-ish */
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.match-medium {
    background-color: rgba(250, 204, 21, 0.2);
    /* Yellow-ish */
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.match-low {
    background-color: rgba(248, 113, 113, 0.2);
    /* Red-ish */
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
}

.filter-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Tooltip/Modal for Details */
.details-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--accent-gold);
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease;
    display: none;
    /* Hidden by default */
}

.details-panel.visible {
    display: block;
}

.details-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.details-score {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.details-desc {
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .matrix-grid {
        min-width: 600px;
    }

    .matrix-header-col,
    .matrix-header-row {
        font-size: 0.8rem;
        padding: 0.25rem;
    }

    .data-cell {
        font-size: 0.8rem;
        height: 30px;
    }
}