/* col.ad — Colony Agent Setup Wizard */

:root {
  --bg: #0a0e14;
  --bg-card: #131920;
  --bg-input: #1a2029;
  --border: #1e2a36;
  --border-focus: #00d4c8;
  --accent: #00d4c8;
  --accent-dim: rgba(0, 212, 200, 0.15);
  --accent-glow: rgba(0, 212, 200, 0.3);
  --text: #e6edf3;
  --text-dim: #7d8a97;
  --text-muted: #4a5568;
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 720px;
  --transition: 0.2s ease;
}

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

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

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

/* Header */

header {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo svg {
  flex-shrink: 0;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

nav a:hover {
  color: var(--accent);
}

.nav-icon {
  display: flex;
  align-items: center;
}

.nav-icon svg {
  transition: color var(--transition);
}

/* Main */

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  overflow: hidden;
}

/* Hero */

.hero {
  text-align: center;
  padding: 100px 0 60px;
  animation: fadeUp 0.6s ease;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

.subtitle.tagline {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 40px;
}

/* Buttons */

.btn-primary {
  background: var(--accent);
  color: #0a0e14;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: -0.01em;
}

.btn-primary:hover:not(:disabled) {
  background: #33e0d6;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

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

.btn-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Progress bar */

.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 40px;
  overflow: hidden;
}

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

.step-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--transition);
}

.step-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.step-dot.done {
  background: var(--accent);
  opacity: 0.5;
}

/* Steps */

.step {
  animation: fadeUp 0.4s ease;
  padding-bottom: 60px;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.step-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.step-header p {
  color: var(--text-dim);
  font-size: 15px;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Forms */

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.hint {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.hint strong {
  color: var(--warning);
}

/* Provider grid */

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  color: var(--text);
  font-family: inherit;
  position: relative;
}

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

.provider-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent);
}

.provider-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.provider-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.provider-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.provider-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 10px;
  background: var(--bg);
  color: var(--text-dim);
}

.provider-tag.free {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.provider-tag.paid {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

/* Model grid */

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  color: var(--text);
  font-family: inherit;
}

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

.model-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.model-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.model-card span {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.3;
}

.sub-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.3s ease;
}

.sub-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.info-box {
  background: rgba(0, 212, 200, 0.06);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
}

.info-box a {
  color: var(--accent);
  text-decoration: none;
}

.info-box a:hover {
  text-decoration: underline;
}

.info-box strong {
  color: var(--text);
}

/* Command output */

.command-section {
  margin-bottom: 28px;
}

.command-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.command-section h3 .num {
  background: var(--accent-dim);
  color: var(--accent);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.command-section p {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.5;
}

.command-block {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 60px 14px 16px;
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
  max-width: 100%;
  overflow: hidden;
}

.command-block:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 200, 0.04);
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--border);
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  transition: all var(--transition);
  opacity: 0.6;
}

.copy-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  opacity: 1;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.command-block:hover .copy-btn,
.prompt-block:hover .copy-btn {
  opacity: 1;
}

.command-block.copied .copy-btn,
.prompt-block.copied .copy-btn {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  opacity: 1;
}

.command-block.copied {
  border-color: var(--success);
}

.prompt-block {
  background: rgba(0, 212, 200, 0.05);
  border-left: 3px solid var(--accent);
  padding: 16px 60px 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 8px;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  overflow: hidden;
}

.prompt-block:hover {
  background: rgba(0, 212, 200, 0.08);
}

.prompt-block.copied {
  border-left-color: var(--success);
}

/* Toast */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: var(--bg);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

/* Animations */

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

/* Responsive */

@media (max-width: 600px) {
  header {
    padding: 12px 16px;
  }

  nav {
    gap: 12px;
  }

  nav a {
    font-size: 13px;
  }

  main {
    padding: 0 16px;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .model-grid {
    grid-template-columns: 1fr 1fr;
  }

  .step-actions {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .step-actions .btn-secondary,
  .step-actions .btn-primary {
    width: 100%;
  }

  .copy-btn {
    opacity: 1;
  }
}
