@font-face {
  font-family: 'Noto Emoji';
  src: url('https://www.stevec.dev/c/files/NotoEmoji-Medium.woff2') format('woff2'),
    url('https://www.stevec.dev/c/files/NotoEmoji-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

.sidebar-item-icon {
  font-family: 'Noto Emoji';
}

/* ===== DESIGN TOKENS ===== */
:root {
  /* Dark theme (default) */
  --bg-desktop: #2a2828;
  --bg-window: #2c2828;
  --bg-titlebar: #1a1a1a;
  --bg-tabbar: #161616;
  --bg-tab: #532121;
  --bg-tab-active: #141414;
  --bg-sidebar: #111111;
  --bg-output: #141414;
  --bg-input-block: #1c1e26;
  --bg-input-block-border: #2a2d3e;
  --bg-input: transparent;
  --bg-cmd-block: #1a1c26;
  --bg-cmd-block-border: #252840;
  --bg-autocomplete: #1e2030;
  --bg-autocomplete-hover: #2a2d4a;
  --bg-settings: #191b25;
  --bg-sidebar-item-hover: #1e2030;
  --bg-status: #1a2338;
  --text-primary: #f8f4df;
  --text-secondary: #aeb2ce;
  --text-muted: #666983;
  --text-accent: #a9c3d6;
  --text-cmd: #bfedfd;
  --text-output: #d5d6db;
  --text-error: #f7768e;
  --text-success: #9ece6a;
  --text-warning: #e0af68;
  --text-info: #7dcfff;
  --text-prompt: #7abff7;
  --text-ghost: #3a3d5c;
  --accent-blue: #7ac1f7;
  --accent-purple: #efd137;
  --accent-green: #9ece6a;
  --accent-red: #f7768e;
  --accent-yellow: #e0af68;
  --accent-cyan: #7dcfff;
  --accent-orange: #ff9e64;
  --traffic-red: #ff5f57;
  --traffic-yellow: #febc2e;
  --traffic-green: #28c840;
  --border-color: #252840;
  --border-subtle: #1e2030;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'SF Mono', monospace;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-base: 14px;
  --font-size-sm: 12px;
  --font-size-xs: 11px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-window: 12px;
  --transition-fast: 120ms ease;
  --transition-med: 200ms ease;
  --transition-slow: 350ms ease;
  --shadow-window: 0 32px 80px rgba(0, 0, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-input: 0 0 0 1px var(--bg-input-block-border), 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-dropdown: 0 8px 32px rgba(0, 0, 0, 0.5);
  --scrollbar-thumb: #2a2d4a;
  --scrollbar-track: transparent;
  --sidebar-width: 200px;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg-desktop: #e8eaf0;
  --bg-window: #f5f5f7;
  --bg-titlebar: #ececec;
  --bg-tabbar: #e8e8ea;
  --bg-tab: #dcdce0;
  --bg-tab-active: #f5f5f7;
  --bg-sidebar: #eeeef0;
  --bg-output: #f5f5f7;
  --bg-input-block: #ffffff;
  --bg-input-block-border: #d0d0d8;
  --bg-cmd-block: #f0f0f5;
  --bg-cmd-block-border: #d8d8e0;
  --bg-autocomplete: #ffffff;
  --bg-autocomplete-hover: #e8eaf8;
  --bg-settings: #f5f5f7;
  --bg-sidebar-item-hover: #e0e0e8;
  --bg-status: #e5e5e8;
  --text-primary: #1a1b26;
  --text-secondary: #5a5d72;
  --text-muted: #9a9db2;
  --text-accent: #4a4e6a;
  --text-cmd: #2a2d4a;
  --text-output: #2a2d4a;
  --text-error: #c0392b;
  --text-success: #27ae60;
  --text-warning: #d35400;
  --text-info: #2980b9;
  --text-prompt: #3a5fc0;
  --text-ghost: #c0c0d0;
  --border-color: #d0d0d8;
  --border-subtle: #e0e0e8;
  --scrollbar-thumb: #c0c0d0;
  --scrollbar-track: transparent;
}

/* ===== DRACULA THEME ===== */
[data-theme="dracula"] {
  --bg-desktop: #191a21;
  --bg-window: #21222c;
  --bg-titlebar: #272935;
  --bg-tabbar: #191a21;
  --bg-tab: #1e2029;
  --bg-tab-active: #21222c;
  --bg-sidebar: #191a21;
  --bg-output: #21222c;
  --bg-input-block: #282a36;
  --bg-input-block-border: #44475a;
  --bg-cmd-block: #282a36;
  --bg-cmd-block-border: #44475a;
  --bg-autocomplete: #282a36;
  --bg-autocomplete-hover: #384757;
  --bg-settings: #21222c;
  --bg-sidebar-item-hover: #282a36;
  --bg-status: #191a21;
  --text-primary: #f8f8f2;
  --text-secondary: #6291a4;
  --text-cmd: #a8d8ff;
  --text-error: #ff5555;
  --text-success: #50fa7b;
  --text-warning: #ffb86c;
  --text-info: #8be9fd;
  --text-prompt: #1c3f80;
  --text-ghost: #44475a;
  --accent-purple: #1c3f80;
  --accent-green: #50fa7b;
  --border-color: #44475a;
  --scrollbar-thumb: #44475a;
}

/* ===== NORD THEME ===== */
[data-theme="nord"] {
  --bg-desktop: #242933;
  --bg-window: #2e3440;
  --bg-titlebar: #3b4252;
  --bg-tabbar: #2e3440;
  --bg-tab: #373e4d;
  --bg-tab-active: #2e3440;
  --bg-sidebar: #272c36;
  --bg-output: #2e3440;
  --bg-input-block: #3b4252;
  --bg-input-block-border: #4c566a;
  --bg-cmd-block: #374055;
  --bg-cmd-block-border: #4c566a;
  --bg-autocomplete: #3b4252;
  --bg-autocomplete-hover: #4c566a;
  --bg-settings: #2e3440;
  --bg-sidebar-item-hover: #3b4252;
  --bg-status: #272c36;
  --text-primary: #eceff4;
  --text-secondary: #7b88a1;
  --text-cmd: #d8dee9;
  --text-error: #bf616a;
  --text-success: #a3be8c;
  --text-warning: #ebcb8b;
  --text-info: #88c0d0;
  --text-prompt: #56a2ee;
  --text-ghost: #4c566a;
  --accent-blue: #81a1c1;
  --accent-green: #a3be8c;
  --border-color: #4c566a;
  --scrollbar-thumb: #4c566a;
}

/* ===== GRUVBOX THEME ===== */
[data-theme="gruvbox"] {
  --bg-desktop: #1d2021;
  --bg-window: #282828;
  --bg-titlebar: #3c3836;
  --bg-tabbar: #282828;
  --bg-tab: #32302f;
  --bg-tab-active: #282828;
  --bg-sidebar: #222222;
  --bg-output: #282828;
  --bg-input-block: #3c3836;
  --bg-input-block-border: #504945;
  --bg-cmd-block: #32302f;
  --bg-cmd-block-border: #504945;
  --bg-autocomplete: #3c3836;
  --bg-autocomplete-hover: #504945;
  --bg-settings: #282828;
  --bg-sidebar-item-hover: #3c3836;
  --bg-status: #1d2021;
  --text-primary: #ebdbb2;
  --text-secondary: #928374;
  --text-cmd: #d5c4a1;
  --text-error: #fb4934;
  --text-success: #b8bb26;
  --text-warning: #fabd2f;
  --text-info: #83a598;
  --text-prompt: #fe8019;
  --text-ghost: #504945;
  --accent-orange: #fe8019;
  --accent-green: #b8bb26;
  --border-color: #504945;
  --scrollbar-thumb: #504945;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-desktop);
}

body {
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-med);
}

/* ===== DESKTOP ===== */
#desktop {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 40%, rgba(122, 162, 247, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(187, 154, 247, 0.03) 0%, transparent 60%),
    var(--bg-desktop);
}

/* ===== TERMINAL WINDOW ===== */
.terminal-window {
  width: min(1200px, 96vw);
  height: min(760px, 94vh);
  background: var(--bg-window);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-window);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-med);
  position: relative;
}

.terminal-window--maximized {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

/* ===== TITLE BAR ===== */
.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  background: var(--bg-titlebar);
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  -webkit-app-region: drag;
  user-select: none;
  transition: background var(--transition-med);
}

.title-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-bar-center {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-secondary);
}

.title-bar-icon {
  font-family: 'Noto Emoji';
  font-size: 14px;
  filter: drop-shadow(0 0 6px rgba(122, 162, 247, 0.6));
}

.title-bar-title {
  color: var(--text-primary);
  font-weight: 500;
}

.title-bar-subtitle {
  color: var(--text-muted);
  font-size: 12px;
}

.title-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Traffic lights */
.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  position: relative;
}

.traffic-light::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.title-bar-left:hover .traffic-light::after {
  opacity: 1;
}

.traffic-light--close {
  background: var(--traffic-red);
}

.traffic-light--minimize {
  background: var(--traffic-yellow);
}

.traffic-light--maximize {
  background: var(--traffic-green);
}

.traffic-light:hover {
  transform: scale(1.15);
}

/* Title bar buttons */
.title-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 26px;
  height: 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.title-btn:hover {
  background: var(--bg-tab);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

/* ===== TAB BAR ===== */
.tab-bar {
  display: flex;
  align-items: stretch;
  height: 36px;
  background: var(--bg-tabbar);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  padding: 0 8px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  transition: background var(--transition-med);
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tabs-container {
  display: flex;
  align-items: stretch;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg-tab);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: var(--font-size-sm);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  border: 1px solid transparent;
  border-bottom: none;
  position: relative;
  min-width: 90px;
  max-width: 180px;
}

.tab:hover {
  background: var(--bg-cmd-block);
  color: var(--text-primary);
}

.tab--active {
  background: var(--bg-tab-active);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--bg-tab-active);
}

.tab-icon {
  font-family: 'Noto Emoji';
  font-size: 11px;
}

.tab-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.tab-close:hover {
  background: rgba(247, 118, 142, 0.2);
  color: var(--text-error);
}

.add-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.add-tab-btn:hover {
  background: var(--bg-tab);
  color: var(--text-primary);
}

/* ===== TERMINAL BODY ===== */
.terminal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: width var(--transition-med), background var(--transition-med);
  --scrollbar-thumb: var(--border-color);
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {
  .sidebar::-webkit-scrollbar {
    width: 6px;
  }

  .sidebar::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
  }

  .sidebar::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

.sidebar.sidebar--hidden {
  width: 0;
  overflow: hidden;
}

.sidebar-section {
  padding: 12px 0;
}

.sidebar-label {
  padding: 4px 12px 6px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-family: var(--font-ui);
}

.sidebar-items {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0;
}

.sidebar-item:hover {
  background: var(--bg-sidebar-item-hover);
  color: var(--text-primary);
}

.sidebar-item-icon {
  font-size: 13px;
  flex-shrink: 0;
}

/* ===== MAIN PANE ===== */
.main-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-output);
  transition: background var(--transition-med);
}

/* ===== WELCOME BLOCK ===== */
.welcome-block {
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ascii-art {
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.2;
  color: var(--accent-blue);
  opacity: 0.5;
  white-space: pre;
  overflow: hidden;
  margin-bottom: 12px;
}

.welcome-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.welcome-title {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(122, 162, 247, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(122, 162, 247, 0.3);
  font-family: var(--font-ui);
  letter-spacing: 0.03em;
}

.welcome-sub {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: var(--bg-titlebar);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-accent);
  box-shadow: 0 1px 0 var(--border-color);
}

/* ===== OUTPUT AREA ===== */
.output-area {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  --scrollbar-thumb: #2a2d4a;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {
  .output-area::-webkit-scrollbar {
    width: 6px;
  }

  .output-area::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
  }

  .output-area::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

/* ===== COMMAND BLOCK (Warp-style) ===== */
.cmd-block {
  margin: 4px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-cmd-block);
  border: 1px solid var(--bg-cmd-block-border);
  overflow: hidden;
  animation: block-enter 0.15s ease forwards;
}

@keyframes block-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

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

.cmd-block-header {
  display: flex;
  align-items: center;
  padding: 6px 12px 4px;
  gap: 10px;
  border-bottom: 1px solid var(--bg-cmd-block-border);
  background: rgba(0, 0, 0, 0.1);
}

.cmd-block-header .prompt-cwd {
  font-size: 11px;
  color: var(--accent-blue);
  font-weight: 500;
}

.cmd-block-header .prompt-branch {
  font-size: 11px;
  color: var(--accent-purple);
}

.cmd-block-header .prompt-sep {
  font-size: 10px;
  color: var(--text-muted);
}

.cmd-block-timing {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.cmd-block-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cmd-block-status--success {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.cmd-block-status--error {
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
}

.cmd-block-status--running {
  background: var(--accent-yellow);
  box-shadow: 0 0 6px var(--accent-yellow);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.cmd-block-command {
  padding: 8px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cmd-block-prompt {
  color: var(--text-prompt);
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.cmd-block-text {
  color: var(--text-cmd);
  font-size: 13px;
  flex: 1;
  word-break: break-all;
}

.cmd-block-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.cmd-block:hover .cmd-block-actions {
  opacity: 1;
}

.cmd-block-action {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.cmd-block-action:hover {
  background: var(--bg-autocomplete-hover);
  color: var(--text-primary);
}

.dada-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 4px 12px;
  font-size: 11px !important;
  border-color: var(--border-color);
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast);
}

.dada-copy-btn:hover {
  background: rgba(122, 162, 247, 0.12);
  color: var(--accent-blue) !important;
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.dada-copy-btn:active {
  transform: translateY(0);
}

.cmd-block-output {
  padding: 6px 12px 10px 34px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-output);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.cmd-block-output.output--error {
  color: var(--text-error);
}

.cmd-block-output.output--success {
  color: var(--text-success);
}

.cmd-block-output a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* Syntax-colored parts */
.tok-cmd {
  color: var(--accent-blue);
  font-weight: 500;
}

.tok-flag {
  color: var(--accent-green);
}

.tok-string {
  color: var(--accent-yellow);
}

.tok-path {
  color: var(--accent-cyan);
}

.tok-number {
  color: var(--accent-orange);
}

.tok-comment {
  color: var(--text-muted);
  font-style: italic;
}

.tok-error-kw {
  color: var(--text-error);
  font-weight: 600;
}

.tok-ok-kw {
  color: var(--text-success);
  font-weight: 600;
}

.tok-muted {
  color: var(--text-muted);
  opacity: 0.7;
}

.tok-warning {
  color: var(--text-warning);
  font-weight: 600;
}

.tok-accent {
  color: var(--accent-purple);
  font-weight: 500;
}

.tok-info {
  color: var(--text-info);
}

/* ===== INPUT BLOCK ===== */
.input-block {
  background: var(--bg-input-block);
  border-top: 1px solid var(--bg-input-block-border);
  border-radius: 0 0 0 0;
  padding: 10px 16px 12px;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transition: background var(--transition-med);
}

.input-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.prompt-cwd {
  font-size: 12px;
  color: var(--accent-blue);
  font-weight: 600;
}

.prompt-sep {
  font-size: 11px;
  color: var(--text-muted);
}

.prompt-branch {
  font-size: 11px;
  color: var(--accent-purple);
}

.prompt-timing {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompt-symbol {
  color: var(--text-prompt);
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  user-select: none;
  transition: color var(--transition-fast);
}

.input-wrapper {
  flex: 1;
  position: relative;
  min-height: 22px;
}

.cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  line-height: 1.5;
  caret-color: var(--accent-blue);
  min-height: 22px;
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
}

.cmd-input::-webkit-scrollbar {
  display: none;
}

.cmd-input:empty::before {
  content: 'Type a command...';
  color: var(--text-muted);
  pointer-events: none;
}

.autocomplete-ghost {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  line-height: 1.5;
  white-space: pre;
  z-index: 0;
}

.run-btn {
  background: rgba(122, 162, 247, 0.12);
  border: 1px solid rgba(122, 162, 247, 0.3);
  color: var(--accent-blue);
  width: 30px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.run-btn:hover {
  background: rgba(122, 162, 247, 0.25);
  border-color: var(--accent-blue);
  transform: scale(1.05);
}

.run-btn:active {
  transform: scale(0.95);
}

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.autocomplete-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 16px;
  right: 16px;
  background: var(--bg-autocomplete);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  z-index: 100;
  overflow: hidden;
  animation: dropdown-enter 0.1s ease;
}

@keyframes dropdown-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

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

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-subtle);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.autocomplete-item--selected {
  background: var(--bg-autocomplete-hover);
}

.autocomplete-item-icon {
  font-size: 13px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.autocomplete-item-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.autocomplete-item-match {
  color: var(--accent-blue);
}

.autocomplete-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  white-space: nowrap;
}

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
  background: var(--bg-status);
  border-top: 1px solid var(--border-subtle);
  padding: 0 12px;
  font-family: var(--font-ui);
  font-size: var(--font-size-xs);
  flex-shrink: 0;
  transition: background var(--transition-med);
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-item {
  color: var(--text-muted);
}

.status-pill {
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-pill--green {
  background: rgba(158, 206, 106, 0.15);
  color: var(--accent-green);
}

.status-pill--red {
  background: rgba(247, 118, 142, 0.15);
  color: var(--accent-red);
}

.status-pill--yellow {
  background: rgba(224, 175, 104, 0.15);
  color: var(--accent-yellow);
}

/* ===== SETTINGS PANEL ===== */
.settings-panel {
  position: absolute;
  top: 40px;
  right: 16px;
  width: 300px;
  background: var(--bg-settings);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  z-index: 200;
  animation: dropdown-enter 0.15s ease;
  font-family: var(--font-ui);
  transition: background var(--transition-med);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

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

.settings-body {
  padding: 8px 0;
}

.setting-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}

.setting-group + .setting-group {
  border-top: 1px solid var(--border-subtle);
}

.setting-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.setting-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.theme-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.theme-btn:hover {
  background: var(--bg-autocomplete-hover);
  color: var(--text-primary);
}

.theme-btn--active {
  background: rgba(122, 162, 247, 0.15);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.setting-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
}

.setting-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(122, 162, 247, 0.4);
  transition: transform var(--transition-fast);
}

.setting-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.setting-value {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 11px;
  transition: background var(--transition-med);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  left: 3px;
  top: 3px;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-blue);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
  box-shadow: 0 0 6px rgba(122, 162, 247, 0.5);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-autocomplete);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 13px;
  box-shadow: var(--shadow-dropdown);
  z-index: 1000;
  animation: toast-in 0.2s ease;
  max-width: 300px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.toast-out {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(122, 162, 247, 0.25);
  color: var(--text-primary);
}

/* ===== SCROLLBAR GLOBAL ===== */
* {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .sidebar {
    display: none;
  }

  .ascii-art {
    display: none;
  }

  .terminal-window {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
  }
}

/* ===== REDUCED MOTION ===== */
.no-animations *,
.no-animations *::before,
.no-animations *::after {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}