/* =========================================================
   Vibe Code School — виртуальный терминал
   Подключается на страницах уроков, где есть `<div data-vibe-terminal>`.
   ========================================================= */

.term{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  overflow: hidden;
  background: #0B0E13;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  box-shadow: 0 24px 48px -24px rgba(0,0,0,0.5);
}
@media (min-width: 900px){
  .term.term--with-tasks{
    grid-template-columns: 1fr 280px;
  }
}

.term__main{
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
}

/* ---------- head ---------- */
.term__head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: #11161F;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.term__dots{ display: inline-flex; gap: 6px; align-items: center; }
.term__dot{
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #3A4252;
}
.term__dot:nth-child(1){ background: #FF5F57; }
.term__dot:nth-child(2){ background: #FEBC2E; }
.term__dot:nth-child(3){ background: #27C93F; }
.term__title{
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8B949E;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.term__actions{ display: inline-flex; gap: 8px; }
.term__btn{
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8B949E;
  background: transparent;
  border: 1px solid rgba(139,148,158,0.25);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.term__btn:hover{ color: #E0E5EC; border-color: rgba(224,229,236,0.4); }

/* ---------- screen ---------- */
.term__screen{
  flex: 1;
  padding: 16px 18px;
  overflow-y: auto;
  color: #E0E5EC;
  scroll-behavior: smooth;
}
.term__screen::-webkit-scrollbar{ width: 6px; }
.term__screen::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.1); border-radius: 3px; }

.term__line{
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 2px;
}
.term__line--out{ color: #C9D1D9; }
.term__line--err{ color: #FF7B72; }
.term__line--sys{ color: #8B949E; font-style: italic; }
.term__line--welcome{ color: #7EE787; padding-bottom: 6px; }
.term__line--cmd{ display: block; }
.term__prompt{ color: #7EE787; user-select: none; }
.term__prompt-path{ color: #79C0FF; }
.term__cmd{ color: #E0E5EC; }

/* ---------- current input ---------- */
.term__current{
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
}
.term__current .term__prompt{ flex-shrink: 0; }
.term__input{
  flex: 1; min-width: 0;
  background: transparent;
  border: 0;
  color: #E0E5EC;
  font: inherit;
  caret-color: #7EE787;
  padding: 0;
  outline: none;
}

/* ---------- tasks panel ---------- */
.term__tasks{
  background: #11161F;
  border-left: 1px solid rgba(255,255,255,0.06);
  padding: 16px 18px;
  color: #C9D1D9;
  display: flex; flex-direction: column;
}
@media (max-width: 899px){
  .term__tasks{
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
}
.term__tasks-head{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8B949E;
  margin-bottom: 14px;
}
.term__tasks-list{
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.term__task{
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; line-height: 1.45;
  color: #C9D1D9;
  transition: color .2s, opacity .2s;
}
.term__task__mark{
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(139,148,158,0.4);
  flex-shrink: 0; margin-top: 1px;
  display: grid; place-items: center;
  font-size: 11px;
  color: transparent;
  transition: all .25s;
}
.term__task.is-done .term__task__mark{
  background: #27C93F;
  border-color: #27C93F;
  color: #0B0E13;
}
.term__task.is-done{ color: #7EE787; }
.term__task.is-done .term__task__label{ text-decoration: line-through; opacity: 0.7; }

.term__tasks-celebration{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(39,201,63,0.15), rgba(126,231,135,0.08));
  border: 1px solid rgba(39,201,63,0.4);
  color: #7EE787;
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.term__tasks-celebration.is-shown{ display: block; }

/* блок для hint в конце уроков */
.term__hint{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,184,84,0.08);
  border: 1px solid rgba(255,184,84,0.3);
  color: #FFB454;
  font-size: 12px;
  line-height: 1.5;
  display: none;
}
.term__hint.is-shown{ display: block; }
.term__hint b{ color: #FFB454; }

/* host-обёртка в уроке: чтобы фон card нормально подсветился */
.term-host{
  margin: 28px 0;
  position: relative;
}
