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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    color: #333;
    background: #f8f9fa;
    height: 100vh;
    overflow: hidden;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    min-height: 36px;
}

.title {
    font-weight: 600;
    color: #6B46C1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon {
    font-size: 16px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc3545;
}

.status-indicator.connected {
    background: #28a745;
}

.status-indicator.connecting {
    background: #ffc107;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background: #fff;
    border-right: 1px solid #e1e5e9;
    overflow-y: auto;
}

.section-header {
    padding: 8px 12px;
    font-weight: 600;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.sessions-list {
    max-height: 300px;
    overflow-y: auto;
}

.session-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.15s;
}

.session-item:hover {
    background: #f8f9fa;
}

.session-item.active {
    background: #e3f2fd;
    color: #1976d2;
}

.no-sessions, .no-events {
    padding: 20px 12px;
    color: #666;
    font-style: italic;
    text-align: center;
}

.tools {
    padding: 8px;
}

.tool-button {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
    transition: background-color 0.15s;
}

.tool-button:hover {
    background: #f8f9fa;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
}

.tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.tab:hover {
    background: #f8f9fa;
}

.tab.active {
    color: #6B46C1;
    border-bottom-color: #6B46C1;
}

.tab-content {
    flex: 1;
    overflow: hidden;
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Inspector */
.inspector-container {
    flex: 1;
    overflow: hidden;
}

.select-session {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.state-inspector {
    height: 100%;
    overflow-y: auto;
    padding: 12px;
}

.state-inspector.hidden {
    display: none;
}

.state-tree {
    font-family: "SF Mono", Monaco, Menlo, monospace;
    font-size: 12px;
    line-height: 1.4;
}

.state-key {
    color: #6B46C1;
    font-weight: 500;
}

.state-value {
    color: #333;
}

.state-type {
    color: #666;
    font-style: italic;
}

/* Events */
.events-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    font-weight: 500;
}

.clear-button {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
}

.events-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.event-item {
    padding: 8px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-family: "SF Mono", Monaco, Menlo, monospace;
    font-size: 11px;
}

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

.event-type {
    font-weight: 600;
    color: #6B46C1;
}

.event-timestamp {
    color: #666;
    font-size: 10px;
}

.event-details {
    color: #333;
    padding-left: 8px;
}

/* Performance */
.performance-container {
    padding: 12px;
    overflow-y: auto;
}

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

.metric-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}

.metric-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}