.ide-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.ide-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.ide-tool-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ide-separator {
  width: 1px;
  height: 24px;
  background: var(--glass-border);
  margin: 0 0.5rem;
}

.ide-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.ide-btn:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.ide-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ide-lang-select {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.875rem;
}

.ide-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.ide-toggle input {
  cursor: pointer;
}

.ide-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.ide-editor-wrapper,
.ide-output-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ide-editor-wrapper {
  border-right: 1px solid var(--glass-border);
}

.ide-editor-header,
.ide-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.875rem;
  font-weight: 500;
}

.ide-editor-title,
.ide-output-title {
  color: var(--text-secondary);
}

.ide-editor-lang {
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ide-output-tabs {
  display: flex;
  gap: 0.25rem;
}

.ide-tab {
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.ide-tab:hover {
  background: var(--bg-tertiary);
}

.ide-tab.active {
  background: var(--accent);
  color: white;
}

.ide-editor {
  flex: 1;
  padding: 1rem;
  background: var(--bg-primary);
  border: none;
  color: var(--text-primary);
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  tab-size: 2;
}

.ide-editor::placeholder {
  color: var(--text-secondary);
}

.ide-line-numbers {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1rem 0.5rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: right;
  user-select: none;
  border-right: 1px solid var(--glass-border);
}

.ide-output-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.ide-preview {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.ide-console {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  padding: 1rem;
  overflow-y: auto;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
}

.ide-console.hidden {
  display: none;
}

.ide-console-entry {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.ide-console-entry.error {
  color: #ef4444;
}

.ide-console-entry.warn {
  color: #f59e0b;
}

.ide-console-entry.info {
  color: #3b82f6;
}

@media (max-width: 768px) {
  .ide-container {
    flex-direction: column;
  }

  .ide-editor-wrapper {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    flex: 1;
  }

  .ide-output-wrapper {
    flex: 1;
  }

  .ide-toolbar {
    padding: 0.5rem;
  }

  .ide-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
}
