/* Explorer specific styles */

.explorer-header {
    text-align: center;
    margin-bottom: 2rem;
}

.explorer-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Mode Filter */
.mode-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-filter label {
    color: var(--accent-gold);
    font-weight: bold;
}

/* Results Table */
.results-table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 80vh;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table thead {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--accent-red);
}

.results-table thead tr {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-tertiary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.results-table th {
    padding: 1rem 0.5rem;
    text-align: center;
    color: var(--accent-gold);
    font-weight: bold;
    border-right: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.results-table th:first-child {
    text-align: left;
    padding-left: 1rem;
    min-width: 300px;
    max-width: 400px;
}

.results-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.results-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.results-table td {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.results-table td:first-child {
    text-align: left;
    padding-left: 1rem;
    color: var(--text-primary);
}

.question-id {
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
}

.question-text-cell {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Trial Boxes */
.trials-container {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.trial-box {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trial-box.correct {
    background: var(--success);
}

.trial-box.incorrect {
    background: var(--error);
}

.trial-box:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px currentColor;
}

/* Legend */
.legend {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-close {
    color: var(--text-secondary);
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--accent-red);
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-red);
}

.modal-model {
    color: var(--accent-gold);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.modal-question {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.modal-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    color: var(--accent-gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.modal-expected {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid var(--success);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.modal-response {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 4px;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-response.correct {
    border-left: 4px solid var(--success);
}

.modal-response.incorrect {
    border-left: 4px solid var(--error);
}

.modal-reasoning {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 4px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.6;
}

.modal-result {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 0.5rem;
}

.modal-result.correct {
    background: var(--success);
    color: var(--text-primary);
}

.modal-result.incorrect {
    background: var(--error);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .results-table {
        font-size: 0.8rem;
    }

    .results-table th:first-child {
        min-width: 200px;
    }

    .trial-box {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 768px) {
    .results-table th,
    .results-table td {
        padding: 0.5rem 0.25rem;
    }

    .trial-box {
        width: 18px;
        height: 18px;
    }

    .trials-container {
        gap: 3px;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 10% auto;
    }

    .legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
