/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

.container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 100%;
  padding: 40px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 8px;
}

.subtitle {
  color: #666;
  font-size: 14px;
}

/* Status Panel */
.status-panel {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
}

.dot.connected {
  background: #4ade80;
  animation: pulse 2s infinite;
}

.dot.disconnected {
  background: #f87171;
}

.dot.connecting {
  background: #fbbf24;
  animation: blink 1s infinite;
}

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

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* QR Container */
.qr-container {
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-placeholder {
  color: #666;
}

.qr-hint {
  color: #888;
  font-size: 16px;
  text-align: center;
  padding: 40px 20px;
  line-height: 1.6;
}

.qr-image-wrapper {
  transition: opacity 0.3s;
}

.qr-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Message */
.message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.message.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #dbeafe;
}

.message.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #dcfce7;
}

.message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fee2e2;
}

.message.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fef3c7;
}

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

.btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* Login Status Steps */
.login-status {
  margin-top: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
}

.status-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s;
}

.step.active {
  background: #eff6ff;
}

.step.done {
  background: #f0fdf4;
}

.step-icon {
  font-size: 24px;
}

.step span:last-child {
  font-size: 12px;
  color: #666;
}

.step.done span:last-child {
  color: #166534;
}

.step-arrow {
  color: #ccc;
  font-size: 18px;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 30px;
  color: #9ca3af;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 24px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  .actions {
    flex-direction: column;
  }
}