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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1a1a1a;
  --border: #2a2a2a;
  --text: #e5e5e5;
  --text-dim: #888;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 12px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header */
header {
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.logo-icon {
  font-size: 24px;
  color: var(--accent);
  font-weight: 700;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
}

.progress {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.step-indicator {
  font-size: 13px;
  color: var(--text-dim);
}

/* Screens */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 15px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus,
select:focus {
  border-color: var(--accent);
}

input::placeholder {
  color: #555;
}

.hint {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn.primary {
  background: var(--accent);
  color: white;
  width: 100%;
  margin-top: 8px;
}

.btn.primary:hover {
  background: var(--accent-hover);
}

.btn.primary.large {
  padding: 16px 32px;
  font-size: 17px;
  font-weight: 600;
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
}

.btn.secondary:hover {
  background: var(--surface-hover);
}

.btn.text {
  background: none;
  color: var(--text-dim);
  padding: 12px 0;
}

.btn.text:hover {
  color: var(--text);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}

.card.recommended {
  border-color: var(--accent);
}

.card-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.card p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 12px;
}

/* Expandable sections */
.expandable {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.expandable.open {
  display: block;
}

.steps {
  margin-bottom: 16px;
}

.step-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.key-input {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 14px;
}

.verify-status {
  margin-top: 8px;
  font-size: 14px;
  min-height: 20px;
}

.verify-status.success {
  color: var(--success);
}
.verify-status.error {
  color: var(--error);
}

.link {
  color: var(--accent);
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}

/* Channel grid */
.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.channel-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  text-align: center;
}

.channel-card:hover {
  border-color: #444;
}

.channel-card.selected {
  border-color: var(--accent);
  background: #0a1628;
}

.channel-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.channel-card h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.channel-card p {
  font-size: 12px;
  color: var(--text-dim);
}

.channel-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--success);
  font-size: 18px;
  font-weight: 700;
}

.channel-card.selected .channel-check {
  display: block;
}

/* Channel setup forms */
.channel-setup-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.channel-setup-form h4 {
  margin-bottom: 12px;
}

/* Review */
.review-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.review-label {
  color: var(--text-dim);
}

.review-value {
  font-weight: 500;
}

.review-edit {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  margin-left: 8px;
}

/* Agents preview */
.agents-preview {
  margin-bottom: 24px;
}

.agents-preview h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.agent-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.tag {
  font-size: 11px;
  background: var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-dim);
}

.launch-info {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: center;
}

.launch-info .small {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 4px;
}

/* Launch progress */
.launch-progress {
  text-align: center;
  padding: 40px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.launch-step {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-dim);
}

.launch-step.done {
  color: var(--success);
}

.launch-step.done::before {
  content: "✓ ";
}

.launch-step.active {
  color: var(--text);
}

/* Launch complete */
.launch-complete {
  text-align: center;
  padding: 40px 0;
}

.launch-complete h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.instance-url {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
}

/* Mobile */
@media (max-width: 480px) {
  .channel-grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 24px;
  }
}
