/* BrowserLab - DataEdge Theme */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    min-height: 100vh;
    color: #e2e8f0;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-title {
    margin-bottom: 20px;
}

.header-title h1 {
    font-size: 2em;
    color: #60a5fa;
    font-weight: 600;
    margin-bottom: 6px;
}

.subtitle {
    color: #94a3b8;
    font-size: 1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat-card {
    background: rgba(51, 65, 85, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #34d399);
    opacity: 0.7;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #34d399;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.85em;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(59, 130, 246, 0.3);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h3 {
    font-size: 0.95em;
    color: #60a5fa;
    margin-bottom: 12px;
    font-weight: 600;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-btn {
    padding: 12px;
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.category-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #34d399;
}

.category-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(52, 211, 153, 0.3));
    border-color: #34d399;
}

.test-history {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 8px;
    margin-bottom: 6px;
    background: rgba(51, 65, 85, 0.3);
    border-left: 3px solid #34d399;
    border-radius: 4px;
    font-size: 0.8em;
}

.history-time {
    color: #64748b;
    font-size: 0.75em;
}

.history-api {
    color: #60a5fa;
    font-weight: 500;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(30, 41, 59, 0.4);
}

.category-section {
    display: none;
}

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

.category-title {
    font-size: 1.5em;
    color: #60a5fa;
    margin-bottom: 20px;
    font-weight: 600;
}

/* API Panel */
.api-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.api-panel:hover {
    border-color: #34d399;
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.1);
}

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

.api-header h3 {
    font-size: 1.1em;
    color: #f1f5f9;
    font-weight: 600;
}

.support-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.support-badge.supported {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.support-badge.unsupported {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.support-badge.checking {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.api-description {
    color: #94a3b8;
    font-size: 0.9em;
    margin-bottom: 16px;
}

.api-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #34d399;
    background: rgba(51, 65, 85, 0.8);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #34d399);
    color: #000;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #34d399, #3b82f6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #34d399;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.api-result {
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    min-height: 50px;
    color: #cbd5e1;
    font-family: 'Consolas', monospace;
    font-size: 0.85em;
    white-space: pre-wrap;
    word-break: break-word;
}

.api-result:empty::before {
    content: 'No results yet. Run a test to see output.';
    color: #64748b;
    font-style: italic;
}

.result-success {
    color: #34d399;
}

.result-error {
    color: #fca5a5;
}

.result-info {
    color: #60a5fa;
}

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

::-webkit-scrollbar-track {
    background: rgba(51, 65, 85, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.4);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.6);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 16px;
    }

    .header-title h1 {
        font-size: 1.5em;
    }

    .api-controls {
        flex-direction: column;
    }

    .input {
        width: 100%;
    }
}
