body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #1e1e1e;
  color: #ccc;
}

/* Контейнер для клиентов (первая строчка) */
#clients {
  background: #2d2d2d;
  border-bottom: 1px solid #555;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  height: 35px;
  position: relative;
  z-index: 10;
  align-items: center;
  padding: 0 8px;
}

/* Стили для клиентов */
.client {
  background: #3c3c3c;
  border: 1px solid #555;
  border-radius: 4px 4px 0 0;
  margin: 0 4px;
  min-width: 100px;
  height: 30px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  color: #ccc;
  position: relative;
}

.client:hover {
  background: #4c4c4c;
}

.client.active {
  background: #007acc !important;
  color: white !important;
  border-color: #007acc !important;
}

.client.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.client.drag-over {
  border-left: 3px solid #007acc;
}

.client-header {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.client-name {
  flex: 1;
  font-weight: bold;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-type {
  margin-left: 6px;
  font-size: 8px;
  color: #999;
  white-space: nowrap;
}

.client-close {
  margin-left: 6px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
  opacity: 0.7;
}

.client-close:hover {
  background: rgba(255,255,255,0.2);
  opacity: 1;
}

/* Контейнер для сессий (вторая строчка) */
#sessions {
  background: #2a2a2a;
  border-bottom: 1px solid #555;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  height: 35px;
  position: relative;
  z-index: 10;
  align-items: center;
  padding: 0 8px;
}

/* Стили для сессий */
.session {
  background: #3c3c3c;
  border: 1px solid #555;
  border-radius: 4px 4px 0 0;
  margin: 0 4px;
  min-width: 80px;
  height: 30px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #ccc;
  position: relative;
  padding: 0 8px;
}

.session:hover {
  background: #4c4c4c;
}

.session.active {
  background: #007acc;
  color: white;
  border-color: #007acc;
}

.session.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.session.drag-over {
  border-left: 3px solid #007acc;
}

.session-status {
  margin-right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
}

.session-name {
  flex: 1;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-close {
  margin-left: 6px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
  opacity: 0.7;
}

.session-close:hover {
  background: rgba(255,255,255,0.2);
  opacity: 1;
}

/* Контейнер терминала */
#terminal-container {
  position: absolute;
  top: 70px; /* Отступ сверху для двух строчек табов */
  left: 0;
  width: 100%;
  height: calc(100% - 70px); /* Вычитаем высоту двух строчек табов */
  background: #000;
}

#terminal {
  width: 100%;
  height: 100%;
}

/* Кнопка нового клиента */
.new-client-btn {
  background: #3c3c3c;
  color: #ccc;
  padding: 4px 8px;
  border: 1px solid #555;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-size: 11px;
  min-width: 100px;
  height: 30px;
  margin: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.new-client-btn:hover {
  background: #4c4c4c;
}

.new-client-btn.active {
  background: #007acc;
  color: white;
  border-color: #007acc;
}

.new-client-btn.showing-instructions {
  background: #007acc;
  color: white;
  border-color: #007acc;
}

/* Кнопка новой сессии */
.new-session-btn {
  background: #3c3c3c;
  color: #ccc;
  padding: 4px 8px;
  border: 1px solid #555;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-size: 11px;
  min-width: 80px;
  height: 30px;
  margin: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.new-session-btn:hover {
  background: #4c4c4c;
}

.new-session-btn:active {
  background: #007acc;
  color: white;
  border-color: #007acc;
}

/* Панель с инструкциями для нового клиента */
.client-instructions {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 20px;
  margin: 20px;
  color: #ccc;
  display: none;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 140px);
  transition: all 0.3s ease;
}

.client-instructions.show {
  display: block;
}

.instructions-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #fff;
}

.platform-section {
  margin-bottom: 20px;
}

.platform-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #007acc;
}

.command-box {
  background: #1e1e1e;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #4CAF50;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.command-text {
  flex: 1;
  color: #4CAF50;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
}

.command-box .copy-btn {
  background: #007acc;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 10px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.command-box .copy-btn:hover {
  background: #005a9e;
}

.instructions-note {
  font-size: 12px;
  color: #999;
  font-style: italic;
  margin-top: 10px;
}

/* Статус индикаторы */
.status-connected { background: #4CAF50 !important; }
.status-disconnected { background: #f44336 !important; }
.status-waiting { background: #FF9800 !important; }

