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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 24px;
  font-weight: 600;
}

.status {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background: #f8f9fa;
}

.welcome-message {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.welcome-message h2 {
  margin-bottom: 12px;
  color: #495057;
}

.message {
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  display: flex;
  justify-content: flex-end;
}

.message.assistant {
  display: flex;
  justify-content: flex-start;
}

.message-content {
  max-width: 70%;
  padding: 16px 20px;
  border-radius: 16px;
  word-wrap: break-word;
}

.message.user .message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.message.assistant .message-content {
  background: white;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.landscape-info {
  background: #e7f3ff;
  border-left: 4px solid #2196F3;
  padding: 12px;
  margin: 12px 0;
  border-radius: 4px;
  font-size: 14px;
}

.plan-info {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  padding: 12px;
  margin: 12px 0;
  border-radius: 4px;
  font-size: 14px;
}

.plan-info ol {
  margin: 8px 0 0 20px;
}

.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px;
  border-radius: 8px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.code-header {
  color: #888;
  font-size: 12px;
  margin-bottom: 8px;
}

.terminal-command {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
  font-family: monospace;
}

.command-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-execute {
  background: #28a745;
  color: white;
}

.btn-execute:hover {
  background: #218838;
}

.btn-cancel {
  background: #dc3545;
  color: white;
}

.btn-cancel:hover {
  background: #c82333;
}

.execution-result {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
  font-family: monospace;
  font-size: 13px;
}

.execution-result.success {
  border-color: #28a745;
  background: #d4edda;
}

.execution-result.error {
  border-color: #dc3545;
  background: #f8d7da;
}

.input-container {
  padding: 20px 30px;
  background: white;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

#userInput {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  resize: none;
  transition: border-color 0.2s;
}

#userInput:focus {
  outline: none;
  border-color: #667eea;
}

#sendBtn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#sendBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#sendBtn:active {
  transform: translateY(0);
}

#sendBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.missing-context {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px;
  margin: 12px 0;
  border-radius: 4px;
  font-size: 14px;
}

.missing-context ul {
  margin: 8px 0 0 20px;
}
