/* Debug Panel */
.debug-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    overflow: auto;
    display: none;
}

.debug-panel-overlay.active {
    display: block;
}

.debug-panel-header {
    position: sticky;
    top: 0;
    background: #1a1a1a;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #FF6B6B;
}

.debug-panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.debug-close-btn {
    background: #FF6B6B;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.debug-close-btn:active {
    background: #ff5252;
}

.debug-section-tabs {
    display: flex;
    overflow-x: auto;
    padding: 5px;
    gap: 5px;
    background: #2a2a2a;
    scrollbar-width: thin;
    position: sticky;
    top: 60px;
    z-index: 9;
}

.debug-tab-btn {
    padding: 8px 15px;
    background: #3a3a3a;
    color: #aaa;
    border: none;
    border-radius: 4px 4px 0 0;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.debug-tab-btn:active {
    background: #4a4a4a;
    color: #fff;
}

.debug-tab-btn.active {
    background: #FF6B6B;
    color: white;
}

.debug-content {
    padding: 10px;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 500px;
    max-width: 1200px;
    margin: 0 auto;
}

.debug-section {
    display: none;
}

.debug-section.active {
    display: block;
}

.debug-card {
    padding: 10px;
    margin-bottom: 15px;
    background: #2a2a2a;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #3a3a3a;
    color: #e0e0e0;
}

.debug-metric {
    padding: 12px;
    margin-bottom: 10px;
    background: #2a2a2a;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.debug-metric span {
    color: #aaa;
}

.debug-metric strong {
    color: #fff;
}

.debug-raw-output {
    margin-bottom: 20px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    overflow: hidden;
}

.debug-raw-summary {
    padding: 12px 15px;
    background: #2a2a2a;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    color: #e0e0e0;
}

.debug-raw-summary:active {
    background: #3a3a3a;
}

.debug-raw-content {
    display: none;
    padding: 15px;
    background: #1a1a1a;
    border-top: 1px solid #3a3a3a;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
}

.debug-raw-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.debug-raw-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.debug-raw-content::-webkit-scrollbar-thumb {
    background: #FF6B6B;
    border-radius: 4px;
}

.debug-raw-content pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e0e0e0;
}

.debug-tools-grid {
    grid-template-columns: 1fr;
}
