/* VS Code Theme - Complete Visual Studio Code Experience */

/* Import VS Code fonts */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;500;600;700&display=swap');

:root {
  /* VS Code Dark Theme Colors */
  --vscode-bg-primary: #1e1e1e;
  --vscode-bg-secondary: #252526;
  --vscode-bg-tertiary: #2d2d30;
  --vscode-bg-accent: #094771;
  --vscode-bg-hover: #2a2d2e;
  --vscode-bg-active: #37373d;

  /* VS Code Borders */
  --vscode-border: #3c3c3c;
  --vscode-border-light: #464647;
  --vscode-border-focus: #007acc;

  /* VS Code Text Colors */
  --vscode-text-primary: #cccccc;
  --vscode-text-secondary: #969696;
  --vscode-text-muted: #6a6a6a;
  --vscode-text-white: #ffffff;

  /* VS Code Accent Colors */
  --vscode-accent-blue: #007acc;
  --vscode-accent-orange: #ff8c00;
  --vscode-accent-green: #608b4e;
  --vscode-accent-purple: #c586c0;
  --vscode-accent-red: #f14c4c;
  --vscode-accent-yellow: #ffcc02;

  /* VS Code Syntax Colors */
  --vscode-syntax-keyword: #569cd6;
  --vscode-syntax-string: #ce9178;
  --vscode-syntax-comment: #6a9955;
  --vscode-syntax-number: #b5cea8;
  --vscode-syntax-function: #dcdcaa;
  --vscode-syntax-variable: #9cdcfe;

  /* Typography */
  --vscode-font-code: 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  --vscode-font-ui: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Spacing */
  --vscode-padding-xs: 4px;
  --vscode-padding-sm: 8px;
  --vscode-padding-md: 12px;
  --vscode-padding-lg: 16px;
  --vscode-padding-xl: 24px;

  /* Border radius */
  --vscode-radius: 3px;

  /* Shadows */
  --vscode-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --vscode-shadow-light: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Light theme override */
@media (prefers-color-scheme: light) {
  :root {
    --vscode-bg-primary: #ffffff;
    --vscode-bg-secondary: #f3f3f3;
    --vscode-bg-tertiary: #eaeaea;
    --vscode-bg-accent: #0066cc;
    --vscode-bg-hover: #e8e8e8;
    --vscode-bg-active: #e0e0e0;

    --vscode-border: #d1d1d1;
    --vscode-border-light: #c8c8c8;
    --vscode-border-focus: #005fb8;

    --vscode-text-primary: #333333;
    --vscode-text-secondary: #666666;
    --vscode-text-muted: #999999;
    --vscode-text-white: #000000;

    --vscode-accent-blue: #005fb8;
    --vscode-accent-orange: #ca5010;
    --vscode-accent-green: #107c10;
    --vscode-accent-purple: #8764b8;
    --vscode-accent-red: #d13438;
    --vscode-accent-yellow: #ffd23f;
  }
}

/* Base reset and layout */
* {
  box-sizing: border-box;
}

html {
  font-size: 13px; /* VS Code's base font size */
  font-family: var(--vscode-font-ui);
  background: var(--vscode-bg-primary);
  color: var(--vscode-text-primary);
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--vscode-bg-primary);
  color: var(--vscode-text-primary);
  font-family: var(--vscode-font-ui);
  line-height: 1.4;
  height: 100vh;
  overflow: hidden;
}

/* VS Code Application Layout */
.vscode-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--vscode-bg-primary);
}

/* Title Bar */
.vscode-titlebar {
  height: 30px;
  background: var(--vscode-bg-secondary);
  border-bottom: 1px solid var(--vscode-border);
  display: flex;
  align-items: center;
  padding: 0 var(--vscode-padding-sm);
  color: var(--vscode-text-secondary);
  font-size: 11px;
  user-select: none;
}

.vscode-titlebar-title {
  flex: 1;
  text-align: center;
  font-weight: 400;
}

.vscode-titlebar-controls {
  display: flex;
  gap: 2px;
}

.vscode-control-button {
  width: 46px;
  height: 30px;
  background: transparent;
  border: none;
  color: var(--vscode-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.vscode-control-button:hover {
  background: var(--vscode-bg-hover);
}

/* Menu Bar */
.vscode-menubar {
  height: 30px;
  background: var(--vscode-bg-secondary);
  border-bottom: 1px solid var(--vscode-border);
  display: flex;
  align-items: center;
  padding: 0 var(--vscode-padding-sm);
  font-size: 11px;
}

.vscode-menu-item {
  padding: var(--vscode-padding-xs) var(--vscode-padding-sm);
  color: var(--vscode-text-primary);
  text-decoration: none;
  border-radius: var(--vscode-radius);
  transition: background-color 0.1s ease;
}

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

/* Main Content Area */
.vscode-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Activity Bar */
.vscode-activity-bar {
  width: 48px;
  background: var(--vscode-bg-tertiary);
  border-right: 1px solid var(--vscode-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--vscode-padding-sm) 0;
}

.vscode-activity-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vscode-text-secondary);
  cursor: pointer;
  border-radius: var(--vscode-radius);
  margin-bottom: var(--vscode-padding-xs);
  transition: all 0.1s ease;
  position: relative;
}

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

.vscode-activity-item.active {
  background: var(--vscode-bg-active);
  color: var(--vscode-text-white);
}

.vscode-activity-item.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--vscode-accent-blue);
}

/* Sidebar */
.vscode-sidebar {
  width: 300px;
  background: var(--vscode-bg-secondary);
  border-right: 1px solid var(--vscode-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vscode-sidebar-header {
  height: 35px;
  display: flex;
  align-items: center;
  padding: 0 var(--vscode-padding-lg);
  border-bottom: 1px solid var(--vscode-border);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--vscode-text-secondary);
  letter-spacing: 0.5px;
}

.vscode-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--vscode-padding-sm);
}

/* File Explorer */
.vscode-file-item {
  display: flex;
  align-items: center;
  padding: 2px var(--vscode-padding-sm);
  color: var(--vscode-text-primary);
  text-decoration: none;
  border-radius: var(--vscode-radius);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

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

.vscode-file-item.active {
  background: var(--vscode-bg-accent);
  color: var(--vscode-text-white);
}

.vscode-file-icon {
  width: 16px;
  height: 16px;
  margin-right: var(--vscode-padding-sm);
  opacity: 0.8;
}

/* Editor Area */
.vscode-editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--vscode-bg-primary);
  overflow: hidden;
}

/* Tab Bar */
.vscode-tab-bar {
  height: 35px;
  background: var(--vscode-bg-secondary);
  border-bottom: 1px solid var(--vscode-border);
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
}

.vscode-tab {
  height: 35px;
  display: flex;
  align-items: center;
  padding: 0 var(--vscode-padding-lg);
  background: var(--vscode-bg-secondary);
  border-right: 1px solid var(--vscode-border);
  color: var(--vscode-text-secondary);
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
  min-width: 120px;
}

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

.vscode-tab.active {
  background: var(--vscode-bg-primary);
  color: var(--vscode-text-white);
  border-bottom: 2px solid var(--vscode-accent-blue);
}

.vscode-tab-close {
  margin-left: var(--vscode-padding-sm);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.vscode-tab:hover .vscode-tab-close {
  opacity: 0.6;
}

.vscode-tab-close:hover {
  background: var(--vscode-bg-hover);
  opacity: 1;
}

/* Editor Content */
.vscode-editor {
  flex: 1;
  padding: var(--vscode-padding-lg);
  background: var(--vscode-bg-primary);
  overflow-y: auto;
  font-family: var(--vscode-font-code);
  font-size: 14px;
  line-height: 1.6;
}

/* Status Bar */
.vscode-status-bar {
  height: 22px;
  background: var(--vscode-accent-blue);
  color: var(--vscode-text-white);
  display: flex;
  align-items: center;
  padding: 0 var(--vscode-padding-lg);
  font-size: 11px;
  border-top: 1px solid var(--vscode-border);
}

.vscode-status-item {
  margin-right: var(--vscode-padding-lg);
  cursor: pointer;
}

.vscode-status-item:hover {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 2px;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--vscode-font-ui);
  color: var(--vscode-text-white);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: var(--vscode-padding-lg);
}

h1 { font-size: 2rem; color: var(--vscode-syntax-keyword); }
h2 { font-size: 1.5rem; color: var(--vscode-syntax-function); }
h3 { font-size: 1.25rem; color: var(--vscode-syntax-variable); }

p {
  margin-bottom: var(--vscode-padding-lg);
  line-height: 1.6;
}

/* Code Blocks */
code, pre {
  font-family: var(--vscode-font-code);
  background: var(--vscode-bg-secondary);
  border: 1px solid var(--vscode-border);
  border-radius: var(--vscode-radius);
}

code {
  padding: 2px 6px;
  font-size: 0.9em;
  color: var(--vscode-syntax-string);
}

pre {
  padding: var(--vscode-padding-lg);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.4;
  margin: var(--vscode-padding-lg) 0;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--vscode-text-primary);
}

/* Links */
a {
  color: var(--vscode-accent-blue);
  text-decoration: none;
  transition: color 0.1s ease;
}

a:hover {
  color: var(--vscode-accent-orange);
  text-decoration: underline;
}

/* Buttons */
.vscode-button {
  background: var(--vscode-accent-blue);
  color: var(--vscode-text-white);
  border: none;
  padding: var(--vscode-padding-sm) var(--vscode-padding-lg);
  border-radius: var(--vscode-radius);
  font-family: var(--vscode-font-ui);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.vscode-button:hover {
  background: var(--vscode-accent-orange);
}

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

::-webkit-scrollbar-track {
  background: var(--vscode-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--vscode-bg-tertiary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--vscode-border-light);
}

/* Syntax highlighting classes */
.token.comment { color: var(--vscode-syntax-comment); }
.token.keyword { color: var(--vscode-syntax-keyword); }
.token.string { color: var(--vscode-syntax-string); }
.token.number { color: var(--vscode-syntax-number); }
.token.function { color: var(--vscode-syntax-function); }
.token.variable { color: var(--vscode-syntax-variable); }

/* Responsive Design */
@media (max-width: 768px) {
  .vscode-sidebar {
    width: 100%;
    position: absolute;
    z-index: 1000;
    height: calc(100vh - 90px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .vscode-sidebar.open {
    transform: translateX(0);
  }

  .vscode-activity-bar {
    width: 100%;
    height: 48px;
    flex-direction: row;
    justify-content: center;
    border-right: none;
    border-bottom: 1px solid var(--vscode-border);
  }
}