@import url('style.css');

:root {
  --vscode-bg: #1e1e1e;
  --vscode-activity-bar: #181818;
  --vscode-sidebar: #252526;
  --vscode-titlebar: #181818;
  --vscode-border: #333333;
  --vscode-tab: #2d2d2d;
  --vscode-tab-active: #1e1e1e;
  --vscode-text: #cccccc;
  --vscode-text-light: #ffffff;
  --vscode-accent: #007acc;
  --vscode-hover: #37373d;
}

body.ide-mode {
  margin: 0;
  background: var(--vscode-bg);
  color: var(--vscode-text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Title Bar */
.ide-titlebar {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--vscode-titlebar);
  border-bottom: 1px solid var(--vscode-border);
  padding: 0 10px;
  flex-shrink: 0;
}
.titlebar-menu {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--vscode-text);
}
.titlebar-menu .menu-item {
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
}
.titlebar-menu .menu-item:hover {
  background: var(--vscode-hover);
}
.titlebar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}
.titlebar-search {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 3px 150px;
  font-size: 0.75rem;
  color: var(--vscode-text);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.titlebar-search:hover {
  background: rgba(255,255,255,0.12);
}
.titlebar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ide-action-btn {
  background: transparent;
  border: none;
  color: var(--vscode-text);
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ide-action-btn:hover { background: var(--vscode-hover); }
.ide-action-btn.primary {
  background: var(--vscode-accent);
  color: white;
}
.ide-action-btn.primary:hover {
  background: #0098ff;
}

/* Main Layout */
.ide-main {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Activity Bar */
.ide-activity-bar {
  width: 48px;
  background: var(--vscode-activity-bar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
  border-right: 1px solid var(--vscode-border);
}
.activity-icon {
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #858585;
  font-size: 1.5rem;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.activity-icon:hover { color: var(--vscode-text-light); }
.activity-icon.active {
  color: var(--vscode-text-light);
  border-left: 2px solid var(--vscode-accent);
}

/* Sidebar */
.ide-sidebar {
  width: 250px;
  background: var(--vscode-sidebar);
  border-right: 1px solid var(--vscode-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ide-sidebar-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--vscode-text);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ide-sidebar-actions i {
  margin-left: 8px;
  cursor: pointer;
  color: var(--vscode-text);
  font-size: 0.85rem;
  padding: 3px;
  border-radius: 3px;
}
.ide-sidebar-actions i:hover {
  background: var(--vscode-hover);
  color: var(--vscode-text-light);
}

/* File Tree */
.ide-file-tree {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  font-size: 0.85rem;
}
.ide-file-item {
  padding: 4px 10px 4px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--vscode-text);
}
.ide-file-item:hover { background: var(--vscode-hover); }
.ide-file-item.active { background: #37373d; color: var(--vscode-text-light); }

.ide-folder-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--vscode-text-light);
}
.ide-folder-header:hover { background: var(--vscode-hover); }

/* Editor Area */
.ide-editor-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Editor Tabs */
.ide-tabs {
  display: flex;
  background: var(--vscode-sidebar);
  overflow-x: auto;
  overflow-y: hidden;
  height: 36px;
  min-height: 36px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--vscode-border);
  scrollbar-width: thin;
  scrollbar-color: #424242 transparent;
  user-select: none;
}
.ide-tabs::-webkit-scrollbar { height: 3px; }
.ide-tabs::-webkit-scrollbar-thumb { background: #424242; }
.ide-tab {
  height: 36px;
  padding: 0 12px;
  font-size: 0.78rem;
  background: #2d2d2d;
  border-right: 1px solid #1e1e1e;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #969696;
  flex-shrink: 0;
  transition: background 0.15s;
  border-top: 2px solid transparent;
}
.ide-tab:hover {
  background: #353535;
  color: var(--vscode-text-light);
}
.ide-tab.active {
  background: var(--vscode-bg);
  color: var(--vscode-text-light);
  border-top: 2px solid var(--vscode-accent);
}
.ide-tab-close {
  font-size: 0.85rem;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  opacity: 0.5;
  flex-shrink: 0;
}
.ide-tab-close:hover { opacity: 1; color: #ff5f56; background: rgba(255,255,255,0.1); }

/* Breadcrumbs */
.ide-breadcrumbs {
  height: 24px;
  min-height: 24px;
  background: #1e1e1e;
  border-bottom: 1px solid var(--vscode-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 0.75rem;
  color: #858585;
  gap: 6px;
  user-select: none;
}
.ide-breadcrumbs .crumb-item {
  color: var(--vscode-text);
  cursor: pointer;
}
.ide-breadcrumbs .crumb-item:hover {
  color: var(--vscode-text-light);
  text-decoration: underline;
}
.ide-breadcrumbs .crumb-sep {
  color: #555;
}

.ide-monaco { flex: 1; min-height: 0; background: var(--vscode-bg); }

/* Bottom Panel */
.ide-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--vscode-border);
  height: 250px;
  background: var(--vscode-bg);
}
.ide-terminal-wrap, .ide-preview-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ide-terminal-wrap { border-right: 1px solid var(--vscode-border); }
.ide-panel-head {
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#ideTerminal { flex: 1; padding: 4px 10px; }
#previewFrame { flex: 1; border: none; background: white; width: 100%; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #424242; border: 2px solid var(--vscode-sidebar); }
::-webkit-scrollbar-thumb:hover { background: #4f4f4f; }
