* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #d4d4d4;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 20px 0 30px 0;
    border-bottom: 2px solid #3c3c3c;
    margin-bottom: 30px;
}

h1 {
    color: #569cd6;
    margin: 0 0 10px 0;
    font-size: 2.5em;
}

.subtitle {
    color: #9cdcfe;
    font-size: 1.1em;
    margin: 0;
}

.subtitle a {
    color: #569cd6;
    text-decoration: none;
    border-bottom: 1px dotted #569cd6;
}

.subtitle a:hover {
    border-bottom: 1px solid #569cd6;
}

/* Status Messages */
.status-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.status-loading {
    background-color: #264f78;
    color: #d4d4d4;
    border: 1px solid #3c7eb8;
}

.status-error {
    background-color: #5a1d1d;
    color: #f48771;
    border: 1px solid #a12626;
}

.status-success {
    background-color: #1e4620;
    color: #b5cea8;
    border: 1px solid #2e7d32;
}

.hidden {
    display: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #569cd6;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

.workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section Styles */
.section {
    background-color: #252526;
    border: 1px solid #3c3c3c;
    border-radius: 5px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-weight: 600;
    font-size: 1.1em;
    color: #569cd6;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 10px;
}

/* Button Styles */
button, .button {
    background-color: #0e639c;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover, .button:hover {
    background-color: #1177bb;
}

button:active, .button:active {
    background-color: #0d5a8f;
}

button:disabled {
    background-color: #3c3c3c;
    color: #6e6e6e;
    cursor: not-allowed;
}

.button-secondary {
    background-color: #3c3c3c;
    color: #d4d4d4;
}

.button-secondary:hover {
    background-color: #4e4e4e;
}

.button-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Form Controls */
textarea, select {
    width: 100%;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    padding: 12px;
    border: 1px solid #3c3c3c;
    border-radius: 3px;
    background-color: #1e1e1e;
    color: #d4d4d4;
    resize: vertical;
}

textarea:focus, select:focus {
    outline: none;
    border-color: #569cd6;
}

textarea {
    min-height: 200px;
}

input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    border: 1px solid #3c3c3c;
    border-radius: 3px;
    background-color: #1e1e1e;
    color: #d4d4d4;
}

input[type="text"]:focus {
    outline: none;
    border-color: #569cd6;
}

select {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    cursor: pointer;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #9cdcfe;
}

/* Examples */
.example-item {
    background-color: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 3px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.example-item:hover {
    background-color: #2d2d30;
    border-color: #569cd6;
}

.example-name {
    font-weight: 600;
    color: #569cd6;
    margin-bottom: 5px;
}

.example-description {
    font-size: 13px;
    color: #9cdcfe;
    margin-bottom: 8px;
}

.example-path {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    color: #ce9178;
    background-color: #1e1e1e;
    padding: 5px 8px;
    border-radius: 2px;
    overflow-x: auto;
}

/* Info Box */
.info-box {
    background-color: #1a1a1a;
    border: 1px solid #3c3c3c;
    border-left: 3px solid #569cd6;
    border-radius: 3px;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 13px;
}

.info-box strong {
    color: #569cd6;
}

.info-box code {
    background-color: #2d2d30;
    padding: 2px 6px;
    border-radius: 2px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
}

/* Result Display */
.result-success {
    color: #b5cea8;
}

.result-error {
    color: #f48771;
}

/* Documentation */
.docs-section {
    margin-bottom: 20px;
}

.docs-section h3 {
    color: #569cd6;
    font-size: 1em;
    margin: 0 0 10px 0;
}

.docs-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.docs-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.docs-section code {
    background-color: #2d2d30;
    padding: 2px 6px;
    border-radius: 2px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    color: #ce9178;
}

/* History */
.history-item {
    background-color: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-item:hover {
    background-color: #2d2d30;
}

.history-path {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    color: #ce9178;
    word-break: break-all;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #6e6e6e;
    font-style: italic;
}

/* Collapsible Section */
.collapsible-header {
    cursor: pointer;
    user-select: none;
}

.collapsible-header::before {
    content: '▼ ';
    display: inline-block;
    transition: transform 0.2s;
}

.collapsible-header.collapsed::before {
    transform: rotate(-90deg);
}

.collapsible-content.collapsed {
    display: none;
}

/* Keyboard Shortcuts */
.shortcuts {
    font-size: 12px;
    color: #6e6e6e;
    margin-top: 10px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1e4620;
    color: #b5cea8;
    padding: 12px 20px;
    border-radius: 5px;
    border: 1px solid #2e7d32;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.toast.toast-warning {
    background-color: #5a4a1d;
    color: #f1c40f;
    border-color: #a17f1a;
}

.toast.toast-error {
    background-color: #5a1d1d;
    color: #f48771;
    border-color: #a12626;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Performance Metrics */
.query-metrics {
    font-size: 12px;
    color: #858585;
    margin-top: 8px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    padding: 8px 12px;
    background-color: #1e1e1e;
    border-radius: 3px;
    border: 1px solid #3c3c3c;
}

.metrics-success {
    color: #b5cea8;
    border-color: #2e7d32;
}

.metrics-error {
    color: #f48771;
