/* Componentes reutilizables: botones, chips, tags, terminal, tarjetas */

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { font-size: var(--fs-base); padding: 0.9rem 1.5rem; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }

/* --- Chips (filtros) y tags --- */
.chip {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* --- Terminal --- */
.terminal {
  background: #0a0e14;
  border: 1px solid #2a3242;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  background: #161b22;
  border-bottom: 1px solid #2a3242;
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.terminal-title { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: #8b949e; }
.terminal-body {
  margin: 0;
  padding: var(--space-3);
  min-height: 210px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .prompt { color: #3ddc84; }
.terminal-body .out { color: #8b949e; }
.cursor { display: inline-block; width: 0.6em; background: #3ddc84; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* --- Tarjeta de proyecto --- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card-head { display: flex; align-items: center; gap: var(--space-3); }
.card-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;          /* forma de icono Android */
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.card-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.card-title { font-size: 1.15rem; margin: 0; }
.card-type { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.card-desc { color: var(--text-muted); margin: 0; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.play-link {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  color: var(--accent);
}
.play-link:hover { text-decoration: none; background: var(--accent); color: var(--accent-contrast); }
.play-link.is-disabled { border-style: dashed; border-color: var(--border); color: var(--text-muted); cursor: default; }
.play-link.is-disabled:hover { background: none; color: var(--text-muted); }
.card-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.more-link { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-2); }

.badge {
  margin-left: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge-live { color: var(--accent); }
.badge-wip { color: #d29922; }
.badge-proto { color: var(--accent-2); }
.badge-idea { color: var(--text-muted); }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  vertical-align: middle;
}
