:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.8);
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #606060;
  --accent-cyan: #00fff5;
  --accent-purple: #7b2cbf;
  --accent-gradient: linear-gradient(135deg, #7b2cbf 0%, #00fff5 100%);
  --accent-image: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
  --accent-tools: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  --border-color: rgba(123, 44, 191, 0.3);
  --success: #00ff88;
  --error: #ff4466;
  --warning: #ffaa00;
}

.light-theme {
  --bg-primary: #f0f0f5;
  --bg-secondary: #e8e8f0;
  --bg-tertiary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #8a8a9a;
  --border-color: rgba(123, 44, 191, 0.2);
}

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

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

.app-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.header {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.byok-badge {
  background: var(--accent-gradient);
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent-cyan);
}

/* Key Section */
.key-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.key-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
}

.chevron {
  transition: transform 0.3s;
}

.chevron.open {
  transform: rotate(180deg);
}

.key-panel {
  padding: 0 1.5rem 1.5rem;
  animation: slideDown 0.3s ease;
}

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

.key-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.key-input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.key-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 255, 245, 0.1);
}

.key-visibility {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.key-status {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.key-status.valid { color: var(--success); }
.key-status.invalid { color: var(--error); }

.key-options {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
}

.key-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.9rem;
}

.key-link:hover {
  text-decoration: underline;
}

/* Tabs */
.tabs-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.tab.active {
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border-color: transparent;
  font-weight: 600;
}

.tab.image-tab.active {
  background: var(--accent-image);
}

.tab.functions-tab.active {
  background: var(--accent-tools);
}

.tab.has-images {
  position: relative;
}

.tab.has-images::after {
  content: '📎';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.7rem;
}

/* Workspace */
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Model Selector */
.model-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.model-select-wrapper {
  display: flex;
  gap: 0.5rem;
}

.model-select-wrapper .select {
  flex: 1;
}

.model-info-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.model-info-btn:hover {
  border-color: var(--accent-cyan);
}

.stateful-model-note,
.vision-model-note,
.tools-model-note {
  font-size: 0.75rem;
  color: var(--warning);
  background: rgba(255, 170, 0, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid var(--warning);
}

.vision-model-note {
  color: var(--accent-cyan);
  background: rgba(0, 255, 245, 0.1);
  border-left-color: var(--accent-cyan);
}

.tools-model-note {
  color: #00b894;
  background: rgba(0, 184, 148, 0.1);
  border-left-color: #00b894;
}

.model-details {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  animation: slideDown 0.2s ease;
}

.model-detail-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.detail-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.detail-value.price {
  color: var(--accent-cyan);
}

.model-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(123, 44, 191, 0.2);
  color: var(--accent-purple);
}

.model-badge.vision {
  background: rgba(0, 255, 245, 0.1);
  color: var(--accent-cyan);
}

.model-badge.reasoning {
  background: rgba(255, 170, 0, 0.15);
  color: var(--warning);
}

.model-badge.code {
  background: rgba(0, 136, 255, 0.15);
  color: #0088ff;
}

.model-badge.image {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.model-badge.tools {
  background: rgba(0, 184, 148, 0.15);
  color: #00b894;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

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

.select, .input, .textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.input.mono, .textarea.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.select:focus, .input:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 255, 245, 0.1);
}

.textarea {
  resize: vertical;
  font-family: 'JetBrains Mono', monospace;
}

.textarea.image-prompt {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

/* Tools Selector */
.tools-selector {
  margin-top: 1rem;
}

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

.tools-header h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.tools-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tool-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-card:hover {
  border-color: #00b894;
  transform: translateY(-2px);
}

.tool-card.selected {
  border-color: #00b894;
  background: rgba(0, 184, 148, 0.1);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tool-icon {
  font-size: 1.2rem;
}

.tool-name {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
}

.tool-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.2s;
}

.tool-checkbox.checked {
  background: #00b894;
  border-color: #00b894;
  color: white;
}

.tool-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.tool-functions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.tool-function-tag {
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  background: rgba(0, 184, 148, 0.15);
  color: #00b894;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.tool-category {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Custom Functions */
.custom-functions-section {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.custom-functions-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.85rem;
}

.custom-functions-content {
  padding: 1rem 0;
  animation: slideDown 0.3s ease;
}

.custom-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.custom-functions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.custom-function-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
}

.custom-function-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.custom-function-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.custom-function-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.remove-btn-small {
  background: transparent;
  border: none;
  color: var(--error);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.add-function-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Tool Calls Display - Enhanced */
.tool-calls-display {
  background: rgba(0, 184, 148, 0.1);
  border: 1px solid rgba(0, 184, 148, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.tool-calls-display h4 {
  font-size: 0.9rem;
  color: #00b894;
  margin-bottom: 0.75rem;
}

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

.tool-call-item {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.tool-call-item.expanded {
  border-color: rgba(0, 184, 148, 0.5);
}

.tool-call-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.25rem 0;
}

.tool-call-header-main:hover {
  opacity: 0.8;
}

.tool-call-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-call-icon {
  font-size: 1.1rem;
}

.tool-call-type-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 184, 148, 0.2);
  color: #00b894;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.tool-call-status {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.tool-call-status.status-completed {
  background: rgba(0, 255, 136, 0.15);
  color: var(--success);
}

.tool-call-status.status-running {
  background: rgba(0, 255, 245, 0.15);
  color: var(--accent-cyan);
}

.tool-call-status.status-failed {
  background: rgba(255, 68, 102, 0.15);
  color: var(--error);
}

.tool-call-status.status-pending {
  background: rgba(255, 170, 0, 0.15);
  color: var(--warning);
}

.tool-call-expand-icon {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.tool-call-item.expanded .tool-call-expand-icon {
  transform: rotate(90deg);
}

.tool-call-id {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.tool-call-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-call-id-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent-cyan);
  word-break: break-all;
  flex: 1;
}

.copy-id-btn-small {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0.2rem;
}

.copy-id-btn-small:hover {
  opacity: 1;
}

/* Quick info summary for collapsed tool calls */
.tool-call-quick-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 184, 148, 0.05);
  border-radius: 4px;
}

.quick-info-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-info-item.query-preview {
  flex: 1;
  min-width: 150px;
}

.quick-info-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.quick-info-value {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.tool-call-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tool-call-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.tool-call-function-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  padding: 0.5rem;
}

.tool-call-details {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: slideDown 0.2s ease;
}

.tool-call-section {
  background: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
}

.tool-call-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 184, 148, 0.1);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  color: #00b894;
}

.tool-call-section-icon {
  font-size: 0.85rem;
}

.output-count {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Action Details Grid for Web Tools */
.action-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
}

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

.action-detail-item.full-width {
  grid-column: 1 / -1;
}

.action-detail-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.action-detail-value {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.action-type-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 184, 148, 0.2);
  color: #00b894;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.query-value {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-tertiary);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border-left: 3px solid #00b894;
  word-break: break-word;
}

.action-url {
  color: var(--accent-cyan);
  text-decoration: none;
  word-break: break-all;
}

.action-url:hover {
  text-decoration: underline;
}

.action-sources {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.source-item {
  background: var(--bg-tertiary);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.source-item a {
  color: var(--accent-cyan);
  text-decoration: none;
  word-break: break-all;
}

.source-item a:hover {
  text-decoration: underline;
}

.source-item pre {
  margin: 0;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty-sources {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.8rem;
}

.tool-call-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.75rem;
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #1a1a2e;
  color: #e0e0e0;
}

.tool-call-args,
.tool-call-outputs,
.tool-call-result-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.75rem;
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty-output {
  color: var(--text-muted);
  font-style: italic;
}

.tool-call-preview {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.tool-call-code-preview,
.tool-call-args-preview {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tool-call-raw {
  margin-top: 0.5rem;
}

.tool-call-raw summary {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.tool-call-raw summary:hover {
  color: var(--accent-cyan);
}

.tool-call-raw-json {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.75rem;
  margin: 0.5rem 0 0 0;
  background: #1a1a2e;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.citations-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 184, 148, 0.3);
}

.citations-section h4 {
  font-size: 0.85rem;
  color: #00b894;
  margin-bottom: 0.5rem;
}

.citations-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.citation-link {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-decoration: none;
  word-break: break-all;
}

.citation-link:hover {
  text-decoration: underline;
}

/* Tool Usage Stats */
.tool-usage-stats {
  background: rgba(0, 184, 148, 0.1);
  border: 1px solid rgba(0, 184, 148, 0.3);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.tool-usage-stats h4 {
  font-size: 0.85rem;
  color: #00b894;
  margin-bottom: 0.5rem;
}

.tool-usage-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-usage-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}

.tool-usage-key {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.tool-usage-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00b894;
  font-family: 'JetBrains Mono', monospace;
}

/* Tools Info Box */
.tools-info-box {
  background: rgba(0, 184, 148, 0.05);
  border: 1px solid rgba(0, 184, 148, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.tools-info-box h3 {
  font-size: 0.9rem;
  color: #00b894;
  margin-bottom: 0.5rem;
}

.tools-info-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.tools-info-box ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
}

.tools-info-box li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
}

/* Tool Response Example */
.tool-response-example {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 184, 148, 0.2);
}

.tool-response-example h4 {
  font-size: 0.8rem;
  color: #00b894;
  margin-bottom: 0.5rem;
}

.tool-response-example pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  background: var(--bg-tertiary);
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  color: var(--text-primary);
  border-left: 3px solid #00b894;
}

/* Image Generation Form */
.image-generation-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.image-count-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}

.count-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.count-label.active {
  color: var(--accent-cyan);
  font-weight: 600;
}

.image-tips {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  padding: 1rem;
}

.image-tips h4 {
  font-size: 0.9rem;
  color: #ff6b6b;
  margin-bottom: 0.5rem;
}

.image-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.image-tips li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.25rem;
}

.image-tips li::before {
  content: '•';
  color: #ff6b6b;
  position: absolute;
  left: 0;
}

/* Image History */
.image-history-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.image-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.image-history-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.image-history-item:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 255, 245, 0.05);
}

.history-prompt {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Generated Images */
.image-response-content {
  min-height: 300px;
}

.generated-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.generated-image-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

.generated-image-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.generated-image-wrapper {
  position: relative;
  padding-top: 100%;
  background: var(--bg-secondary);
}

.generated-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.generated-image-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.generated-image-actions .btn-small {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
}

.revised-prompt {
  padding: 0.75rem;
  background: rgba(255, 107, 107, 0.1);
  border-top: 1px solid rgba(255, 107, 107, 0.2);
}

.revised-prompt-label {
  font-size: 0.7rem;
  color: #ff6b6b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.revised-prompt p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.image-response-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Messages */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message-item-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.role-select {
  width: 100px;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.message-input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  resize: vertical;
}

.message-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.remove-btn {
  background: rgba(255, 68, 102, 0.2);
  border: 1px solid var(--error);
  color: var(--error);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.remove-btn:hover {
  background: rgba(255, 68, 102, 0.4);
}

/* Image Attachment Section */
.image-attachment-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  margin-left: 108px;
}

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

.image-attachment-header label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

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

.image-drop-zone {
  min-height: 80px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  transition: all 0.2s;
  cursor: pointer;
}

.image-drop-zone:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.image-drop-zone.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(0, 255, 245, 0.05);
}

.drop-zone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
}

.drop-zone-placeholder span {
  font-size: 1.5rem;
}

.drop-zone-placeholder p {
  font-size: 0.8rem;
  margin: 0;
}

.image-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.image-preview-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.image-preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.image-name {
  font-size: 0.6rem;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-remove-btn {
  background: var(--error);
  border: none;
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.image-remove-btn:hover {
  background: #ff6688;
}

/* Vision Info Box */
.vision-info-box {
  background: rgba(0, 255, 245, 0.05);
  border: 1px solid rgba(0, 255, 245, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.vision-info-box h3 {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.vision-info-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.vision-info-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vision-info-box li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.25rem;
}

.vision-info-box li::before {
  content: '•';
  color: var(--accent-cyan);
  position: absolute;
  left: 0;
}

.vision-warning {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 170, 0, 0.1);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--warning);
}

/* Parameters Accordion */
.params-accordion {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.params-accordion summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.params-accordion summary::-webkit-details-marker {
  display: none;
}

.params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.param {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.param label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.param.full-width {
  grid-column: span 2;
}

.param.disabled {
  opacity: 0.5;
}

.param.disabled .slider {
  cursor: not-allowed;
}

.param-disabled-note {
  font-size: 0.7rem;
  color: var(--warning);
  font-style: italic;
}

.reasoning-notice {
  padding: 0.75rem 1rem;
  background: rgba(255, 170, 0, 0.1);
  border-top: 1px solid rgba(255, 170, 0, 0.3);
  font-size: 0.8rem;
  color: var(--warning);
}

.slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-secondary);
  border-radius: 3px;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-cyan);
  border-radius: 50%;
  cursor: pointer;
}

.slider:disabled::-webkit-slider-thumb {
  background: var(--text-muted);
  cursor: not-allowed;
}

.input-small {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
}

/* Stateful Options */
.stateful-options {
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-purple);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.stateful-options h3 {
  font-size: 0.9rem;
  color: var(--accent-purple);
  margin-bottom: 0.75rem;
}

.stateful-info {
  background: rgba(123, 44, 191, 0.1);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.stateful-info p {
  margin-bottom: 0.5rem;
}

.docs-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.8rem;
}

.docs-link:hover {
  text-decoration: underline;
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

.stateful-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stateful-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-small.danger {
  border-color: var(--error);
  color: var(--error);
}

.btn-small.danger:hover {
  background: rgba(255, 68, 102, 0.2);
}

.history-section {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 150px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.history-item:hover {
  background: rgba(0, 255, 245, 0.1);
  border-color: var(--accent-cyan);
}

.history-id {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-cyan);
}

.history-time {
  color: var(--text-muted);
}

.history-count {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Response Panel */
.response-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.response-tab {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.response-tab:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.response-tab.active {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-color: var(--accent-cyan);
}

.response-content {
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.streaming-preview {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 80%;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-secondary);
  gap: 0.5rem;
}

.empty-state span {
  font-size: 3rem;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.formatted-response {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.response-id-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 255, 245, 0.1);
  border: 1px solid rgba(0, 255, 245, 0.3);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.response-id-label {
  color: var(--text-secondary);
}

.response-id-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-cyan);
  font-size: 0.75rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-id-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.copy-id-btn:hover {
  opacity: 1;
}

.retrieved-response {
  background: rgba(123, 44, 191, 0.1);
  border: 1px solid var(--accent-purple);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.retrieved-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--accent-purple);
}

.json-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  max-height: 200px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble {
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-purple);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.response-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.error-box {
  background: rgba(255, 68, 102, 0.1);
  border: 1px solid var(--error);
  border-radius: 8px;
  padding: 1rem;
  color: var(--error);
}

.json-view {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
}

.copy-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.json-view pre {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.headers-view {
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Buttons */
.btn-small {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-small:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-small:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Action Bar */
.action-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  color: var(--bg-primary);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(123, 44, 191, 0.4);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary.tools-btn {
  background: var(--accent-tools);
}

.btn-primary.tools-btn:hover:not(:disabled) {
  box-shadow: 0 4px 20px rgba(0, 184, 148, 0.4);
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Dropdown */
.history-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  min-width: 200px;
  z-index: 100;
  margin-bottom: 0.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.dropdown-section {
  margin-bottom: 0.5rem;
}

.dropdown-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.85rem;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
}

/* Models Reference Table */
.models-reference {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.models-reference summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  color: var(--text-primary);
}

.models-reference summary::-webkit-details-marker {
  display: none;
}

.models-tables {
  padding: 0 1.5rem 1.5rem;
}

.models-tables h3 {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin: 1rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table-wrapper {
  overflow-x: auto;
}

.models-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.models-table th,
.models-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.models-table th {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.models-table td {
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.models-table tr:hover {
  background: rgba(123, 44, 191, 0.1);
}

.models-table tr.selected {
  background: rgba(0, 255, 245, 0.1);
  border-left: 3px solid var(--accent-cyan);
}

.models-table .model-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}

.models-table .vision-tag {
  margin-left: 0.5rem;
}

.models-table .reasoning-tag {
  margin-left: 0.5rem;
}

.models-table .code-tag {
  margin-left: 0.5rem;
}

.models-table .tools-tag {
  margin-left: 0.5rem;
}

.models-table .price {
  color: var(--accent-cyan);
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.disclaimer {
  opacity: 0.7;
}

.chaos-indicator {
  color: var(--warning);
  animation: pulse 1s infinite;
}

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

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast-success {
  border-color: var(--success);
  color: var(--success);
}

.toast-error {
  border-color: var(--error);
  color: var(--error);
}

.toast-info {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.animate-slide-in {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-title {
    font-size: 1.2rem;
  }
  
  .tabs-container {
    gap: 0.25rem;
  }
  
  .tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .action-bar {
    flex-direction: column;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
  }
  
  .params-grid {
    grid-template-columns: 1fr;
  }
  
  .param.full-width {
    grid-column: span 1;
  }
  
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  
  .models-table {
    font-size: 0.75rem;
  }
  
  .models-table th,
  .models-table td {
    padding: 0.5rem;
  }
  
  .image-attachment-section {
    margin-left: 0;
  }
  
  .generated-images-grid {
    grid-template-columns: 1fr;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
}