/* Debug Modal */

.modal,
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #eee;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close-modal,
.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-modal:hover,
.modal-close:hover {
    color: #000;
}

.modal-body,
.debug-section {
    padding: 1.5rem;
    overflow-y: auto;
}

.debug-section h3 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.debug-section h3:first-child {
    margin-top: 0;
}

.token-stats {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.token-stats p {
    margin: 0.5rem 0;
}

.reasoning-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reasoning-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.gemini-prompt-card {
    border-left-color: #9b59b6;
    margin-bottom: 0.5rem;
}

.validation-prompt-card {
    border-left-color: #e67e22;
}

.gemini-prompt-content {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
    white-space: pre-wrap;
}

.validation-analysis {
    background: #fff8e6;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #5a4a00;
}

.validation-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.validation-badge.corrections-made {
    background: #ffeaa7;
    color: #b7791f;
}

.validation-badge.no-corrections {
    background: #d5f5e3;
    color: #1e8449;
}

.reasoning-header {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.reasoning-message {
    font-style: italic;
    color: #555;
    margin-bottom: 0.5rem;
}

.reasoning-explanation {
    color: #666;
    font-size: 0.9rem;
}

.json-display {
    background: #2c3e50;
    color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Metadata Grid */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metadata-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.metadata-item.full-width {
    grid-column: 1 / -1;
}

.metadata-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.metadata-value {
    display: block;
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
    word-break: break-word;
}

.metadata-value.mono {
    font-family: monospace;
    font-size: 0.85rem;
}

.copy-metadata-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-metadata-btn:hover {
    background: #34495e;
}

.copy-metadata-btn:active {
    background: #1a252f;
}

/* Tone Pairs Display */
.tone-pairs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tone-pair {
    background: #e8f4f8;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.tone-pair .unmatched {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Model Info Card */
.model-info-card {
    background: #f0f3ff;
    border-left-color: #5d5fef;
}

.model-name {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #2c3e50;
    padding: 0.5rem 0;
}

/* Mobile Responsiveness - Modal */
@media (max-width: 768px) {
    .metadata-grid {
        grid-template-columns: 1fr;
    }
}
