﻿:root {
  --bg-color: #0a0a0c;
  --bg-card: rgba(15, 15, 20, 0.75);
  --bg-card-hover: rgba(22, 22, 30, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-bright: rgba(255, 255, 255, 0.16);
  --border-yellow: #FFD700;
  --yellow-primary: #FFD700;
  --yellow-accent: #FFC800;
  --yellow-glow: rgba(255, 215, 0, 0.28);
  --yellow-glow-subtle: rgba(255, 215, 0, 0.12);
  --text-white: #FFFFFF;
  --text-muted: #A0A0AB;
  --text-dark-muted: #666672;
  --cyan-accent: #00e5ff;
  --magenta-accent: #d946ef;
  --violet-glow: #8b5cf6;
  --green-online: #10b981;
  --red-dot: #ef4444;
  --blue-dot: #3b82f6;
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-white);
  font-family: var(--font-main);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Cybernetic Brain / Neural Layer */
.ai-background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

.glow-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  pointer-events: none;
}

.glow-orb-magenta {
  top: 20%;
  left: 50%;
  transform: translate(-60%, -20%);
  background: radial-gradient(circle, var(--magenta-accent) 0%, rgba(139, 92, 246, 0.4) 60%, transparent 80%);
}

.glow-orb-cyan {
  top: 35%;
  left: 50%;
  transform: translate(-30%, -10%);
  background: radial-gradient(circle, var(--cyan-accent) 0%, rgba(59, 130, 246, 0.3) 60%, transparent 80%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

/* Top Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid var(--yellow-primary);
  border-radius: 20px;
  padding: 4px 12px;
  box-shadow: 0 0 12px var(--yellow-glow-subtle);
}

.brand-badge .lightning {
  color: var(--yellow-primary);
  font-size: 0.9rem;
}

.brand-badge .brand-sub {
  color: var(--yellow-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tag-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.nav-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: #c5c5d2;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 3px 10px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--yellow-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 15, 20, 0.7);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.nav-btn:hover {
  border-color: var(--border-yellow);
  color: var(--yellow-primary);
  box-shadow: 0 0 14px var(--yellow-glow-subtle);
  background: rgba(255, 215, 0, 0.04);
}

.api-key-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #666672;
}

.api-key-status.active {
  background-color: var(--green-online);
  box-shadow: 0 0 8px var(--green-online);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--green-online);
  box-shadow: 0 0 8px var(--green-online);
  animation: pulse-dot 2s infinite ease-in-out;
}

.status-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green-online);
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Main Container Layout */
.main-container {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 100px 24px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 48px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--yellow-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 30px;
  margin-bottom: 22px;
  box-shadow: 0 0 16px var(--yellow-glow-subtle);
}

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--yellow-primary);
  box-shadow: 0 0 8px var(--yellow-primary);
}

.hero-headline {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-white);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 34px;
}

/* Action Buttons (By CikaDule style) */
.actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-yellow-glow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(15, 15, 20, 0.8);
  border: 1.5px solid var(--border-yellow);
  color: var(--yellow-primary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 20px var(--yellow-glow-subtle), inset 0 0 12px rgba(255, 215, 0, 0.06);
  backdrop-filter: blur(12px);
}

.btn-yellow-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--yellow-glow), inset 0 0 18px rgba(255, 215, 0, 0.18);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.14) 0%, rgba(15, 15, 20, 0.95) 100%);
  color: #FFF275;
}

.btn-yellow-glow:active {
  transform: translateY(0);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: #d1d1db;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(14px);
}

.btn-glass:hover {
  border-color: var(--border-yellow);
  color: var(--yellow-primary);
  background: rgba(255, 215, 0, 0.05);
  box-shadow: 0 0 18px var(--yellow-glow-subtle);
  transform: translateY(-1px);
}

/* Glassmorphism Cards Section (Lower 3 Cards) */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 36px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-card:hover {
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(255, 215, 0, 0.06);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: 8px;
}

.card-num {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--yellow-primary);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
  min-height: 38px;
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c5c5d2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.label-with-val {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.val-display {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--yellow-primary);
}

.select-wrapper {
  position: relative;
}

.select-wrapper select,
.input-glow-wrapper input,
.form-group input[type=password],
.form-group input[type=text] {
  width: 100%;
  background: rgba(10, 10, 14, 0.85);
  border: 1px solid var(--border-glass-bright);
  color: var(--text-white);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.select-wrapper select {
  cursor: pointer;
  appearance: none;
  background-image: url(data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}

.select-wrapper select:focus,
.input-glow-wrapper input:focus,
.form-group input:focus {
  border-color: var(--yellow-primary);
  box-shadow: 0 0 12px var(--yellow-glow-subtle);
}

.select-wrapper select option {
  background: #111116;
  color: #ffffff;
}

.preset-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--yellow-primary);
  color: var(--yellow-primary);
  background: rgba(255, 215, 0, 0.06);
}

/* Range Slider */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
  margin: 6px 0;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--yellow-primary);
  box-shadow: 0 0 10px var(--yellow-primary);
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-dark-muted);
  font-family: var(--font-mono);
}

/* Toggle Pill Group */
.toggle-pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(8, 8, 12, 0.7);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.pill-btn.active {
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid var(--yellow-primary);
  color: var(--yellow-primary);
  box-shadow: 0 0 10px var(--yellow-glow-subtle);
}

.pill-btn:hover:not(.active) {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

/* Output Display Panel */
.output-section {
  width: 100%;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.glass-panel:focus-within {
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 215, 0, 0.08);
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(12, 12, 16, 0.9);
  border-bottom: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 12px;
}

.output-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cyan-accent);
  box-shadow: 0 0 10px var(--cyan-accent);
}

.output-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-white);
  font-family: var(--font-mono);
}

.meta-pill {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-icon-btn:hover {
  border-color: var(--yellow-primary);
  color: var(--yellow-primary);
  background: rgba(255, 215, 0, 0.06);
}

.output-editor-container {
  padding: 16px;
  background: rgba(6, 6, 8, 0.85);
}

#output-content {
  width: 100%;
  height: 380px;
  background: transparent;
  border: none;
  color: #e4e4eb;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

#output-content::placeholder {
  color: #555562;
}

/* Bottom Terminal Console (Fixed) */
.bottom-terminal {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 90;
  background: rgba(10, 10, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass-bright);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  height: 42px;
}

.term-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: var(--red-dot); box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); }
.dot-yellow { background-color: var(--yellow-primary); box-shadow: 0 0 6px rgba(255, 215, 0, 0.6); }
.dot-blue { background-color: var(--blue-dot); box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); }

.prompt-user {
  font-weight: 600;
}

.term-user {
  color: var(--cyan-accent);
}

.term-dir {
  color: var(--yellow-primary);
}

.term-active-log {
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.term-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.term-telemetry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
}

.latency-label {
  color: var(--text-dark-muted);
}

.latency-val {
  color: var(--yellow-primary);
  font-weight: 600;
}

.term-toggle-btn {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid var(--border-yellow);
  color: var(--yellow-primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.term-toggle-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 12px var(--yellow-glow-subtle);
}

/* Terminal Drawer */
.terminal-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(7, 7, 10, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-drawer.open {
  max-height: 220px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 24px;
  background: rgba(14, 14, 20, 0.8);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dark-muted);
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.drawer-clear {
  background: transparent;
  border: none;
  color: var(--text-dark-muted);
  cursor: pointer;
  font-size: 0.68rem;
  font-family: var(--font-mono);
}

.drawer-clear:hover {
  color: var(--yellow-primary);
}

.terminal-logs {
  padding: 10px 24px;
  height: 180px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

.log-line {
  color: #b0b0bc;
}

.log-line .log-ts {
  color: #555562;
  margin-right: 8px;
}

.log-line .cyan { color: var(--cyan-accent); font-weight: 600; }
.log-line .yellow { color: var(--yellow-primary); font-weight: 600; }
.log-line .green { color: var(--green-online); font-weight: 600; }
.log-line .red { color: var(--red-dot); font-weight: 600; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-glass {
  background: rgba(15, 15, 22, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-yellow);
  box-shadow: 0 0 35px var(--yellow-glow-subtle), 0 20px 50px rgba(0, 0, 0, 0.8);
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.94) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

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

.modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--yellow-primary);
}

.modal-body {
  padding: 22px;
}

.modal-info {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.modal-info code {
  color: var(--yellow-primary);
  background: rgba(255, 215, 0, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.key-status-msg {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-top: 10px;
  min-height: 20px;
}

.key-status-msg.success { color: var(--green-online); }
.key-status-msg.error { color: var(--red-dot); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(10, 10, 16, 0.6);
  border-top: 1px solid var(--border-glass);
}

/* Preset Modal Styles */
.preset-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.preset-item:hover {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.04);
}

.preset-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 3px;
}

.preset-details {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Token Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 16px;
  border-radius: 10px;
  text-align: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--yellow-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.needle-audit-box {
  background: rgba(10, 10, 16, 0.8);
  border: 1px dashed rgba(255, 215, 0, 0.35);
  border-radius: 8px;
  padding: 14px;
}

.needle-audit-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--yellow-primary);
  margin-bottom: 6px;
}

.needle-audit-desc {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #c0c0cb;
  line-height: 1.5;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(15, 15, 22, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--yellow-primary);
  color: var(--text-white);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--font-main);
  box-shadow: 0 0 20px var(--yellow-glow-subtle), 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  min-width: 250px;
}

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

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }
  .hero-headline {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }
  .tag-badges {
    display: none;
  }
  .hero-headline {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 0.92rem;
  }
  .actions-row {
    flex-direction: column;
    width: 100%;
  }
  .actions-row button {
    width: 100%;
    justify-content: center;
  }
  .terminal-bar {
    padding: 8px 12px;
  }
  .term-active-log {
    display: none;
  }
}
