:root{
  --bg: #0b0f14;
  --panel: rgba(255,255,255,0.03);
  --line: rgba(230,237,243,0.12);
  --text: #e6edf3;
  --muted: #9aa7b2;

  --ok: #22c55e;
  --err: #ef4444;
  --warn: #fbbf24;

  --term-bg: #06080c;
  --term-text: #e6edf3;

  --radius: 14px;
  --shadow: 0 18px 60px rgba(0,0,0,0.45);
  --maxw: 980px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  /* FIX: background goes on .wrap to avoid "repeating" below content */
  background: var(--bg);
  color: var(--text);
}

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 18px 36px;
  min-height: 100vh;
  display:flex;
  flex-direction:column;
  gap: 16px;

  /* FIX: move gradients here so the layout owns the background */
  background:
    radial-gradient(1000px 700px at 20% -10%, rgba(125, 211, 252, 0.18), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(251, 191, 36, 0.12), transparent 55%),
    var(--bg);
}

.top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
}

.brand .title{
  font-size: 1.6rem;
  letter-spacing: 0.2px;
}
.brand .subtitle{
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.back{
  color: var(--text);
  text-decoration:none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
}
.back:hover{ background: rgba(255,255,255,0.06); }

.layout{
  display:grid;
  gap: 14px;
  grid-template-columns: 1.6fr 1fr;
  flex: 1 0 auto;
}
@media (max-width: 920px){
  .layout{ grid-template-columns: 1fr; }
}

.terminal-card, .panel{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.terminal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.dots{ display:flex; gap: 7px; align-items:center; }
.dot{ width:10px; height:10px; border-radius:50%; opacity:0.9; }
.dot.r{ background:#ff5f56; }
.dot.y{ background:#ffbd2e; }
.dot.g{ background:#27c93f; }

.term-title{
  color: var(--muted);
  font-size: 0.9rem;
}

.terminal{
  background: var(--term-bg);
  color: var(--term-text);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  padding: 14px;
  min-height: 420px;
  max-height: 560px;
  overflow:auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Terminal lines */
.line{ display:block; margin: 0; }
.prompt{
  color: #cfd8e3;              /* blanco fuerte con leve tinte */
  font-weight: 600;
}
/* Command text (typed command) */
.cmd{
  color: #e6edf3;
}
.ok{ color: var(--ok); }
.err{ color: var(--err); }
.warn{ color: var(--warn); }
.dim{ color: var(--muted); }

.panel{
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.panel-title{ font-size: 1.05rem; }

.badge{
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.03);
}

.objective{
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,0.15);
}

.actions{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.btn{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 255, 21, 0.1);
  color: var(--text);
  cursor:pointer;
  text-align:left;
}
.btn:hover{ background: rgba(255,255,255,0.06); }
.btn:disabled{
  opacity: 0.5;
  cursor:not-allowed;
}
.btn .meta{
  color: var(--muted);
  font-size: 0.85rem;
}

a.btn {
  text-decoration: none;
}

a.btn:hover {
  text-decoration: none;
}

.hint{
  margin-top:auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.hint-title{ color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.hint ul{ margin: 0; padding-left: 18px; color: var(--muted); }

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

@keyframes cursor-blink {
  0%   { opacity: 1; }
  49%  { opacity: 1; }
  50%  { opacity: 0; }
  99%  { opacity: 0; }
  100% { opacity: 1; }
}

/* Only the idle cursor blinks */
.cursor {
  animation: cursor-blink 1.1s steps(1) infinite;
}




