#debug-window {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#debug-window.collapsed {
    height: 40px;
}

#debug-window.expanded {
    height: 400px;
}

.debug-header {
    background: #2a2a2a;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    user-select: none;
}

.debug-header:hover {
    background: #333;
}

.debug-title {
    font-weight: bold;
    color: #4a9eff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.debug-counter {
    background: #ff5555;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.debug-actions {
    display: flex;
    gap: 10px;
}

.debug-btn {
    background: #444;
    border: none;
    color: #e0e0e0;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.2s;
}

.debug-btn:hover {
    background: #555;
}

.debug-btn.danger {
    background: #ff5555;
}

.debug-btn.danger:hover {
    background: #ff6666;
}

.debug-content {
    overflow-y: auto;
    height: calc(100% - 41px);
    padding: 10px;
}

#debug-window.collapsed .debug-content {
    display: none;
}

.debug-entry {
    background: #2a2a2a;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #4a9eff;
    overflow: hidden;
}

.debug-entry.type-warning {
    border-left-color: #ffa500;
}

.debug-entry.type-error {
    border-left-color: #ff5555;
}

.debug-entry.type-success {
    border-left-color: #50fa7b;
}

.debug-entry-header {
    padding: 8px 12px;
    background: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.debug-entry-header:hover {
    background: #3a3a3a;
}

.debug-entry-label {
    font-weight: bold;
    color: #4a9eff;
}

.debug-entry-meta {
    display: flex;
    gap: 15px;
    font-size: 10px;
    color: #888;
}

.debug-entry-body {
    padding: 12px;
    display: none;
    border-top: 1px solid #444;
}

.debug-entry.expanded .debug-entry-body {
    display: block;
}

.debug-data {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.debug-data-type {
    color: #888;
    font-size: 10px;
    margin-bottom: 5px;
}

.debug-toggle-icon {
    transition: transform 0.2s;
}

.debug-entry.expanded .debug-toggle-icon {
    transform: rotate(90deg);
}

.debug-empty {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

/* Syntax highlighting for different data types */
.debug-data .string { color: #50fa7b; }
.debug-data .number { color: #bd93f9; }
.debug-data .boolean { color: #ff79c6; }
.debug-data .null { color: #6272a4; }
.debug-data .key { color: #8be9fd; }

/* Scrollbar styling */
.debug-content::-webkit-scrollbar,
.debug-data::-webkit-scrollbar {
    width: 8px;
}

.debug-content::-webkit-scrollbar-track,
.debug-data::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.debug-content::-webkit-scrollbar-thumb,
.debug-data::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.debug-content::-webkit-scrollbar-thumb:hover,
.debug-data::-webkit-scrollbar-thumb:hover {
    background: #555;
}
