/* Global Resets & Styling Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

/* Custom Scrollbars to align with theme */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* JetBrains Mono for Code */
code, pre, #terminal-panel, .window-center-search {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* --- VSCODE THEME DEFINITIONS --- */

/* Dracula Theme (Default) */
.theme-dracula {
  --bg-titlebar: #191a21;
  --bg-activity: #1e1f29;
  --bg-sidebar: #21222c;
  --bg-editor: #282a36;
  --bg-tabs: #191a21;
  --bg-tab-active: #282a36;
  --bg-tab-inactive: #191a21;
  --bg-statusbar: #191a21;
  --bg-terminal: #1e1f29;
  --bg-palette: #21222c;
  --bg-menu: #21222c;
  
  --text-main: #f8f8f2;
  --text-muted: #6272a4;
  --text-active: #f8f8f2;
  
  --border-color: #191a21;
  --border-active: #bd93f9;
  
  --accent: #ff79c6;
  --accent-secondary: #8be9fd;
  --accent-tertiary: #50fa7b;
  --accent-yellow: #f1fa8c;
  --accent-orange: #ffb86c;
  
  --shadow: rgba(0, 0, 0, 0.4);
}

/* One Dark Pro Theme */
.theme-onedark {
  --bg-titlebar: #1e2227;
  --bg-activity: #21252b;
  --bg-sidebar: #21252b;
  --bg-editor: #282c34;
  --bg-tabs: #21252b;
  --bg-tab-active: #282c34;
  --bg-tab-inactive: #21252b;
  --bg-statusbar: #21252b;
  --bg-terminal: #21252b;
  --bg-palette: #282c34;
  --bg-menu: #282c34;
  
  --text-main: #abb2bf;
  --text-muted: #5c6370;
  --text-active: #ffffff;
  
  --border-color: #181a1f;
  --border-active: #61afef;
  
  --accent: #c678dd;
  --accent-secondary: #56b6c2;
  --accent-tertiary: #98c379;
  --accent-yellow: #e5c07b;
  --accent-orange: #d19a66;
  
  --shadow: rgba(0, 0, 0, 0.3);
}

/* Cyberpunk Neon Theme */
.theme-cyberpunk {
  --bg-titlebar: #0d0115;
  --bg-activity: #12011d;
  --bg-sidebar: #170125;
  --bg-editor: #1c022d;
  --bg-tabs: #12011d;
  --bg-tab-active: #1c022d;
  --bg-tab-inactive: #12011d;
  --bg-statusbar: #f3e600;
  --bg-terminal: #12011d;
  --bg-palette: #1c022d;
  --bg-menu: #1c022d;
  
  --text-main: #00ff66;
  --text-muted: #9d00ff;
  --text-active: #ff007f;
  
  --border-color: #ff007f;
  --border-active: #00f0ff;
  
  --accent: #ff007f;
  --accent-secondary: #00f0ff;
  --accent-tertiary: #f3e600;
  --accent-yellow: #ffff00;
  --accent-orange: #ff9900;
  
  --shadow: rgba(255, 0, 127, 0.2);
}

/* GitHub Light Theme */
.theme-github-light {
  --bg-titlebar: #f6f8fa;
  --bg-activity: #24292e;
  --bg-sidebar: #f6f8fa;
  --bg-editor: #ffffff;
  --bg-tabs: #f6f8fa;
  --bg-tab-active: #ffffff;
  --bg-tab-inactive: #f6f8fa;
  --bg-statusbar: #24292e;
  --bg-terminal: #f6f8fa;
  --bg-palette: #ffffff;
  --bg-menu: #ffffff;
  
  --text-main: #24292e;
  --text-muted: #959da5;
  --text-active: #005cc5;
  
  --border-color: #e1e4e8;
  --border-active: #0366d6;
  
  --accent: #d73a49;
  --accent-secondary: #005cc5;
  --accent-tertiary: #22863a;
  --accent-yellow: #b07219;
  --accent-orange: #e36209;
  
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Monokai Retro Theme */
.theme-monokai {
  --bg-titlebar: #191919;
  --bg-activity: #222222;
  --bg-sidebar: #272822;
  --bg-editor: #272822;
  --bg-tabs: #191919;
  --bg-tab-active: #272822;
  --bg-tab-inactive: #191919;
  --bg-statusbar: #3e3d32;
  --bg-terminal: #1e1f1c;
  --bg-palette: #272822;
  --bg-menu: #272822;
  
  --text-main: #f8f8f2;
  --text-muted: #75715e;
  --text-active: #a6e22e;
  
  --border-color: #1e1f1c;
  --border-active: #f92672;
  
  --accent: #f92672;
  --accent-secondary: #66d9ef;
  --accent-tertiary: #a6e22e;
  --accent-yellow: #e6db74;
  --accent-orange: #fd971f;
  
  --shadow: rgba(0, 0, 0, 0.5);
}

/* Apply theme colors */
body[class^="theme-"] {
  background-color: var(--bg-editor);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Window Layout Wrapper */
#vscode-window {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  box-shadow: 0 10px 30px var(--shadow);
}

/* --- 1. TITLE BAR --- */
#title-bar {
  background-color: var(--bg-titlebar);
  color: var(--text-muted);
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.window-left-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.control-dot.close { background-color: #ff5f56; }
.control-dot.minimize { background-color: #ffbd2e; }
.control-dot.maximize { background-color: #27c93f; }

.window-menu-items {
  display: flex;
  gap: 12px;
  margin-left: 15px;
  font-weight: 400;
  cursor: pointer;
}
.window-menu-items span:hover {
  color: var(--text-main);
}

.window-center-search {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 450px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.window-center-search:hover {
  background-color: rgba(255, 255, 255, 0.10);
  border-color: var(--border-active);
}
.search-icon {
  width: 12px !important;
  height: 12px !important;
}

.window-right-actions {
  color: var(--text-muted);
  font-size: 11px;
}

/* --- 2. WORKSPACE SPLIT LAYOUT --- */
#workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* 2.1 ACTIVITY BAR */
#activity-bar {
  background-color: var(--bg-activity);
  width: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-right: 1px solid var(--border-color);
  z-index: 5;
}

.activity-top-group, .activity-bottom-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.activity-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: color 0.15s ease;
}

.activity-btn i {
  width: 24px;
  height: 24px;
}

.activity-btn:hover {
  color: var(--text-main);
}

.activity-btn.active {
  color: var(--text-active);
}

.activity-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 2px;
  background-color: var(--border-active);
}

.activity-btn .badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: var(--border-active);
  color: var(--bg-activity);
  font-size: 9px;
  font-weight: bold;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-btn .badge.dot {
  width: 6px;
  height: 6px;
  bottom: 12px;
  right: 12px;
}

.avatar-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--text-muted);
}
.activity-btn:hover .avatar-icon {
  border-color: var(--border-active);
}

/* 2.2 SIDEBAR (FILE EXPLORER) */
#sidebar {
  background-color: var(--bg-sidebar);
  width: 240px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  font-size: 13px;
  z-index: 4;
  transition: width 0.2s ease, min-width 0.2s ease, transform 0.2s ease;
}

#sidebar.collapsed {
  width: 0px !important;
  min-width: 0px !important;
  border-right: none;
  overflow: hidden;
}

.sidebar-header {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

#sidebar-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}
#sidebar-close-btn:hover {
  color: var(--text-main);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  text-transform: uppercase;
  font-size: 11px;
}

.chevron-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.file-tree {
  list-style: none;
  padding-left: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  margin: 1px 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.file-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.file-item.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-active);
  font-weight: 500;
}

.file-icon {
  width: 16px;
  height: 16px;
}

/* Colored file icons */
.js-icon { color: var(--accent-yellow); }
.json-icon { color: var(--accent-tertiary); }
.py-icon { color: var(--accent-secondary); }
.go-icon { color: #00add8; }
.css-icon { color: var(--accent); }
.md-icon { color: var(--accent-orange); }

/* Github Contributions graph simulation */
.github-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  margin-top: 12px;
}
.contrib-box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.07);
}
.contrib-level-1 { background-color: #0e4429; }
.contrib-level-2 { background-color: #006d32; }
.contrib-level-3 { background-color: #26a641; }
.contrib-level-4 { background-color: #39d353; }

.theme-github-light .contrib-box {
  background-color: #ebedf0;
}
.theme-github-light .contrib-level-1 { background-color: #9be9a8; }
.theme-github-light .contrib-level-2 { background-color: #40c463; }
.theme-github-light .contrib-level-3 { background-color: #30a14e; }
.theme-github-light .contrib-level-4 { background-color: #216e39; }

/* 2.3 EDITOR WORKSPACE & VIEWS */
#editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-editor);
}

/* Tabs Bar */
#tabs-bar {
  background-color: var(--bg-tabs);
  height: 35px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.tabs-scroll-container {
  display: flex;
  height: 100%;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}
.tabs-scroll-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.tabs-actions {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  border-left: 1px solid var(--border-color);
  background-color: var(--bg-tabs);
  flex-shrink: 0;
}

.tabs-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}
.tabs-actions button:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}
.tabs-actions button i, .tabs-actions button svg {
  width: 14px;
  height: 14px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 35px;
  background-color: var(--bg-tab-inactive);
  border-right: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s, color 0.15s;
}

.tab:hover {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

.tab.active {
  background-color: var(--bg-tab-active);
  color: var(--text-active);
  font-weight: 500;
}

.tab.active::top {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--border-active);
}
/* Active Tab top line */
.tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-active);
}

.tab-close {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  color: var(--text-muted);
  transition: background-color 0.15s, color 0.15s;
}
.tab-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* Breadcrumbs bar */
#breadcrumbs {
  background-color: var(--bg-editor);
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 4px;
}
.crumb.active-crumb {
  color: var(--text-main);
}
.crumb-sep {
  width: 10px;
  height: 10px;
  margin: 0 4px;
}

/* Editor Workspace Container */
#editor-workspace {
  flex: 1;
  display: flex;
  overflow: auto;
  position: relative;
}

.editor-line-numbers {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  width: 48px;
  text-align: right;
  padding: 16px 12px 16px 0;
  color: rgba(255, 255, 255, 0.25);
  font-size: 13px;
  line-height: 1.5;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.editor-code {
  flex: 1;
  padding: 16px;
  overflow: auto;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre;
}

/* Syntax Highlighting */
.keyword { color: var(--accent); font-weight: bold; }
.string { color: var(--accent-yellow); }
.comment { color: var(--text-muted); font-style: italic; }
.number { color: var(--accent-orange); }
.function { color: var(--accent-secondary); }
.type { color: var(--accent-tertiary); }
.boolean { color: var(--accent-orange); }

/* Embedded interactive overlay component styling */
#interactive-preview {
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background-color: rgba(15, 16, 22, 0.95);
  border-left: 1px solid var(--border-color);
  padding: 24px;
  overflow-y: auto;
  z-index: 3;
  box-shadow: -5px 0 25px rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease;
}

#interactive-preview.hidden {
  transform: translateX(100%);
}

#close-preview-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  z-index: 10;
}
#close-preview-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}
#close-preview-btn i, #close-preview-btn svg {
  width: 14px;
  height: 14px;
}

.preview-title {
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Cards style for skills, projects */
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  background: rgba(255,255,255,0.05);
}

.card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: rgba(255,255,255,0.1);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Contact/Link icons */
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--border-active);
  color: var(--bg-editor);
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
  margin-top: 10px;
}
.contact-btn:hover {
  opacity: 0.9;
}

/* User Avatar inside Code editor (about page) */
.about-header-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border-active);
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* --- 2.4 TERMINAL PANEL --- */
#terminal-panel {
  background-color: var(--bg-terminal);
  border-top: 1px solid var(--border-color);
  height: 200px;
  display: flex;
  flex-direction: column;
  z-index: 6;
  transition: height 0.2s ease;
}

#terminal-panel.collapsed {
  height: 35px !important;
}

#terminal-panel.expanded {
  height: 400px;
}

.terminal-header {
  height: 35px;
  background-color: var(--bg-titlebar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  border-bottom: 1px solid var(--border-color);
}

.terminal-tabs {
  display: flex;
  gap: 16px;
  height: 100%;
}

.terminal-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: bold;
  height: 100%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
}

.terminal-tab.active {
  color: var(--text-active);
}

.terminal-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--border-active);
}

.problem-count {
  background-color: var(--text-muted);
  color: var(--bg-terminal);
  padding: 0 5px;
  border-radius: 10px;
  font-size: 9px;
  margin-left: 2px;
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.terminal-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}
.terminal-actions button:hover {
  color: var(--text-main);
}
.terminal-actions button i, .terminal-actions button svg {
  width: 14px;
  height: 14px;
}

.terminal-body {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

.terminal-pane.hidden {
  display: none !important;
}

#terminal-panel.collapsed .terminal-body {
  display: none;
}

.terminal-output {
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-line {
  margin-bottom: 4px;
}

.text-accent { color: var(--accent-secondary); }
.cmd-highlight { color: var(--accent-yellow); font-weight: bold; }
.error-text { color: var(--accent); }

.terminal-prompt-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.prompt-prefix {
  color: var(--accent-tertiary);
  font-weight: bold;
}

#terminal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: inherit;
}

/* --- 3. STATUS BAR (FOOTER) --- */
#status-bar {
  background-color: var(--bg-statusbar);
  height: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  z-index: 10;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  height: 100%;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 100%;
  cursor: pointer;
  transition: background-color 0.15s;
}

.status-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.git-status {
  background-color: rgba(255, 255, 255, 0.03);
}

.status-item i, .status-item svg {
  width: 12px;
  height: 12px;
}

.problem-status i {
  color: var(--accent);
}

/* --- COMMAND PALETTE (MODAL) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  padding-top: 50px;
  z-index: 100;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-content {
  background-color: var(--bg-palette);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.palette-input-wrapper {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}

.palette-indicator {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

#palette-search {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  padding-left: 8px;
}

.palette-options {
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
}

.palette-item {
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.palette-item:hover, .palette-item.selected {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-active);
}

.palette-item .shortcut {
  font-size: 11px;
  opacity: 0.6;
}

/* --- DROPDOWN MENUS --- */
.dropdown-menu {
  position: absolute;
  bottom: 25px;
  right: 10px;
  background-color: var(--bg-menu);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  z-index: 105;
  width: 180px;
}

.dropdown-menu.hidden {
  display: none !important;
}

.menu-header {
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.menu-list {
  list-style: none;
}

.menu-item {
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
}
.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}
.menu-item.active {
  color: var(--text-active);
  font-weight: 600;
}

/* Help highlight */
.cmd-highlight {
  cursor: pointer;
  text-decoration: underline;
}

/* --- RESPONSIVENESS AND COLLAPSIBILITY --- */
@media (max-width: 768px) {
  #sidebar {
    position: absolute;
    left: 50px;
    top: 35px;
    height: calc(100% - 57px);
    width: calc(100vw - 50px);
    max-width: 280px;
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
  }
  
  #interactive-preview {
    width: 100%;
    height: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
  
  .window-center-search {
    width: 180px;
  }
  
  .search-placeholder {
    display: none;
  }
  
  .window-center-search::after {
    content: 'Command Palette';
    font-size: 10px;
  }
  
  .window-menu-items {
    display: none;
  }
  
  .window-right-actions {
    display: none;
  }
  
  #terminal-panel {
    height: 130px;
  }
  
  #terminal-panel.expanded {
    height: 250px;
  }

  .terminal-tabs {
    gap: 8px;
  }

  .terminal-tab {
    font-size: 10px;
  }

  .terminal-actions {
    gap: 8px;
  }
  
  /* Hide unnecessary status bar indicators on mobile */
  #status-bar .status-right .status-item:not(.theme-status) {
    display: none;
  }
  
  #status-bar .status-center {
    display: none;
  }
  
  .modal-content {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .window-center-search {
    width: 40px;
    padding: 0;
  }
  .window-center-search::after {
    display: none;
  }
  
  /* Adjust workspace layout margins */
  .editor-line-numbers {
    width: 35px;
    font-size: 11px;
    padding-right: 6px;
  }
  
  .editor-code {
    padding: 10px;
    font-size: 12px;
  }

  /* Make terminal tabs scrollable horizontally so they fit inline */
  .terminal-tabs {
    max-width: calc(100vw - 110px);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    white-space: nowrap;
    gap: 6px;
  }
  .terminal-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
  .terminal-tab {
    font-size: 9px;
    padding: 0 4px;
    flex-shrink: 0;
  }
  .terminal-actions {
    gap: 6px;
  }
  .terminal-actions button i, .terminal-actions button svg {
    width: 12px;
    height: 12px;
  }
}
