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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

#root {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #1e1e1e;
  color: #cccccc;
}

.app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sidebar {
  min-width: 150px;
  background-color: #252526;
  border-right: 1px solid #3e3e42;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 12px 16px;
  background-color: #2d2d30;
  border-bottom: 1px solid #3e3e42;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #cccccc;
  font-weight: 600;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-container {
  background-color: #1e1e1e;
  overflow: hidden;
  position: relative;
}

.editor-tabs {
  display: flex;
  background-color: #2d2d30;
  border-bottom: 1px solid #3e3e42;
  height: 35px;
}

.editor-tab {
  padding: 8px 16px;
  background-color: #2d2d30;
  color: #969696;
  border-right: 1px solid #3e3e42;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-tab.active {
  background-color: #1e1e1e;
  color: #ffffff;
}

.editor-tab:hover {
  background-color: #2a2a2a;
}

.editor-wrapper {
  height: calc(100% - 35px);
  width: 100%;
}

.terminal-container {
  background-color: #1e1e1e;
  border-top: 1px solid #3e3e42;
  display: flex;
  flex-direction: column;
  min-height: 100px;
}

.terminal-header {
  display: flex;
  background-color: #2d2d30;
  border-bottom: 1px solid #3e3e42;
  height: 35px;
  align-items: center;
  padding: 0 16px;
  font-size: 13px;
}

.terminal-wrapper {
  flex: 1;
  padding: 8px;
  overflow: hidden;
}

/* File tree styles */
.file-tree {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
}

.file-tree-item {
  padding: 4px 8px;
  padding-left: calc(8px + var(--depth) * 16px);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  white-space: nowrap;
}

.file-tree-item:hover {
  background-color: #2a2d2e;
}

.file-tree-item.selected {
  background-color: #37373d;
}

.file-tree-item.directory {
  font-weight: 500;
}

.file-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.expand-icon {
  font-size: 12px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  transition: transform 0.2s;
}

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

.expand-icon-placeholder {
  flex-shrink: 0;
  width: 16px;
  display: inline-block;
}

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

::-webkit-scrollbar-track {
  background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
  background: #424242;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4e4e4e;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #969696;
}

/* Menu bar styles */
.menu-bar {
  height: 35px;
  background-color: #2d2d30;
  border-bottom: 1px solid #3e3e42;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  flex-shrink: 0;
}

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

.menu-logo {
  display: flex;
  align-items: center;
}

.menu-logo img {
  height: 24px;
  width: auto;
  filter: invert(1) brightness(0.95);
}

.menu-items {
  display: flex;
  gap: 4px;
}

.menu-info {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: #969696;
}

.menu-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
  transition: background-color 0.15s;
  user-select: none;
}

.menu-item:hover:not(.disabled) {
  background-color: #37373d;
}

.menu-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.menu-icon {
  font-size: 14px;
}

.menu-shortcut {
  margin-left: 8px;
  font-size: 11px;
  color: #969696;
}

/* Dialog styles */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog {
  background-color: #2d2d30;
  border: 1px solid #3e3e42;
  border-radius: 6px;
  min-width: 400px;
  max-width: 600px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dialog-header {
  padding: 16px 20px;
  border-bottom: 1px solid #3e3e42;
  font-size: 14px;
  font-weight: 600;
}

.dialog-body {
  padding: 20px;
}

.dialog-body label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #cccccc;
}

.dialog-body input {
  width: 100%;
  padding: 8px 12px;
  background-color: #1e1e1e;
  border: 1px solid #3e3e42;
  border-radius: 4px;
  color: #cccccc;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', monospace;
}

.dialog-body input:focus {
  outline: none;
  border-color: #007acc;
}

.dialog-footer {
  padding: 16px 20px;
  border-top: 1px solid #3e3e42;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s;
}

.button-primary {
  background-color: #007acc;
  color: #ffffff;
}

.button-primary:hover {
  background-color: #0098ff;
}

.button-secondary {
  background-color: #3e3e42;
  color: #cccccc;
}

.button-secondary:hover {
  background-color: #4e4e52;
}

/* Context menu styles */
.context-menu {
  position: fixed;
  background-color: #2d2d30;
  border: 1px solid #3e3e42;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  min-width: 160px;
  z-index: 2000;
  padding: 4px 0;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #cccccc;
  user-select: none;
}

.context-menu-item:hover:not(.disabled) {
  background-color: #37373d;
}

.context-menu-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.context-menu-icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.context-menu-separator {
  height: 1px;
  background-color: #3e3e42;
  margin: 4px 0;
}

/* Resizer styles */
.resizer {
  background-color: #3e3e42;
  position: relative;
  z-index: 10;
}

.resizer:hover {
  background-color: #007acc;
}

.resizer-vertical {
  width: 4px;
  cursor: col-resize;
  flex-shrink: 0;
}

.resizer-horizontal {
  height: 4px;
  cursor: row-resize;
  flex-shrink: 0;
}
