* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0e1a;
    --bg-darker: #050811;
    --card-bg: #0f1419;
    --card-hover: #151b24;
    --sidebar-bg: #0d1117;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-bright: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #8b92a8;
    --text-tertiary: #5a6377;
    --accent-blue: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.1);
    --success: #10b981;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 600px;
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    z-index: 1;
}

/* Header */
.header {
    margin-bottom: 24px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-text h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.3px;
}

.header-text p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--success);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    height: calc(100vh - 140px);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}

.sidebar-section {
    padding: 16px;
}

.sidebar-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding: 0 8px;
}

/* Searchable Dropdown */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dropdown-header:hover {
    background: var(--card-hover);
    border-color: var(--border-bright);
}

.dropdown-header.active {
    border-color: var(--accent-blue);
    background: var(--card-hover);
}

.dropdown-selected {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.dropdown-selected.has-selection {
    color: var(--text-primary);
}

.dropdown-arrow {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.dropdown-header.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    max-height: 320px;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-search {
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.dropdown-search input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}

.dropdown-search input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-darker);
}

.dropdown-search input::placeholder {
    color: var(--text-tertiary);
}

.operation-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.operation-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: left;
    width: 100%;
}

.operation-item:hover {
    background: var(--card-hover);
    color: var(--text-primary);
}

.operation-item.active {
    background: var(--accent-light);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.operation-item.hidden {
    display: none;
}

.operation-name {
    flex: 1;
}

.execute-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    margin-top: 24px;
}

.execute-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.execute-btn:active {
    transform: translateY(0);
}

.execute-btn:disabled {
    background: var(--card-hover);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Workspace */
.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    overflow: hidden;
}

.workspace-panel {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title svg {
    color: var(--text-secondary);
}

.panel-title h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-badge {
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.response-badge {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.panel-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

textarea {
    flex: 1;
    padding: 20px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.7;
    border: none;
    resize: none;
    background: var(--bg-dark);
    color: var(--text-primary);
    transition: background 0.15s ease;
}

textarea:focus {
    outline: none;
    background: var(--bg-darker);
}

textarea::placeholder {
    color: var(--text-tertiary);
}

textarea::selection {
    background: var(--accent-blue);
    color: white;
}

pre {
    flex: 1;
    padding: 20px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.7;
    background: var(--bg-dark);
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
    margin: 0;
}

pre:empty::before {
    content: 'No response yet. Execute a request to see the output...';
    color: var(--text-tertiary);
    font-style: italic;
}

pre::selection {
    background: var(--accent-blue);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.footer p {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
    .workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sidebar {
        max-height: 400px;
    }

    .workspace-panel {
        min-height: 400px;
    }
}