:root {
  --primary-color: #2196f3;
  --secondary-color: #607d8b;
  --background-color: #ffffff;
  --text-color: #333333;
  --terminal-bg: #1e1e1e;
  --terminal-text: #ffffff;
  --sent-color: #4caf50;
  --received-color: #2196f3;
  --error-color: #f44336;
  --info-color: #ffc107;
  --success-color: #4caf50;
  --timestamp-color: #757575;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
    'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

.connection-section {
  margin-bottom: 2rem;
  text-align: center;
}

.device-info {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.hidden {
  display: none;
}

.terminal-section {
  margin-bottom: 2rem;
}

.terminal {
  height: 400px;
  background-color: var(--terminal-bg);
  color: var(--terminal-text);
  padding: 1rem;
  border-radius: 4px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 1rem;
}

.terminal .timestamp {
  color: var(--timestamp-color);
  margin-right: 0.5rem;
}

.terminal-line {
  margin-bottom: 0.25rem;
  padding: 0.25rem;
  border-radius: 2px;
  transition: background-color 0.2s ease;
}

.terminal-line:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.terminal-line.sent {
  color: var(--sent-color);
}

.terminal-line.received {
  color: var(--received-color);
}

.terminal-line.error {
  color: var(--error-color);
}

.terminal-line.info {
  color: var(--info-color);
}

.terminal-line.success {
  color: var(--success-color);
}

.input-area {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

input[type='text'] {
  flex: 1;
  padding: 0.5rem;
  border: 2px solid var(--secondary-color);
  border-radius: 4px;
  font-size: 1rem;
}

.controls {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.primary-btn,
.secondary-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
}

.primary-btn:hover {
  background-color: #1976d2;
}

.secondary-btn {
  background-color: var(--secondary-color);
  color: white;
}

.secondary-btn:hover {
  background-color: #455a64;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--secondary-color);
}
