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

:root {
  --primary-color: #27da86;
  --primary-hover: #22c278;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --bg-color: #f9fafb;
  --surface-color: #ffffff;
  --border-color: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #27da86;
    --primary-hover: #22c278;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

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

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.auth-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.auth-user {
  color: var(--text-secondary);
  font-weight: 600;
}

.logout-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.logout-link:hover {
  color: var(--primary-hover);
}

.context-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: #eff6ff;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.context-indicator svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

#contextText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 500px;
}

section {
  background: var(--surface-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.hidden {
  display: none !important;
}

.upload-section {
  text-align: center;
}

.upload-area {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 3rem;
  transition: all 0.3s ease;
  background: var(--bg-color);
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: #eff6ff;
}

#fileInput {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.file-label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.file-label svg {
  color: var(--primary-color);
}

.file-info {
  margin-top: 1rem;
  padding: 1rem;
  background: #eff6ff;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#fileName {
  font-weight: 600;
  color: var(--text-primary);
}

#fileStats {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.filter-section h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.search-group {
  grid-column: span 2;
}

.filter-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  background: var(--surface-color);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(39, 218, 134, 0.14);
}

.filter-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

#filterStats {
  font-weight: 500;
  color: var(--text-secondary);
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-color);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.results-header h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.results-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.results-container {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

#resultsTable {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.log-entry {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.log-entry:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.log-entry.expanded {
  background: var(--surface-color);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.log-entry-main {
  cursor: pointer;
  user-select: none;
}

.log-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.expand-indicator {
  color: var(--primary-color);
  font-size: 0.75rem;
  margin-left: auto;
  transition: transform 0.3s ease;
  font-weight: bold;
}

.log-timestamp {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: "Courier New", monospace;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.log-level {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.log-level.info {
  background: #dbeafe;
  color: #1e40af;
}

.log-level.debug {
  background: #e0e7ff;
  color: #4338ca;
}

.log-level.warning {
  background: #fef3c7;
  color: #92400e;
}

.log-level.error {
  background: #fee2e2;
  color: #991b1b;
}

.log-level.verbose {
  background: #f3f4f6;
  color: #4b5563;
}

.log-level.warn {
  background: #fef3c7;
  color: #92400e;
}

.log-level.off {
  background: #fafafa;
  color: #9ca3af;
}

.log-level.unknown {
  background: #fef2f2;
  color: #991b1b;
  border: 1px dashed #fca5a5;
}

.log-level.get {
  background: #dbeafe;
  color: #1e40af;
}

.log-level.post {
  background: #dcfce7;
  color: #166534;
}

.log-level.put {
  background: #fef3c7;
  color: #92400e;
}

.log-level.delete {
  background: #fee2e2;
  color: #991b1b;
}

.log-level.patch {
  background: #f3e8ff;
  color: #6b21a8;
}

.log-level.options {
  background: #e0e7ff;
  color: #4338ca;
}

.log-level.head {
  background: #e0f2fe;
  color: #075985;
}

.log-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.log-meta-item {
  font-size: 0.85rem;
}

.log-meta-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.log-meta-value {
  color: var(--text-primary);
  font-family: "Courier New", monospace;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.log-message {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-color);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  overflow: hidden;
}

.log-expanded {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border-color);
  animation: slideDown 0.3s ease-out;
}

.log-expanded.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
}

.log-expanded-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.log-expanded-header h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0;
}

.btn-copy {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-copy:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-copy svg {
  flex-shrink: 0;
}

.log-json {
  background: #1e1e1e;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.log-json code {
  color: #d4d4d4;
  font-family: "Courier New", Consolas, Monaco, monospace;
}

.json-key {
  color: #9cdcfe;
}

.json-string {
  color: #ce9178;
}

.json-number {
  color: #b5cea8;
}

.json-boolean {
  color: #569cd6;
}

.json-null {
  color: #569cd6;
}

.log-json::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.log-json::-webkit-scrollbar-track {
  background: #0d0d0d;
  border-radius: 4px;
}

.log-json::-webkit-scrollbar-thumb {
  background: #464646;
  border-radius: 4px;
}

.log-json::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

.copy-feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

#loadMoreContainer {
  text-align: center;
  padding: 1.5rem;
}

#loadMoreBtn {
  min-width: 200px;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  header h1 {
    font-size: 2rem;
  }

  section {
    padding: 1.5rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .search-group {
    grid-column: span 1;
  }

  .filter-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .results-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .log-entry-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .log-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}

.results-container::-webkit-scrollbar {
  width: 8px;
}

.results-container::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.har-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.har-section {
  background: var(--bg-color);
  border-radius: 6px;
  padding: 1rem;
}

.har-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.har-headers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

.har-header-row {
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  gap: 1rem;
  padding: 0.5rem;
  background: var(--surface-color);
  border-radius: 4px;
}

.har-header-name {
  font-weight: 600;
  color: var(--primary-color);
}

.har-header-value {
  color: var(--text-primary);
  word-break: break-all;
}

.har-header-empty {
  color: var(--text-secondary);
  font-style: italic;
  padding: 0.5rem;
}

.har-body {
  background: #1e1e1e;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.har-body code {
  color: #d4d4d4;
  font-family: "Courier New", Consolas, Monaco, monospace;
}

.har-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.har-body::-webkit-scrollbar-track {
  background: #0d0d0d;
  border-radius: 4px;
}

.har-body::-webkit-scrollbar-thumb {
  background: #464646;
  border-radius: 4px;
}

.har-body::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

.har-timings {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

.timing-total {
  padding: 0.75rem;
  background: var(--surface-color);
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.timing-total strong {
  color: var(--primary-color);
  font-size: 1rem;
}

.timing-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timing-row {
  display: grid;
  grid-template-columns: 100px 80px 1fr;
  gap: 0.75rem;
  align-items: center;
}

.timing-label {
  font-weight: 600;
  color: var(--text-primary);
}

.timing-value {
  color: var(--text-secondary);
  text-align: right;
}

.timing-bar {
  height: 24px;
  border-radius: 4px;
  min-width: 2px;
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .har-header-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .timing-row {
    grid-template-columns: 80px 60px 1fr;
    gap: 0.5rem;
    font-size: 0.8rem;
  }
}

/* Mode Switcher Styles */
.mode-switcher {
  margin-bottom: 2rem;
}

.mode-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--surface-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  text-align: center;
}

.mode-btn:hover {
  border-color: var(--primary-color);
  background: #eff6ff;
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.mode-btn.active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-lg);
}

.mode-btn.active:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.mode-btn svg {
  transition: transform 0.3s ease;
}

.mode-btn:hover svg {
  transform: scale(1.1);
}

.mode-btn span {
  font-size: 1.1rem;
  font-weight: 600;
}

.mode-btn small {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* WebSocket Section Styles */
.websocket-section {
  background: var(--surface-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.connection-status {
  margin-bottom: 1.5rem;
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.status-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-connecting .status-dot {
  background: var(--warning-color);
}

.status-connected .status-dot {
  background: var(--success-color);
}

.status-disconnected .status-dot {
  background: var(--secondary-color);
}

.status-error .status-dot {
  background: var(--error-color);
}

.status-connecting {
  background: #fef3c7;
  color: #92400e;
}

.status-connected {
  background: #d1fae5;
  color: #065f46;
}

.status-disconnected {
  background: #f3f4f6;
  color: var(--text-secondary);
}

.status-error {
  background: #fee2e2;
  color: #991b1b;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.connection-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Emitter List Styles */
.emitter-list-section {
  margin: 1.5rem 0;
}

.emitter-list-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.emitter-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.emitter-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}

.emitter-card {
  background: var(--surface-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emitter-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.emitter-card.selected {
  border-color: var(--primary-color);
  background: rgba(39, 218, 134, 0.1);
  box-shadow: var(--shadow-md);
}

@media (prefers-color-scheme: dark) {
  .emitter-card.selected {
    background: rgba(39, 218, 134, 0.14);
  }
}

.emitter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.emitter-name-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.emitter-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refresh-info-btn {
  flex-shrink: 0;
  padding: 0.25rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.refresh-info-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.refresh-info-btn svg {
  display: block;
}

.emitter-badge {
  background: var(--success-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.emitter-details {
  display: flex;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Session Info Styles */
.session-info {
  background: var(--bg-color);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.session-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.session-actions {
  display: flex;
  gap: 0.5rem;
}

.session-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.session-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: "Courier New", monospace;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-color);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  height: 60vh;
  overflow-y: auto;
}

.session-browser-controls {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Sessions List Styles */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sessions-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.sessions-empty svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.sessions-empty h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.session-item:hover {
  background: #eff6ff;
  border-color: var(--primary-color);
  transform: translateX(2px);
}

.session-item-info {
  flex: 1;
}

.session-item-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.session-item-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.session-item-actions {
  display: flex;
  gap: 0.5rem;
}

.session-item-btn {
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-item-btn.load {
  background: var(--primary-color);
  color: white;
}

.session-item-btn.load:hover {
  background: var(--primary-hover);
}

.session-item-btn.delete {
  background: var(--error-color);
  color: white;
}

.session-item-btn.delete:hover {
  background: #dc2626;
}

/* Onboarding Modal Styles */
.modal-content-large {
  max-width: 800px;
  width: 90%;
}

.upload-section-modal,
.websocket-section-modal {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 1.5rem 0;
  margin: 0;
}

.upload-section-modal .upload-area {
  margin-bottom: 1rem;
}

.websocket-section-modal .connection-status {
  margin-bottom: 1.5rem;
}

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(39, 218, 134, 0.4);
  transition: all 0.3s ease;
  z-index: 999;
}

.fab:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 218, 134, 0.5);
}

.fab:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(39, 218, 134, 0.4);
}

.fab svg {
  flex-shrink: 0;
}

.fab.hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mode-options {
    flex-direction: column;
    align-items: center;
  }

  .mode-btn {
    min-width: 250px;
  }

  .status-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .connection-controls {
    justify-content: center;
  }

  .session-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .session-actions {
    justify-content: center;
  }

  .session-details {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-content-large {
    width: 95%;
    max-width: none;
  }

  .session-item {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .session-item-actions {
    justify-content: center;
  }

  .fab {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
  }

  .fab svg {
    width: 20px;
    height: 20px;
  }
}

/* Auth page styles */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#sign-in,
#sign-up {
  width: 100%;
  max-width: 400px;
}