.connection-panel {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 32px;
  margin: 2rem 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  margin-bottom: 24px;
}

.status-badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4444;
  animation: pulse 2s infinite;
}

.status-badge.connected .dot {
  background: #00d95f;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.qr-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0;
}

.qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  min-height: 300px;
}

.qr-placeholder {
  text-align: center;
  color: #666;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4da3ff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#qrCode img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.qr-instructions {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 24px;
}

.qr-instructions h3 {
  margin-top: 0;
  color: var(--accent);
}

.qr-instructions ol {
  padding-left: 24px;
  line-height: 1.8;
  color: var(--muted);
}

.qr-instructions strong {
  color: var(--fg);
}

.connected-section {
  background: #1a1a1a;
  border: 1px solid #00d95f;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.device-info h3 {
  margin-top: 0;
  color: #00d95f;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  color: var(--muted);
  font-weight: 500;
}

.info-row .value {
  color: var(--fg);
  font-weight: 600;
}

.status-online {
  color: #00d95f !important;
}

.btn-disconnect {
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-disconnect:hover {
  background: #ff6666;
  transform: translateY(-2px);
}

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

.actions button {
  flex: 1;
}

.stats-panel {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 32px;
  margin: 2rem 0;
}

.stats-panel h3 {
  margin-top: 0;
  color: var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.recent-messages {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 32px;
  margin: 2rem 0;
}

.recent-messages h3 {
  margin-top: 0;
  color: var(--accent);
}

.messages-list {
  margin-top: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px;
  font-style: italic;
}

.message-item {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.message-item:hover {
  border-color: var(--accent);
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.message-from {
  font-weight: 600;
  color: var(--accent);
}

.message-time {
  color: var(--muted);
  font-size: 0.85rem;
}

.message-text {
  color: var(--fg);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .qr-section {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .actions {
    flex-direction: column;
  }
}
