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

body {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  background: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
}

header h1 {
  font-size: 16px;
  font-weight: 600;
  color: #e94560;
}

.status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.status.connected {
  background: #0a3d2a;
  color: #4caf50;
}

.status.disconnected {
  background: #3d0a0a;
  color: #f44336;
}

.tabs {
  display: flex;
  gap: 0;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
  padding: 0 20px;
}

.tab {
  padding: 10px 20px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: #ccc;
}

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

.panel {
  display: none;
  flex-direction: column;
  height: calc(100vh - 110px);
}

.panel.active {
  display: flex;
}

.filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: #1a1a2e;
  border-bottom: 1px solid #0f3460;
  flex-wrap: wrap;
}

.filters select,
.filters input,
.filters button {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #0f3460;
  background: #16213e;
  color: #e0e0e0;
}

.filters input {
  flex: 1;
  min-width: 120px;
}

.filters button {
  cursor: pointer;
  background: #e94560;
  border-color: #e94560;
  color: white;
}

.filters button:hover {
  background: #c23350;
}

.entries {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}

.log-entry {
  display: flex;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-entry .time {
  color: #666;
  white-space: nowrap;
  min-width: 80px;
}

.log-entry .level {
  font-weight: 600;
  text-transform: uppercase;
  min-width: 50px;
}

.log-entry .source {
  color: #7b68ee;
  min-width: 80px;
}

.log-entry .message {
  flex: 1;
  word-break: break-word;
}

.log-entry.debug { background: #1a1a2e; }
.log-entry.debug .level { color: #888; }

.log-entry.info { background: #0d2137; }
.log-entry.info .level { color: #4fc3f7; }

.log-entry.warn { background: #2a2000; }
.log-entry.warn .level { color: #ffd54f; }

.log-entry.error { background: #2a0a0a; }
.log-entry.error .level { color: #ef5350; }

.request-entry {
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  background: #0d2137;
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}

.request-entry:hover {
  background: #132d4a;
}

.request-summary {
  display: flex;
  gap: 10px;
  align-items: center;
}

.request-entry .time {
  color: #666;
  white-space: nowrap;
}

.request-entry .method {
  font-weight: 600;
  min-width: 55px;
}

.method-GET { color: #4caf50; }
.method-POST { color: #4fc3f7; }
.method-PUT { color: #ffd54f; }
.method-PATCH { color: #ff9800; }
.method-DELETE { color: #ef5350; }

.request-entry .path {
  flex: 1;
  color: #ccc;
  word-break: break-word;
}

.request-entry .ip {
  color: #666;
  font-size: 11px;
}

.request-detail {
  display: none;
  margin-top: 8px;
  padding: 10px;
  background: #0a1628;
  border-radius: 4px;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

.request-entry.expanded .request-detail {
  display: block;
}

.detail-section {
  margin-bottom: 8px;
}

.detail-section h4 {
  color: #e94560;
  font-size: 11px;
  margin-bottom: 4px;
}
