/* ══════════════════════════════════
   FLOATING TERMINAL
══════════════════════════════════ */

/* ── FAB ── */
#term-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(40,0,0,0.95), rgba(10,0,0,0.98));
  border: 2px solid #ff3d3d;
  color: #ff3d3d;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9000;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  animation: fab-pulse 2.5s ease-in-out infinite;
}
#term-fab:hover {
  transform: scale(1.12) rotate(-8deg);
  box-shadow: 0 0 35px rgba(255,61,61,0.8), 0 0 70px rgba(255,61,61,0.3), 0 8px 20px rgba(0,0,0,0.5);
}
#term-fab.active {
  background: radial-gradient(circle, rgba(80,0,0,0.98), rgba(20,0,0,0.98));
  transform: scale(1.05);
}
@keyframes fab-pulse {
  0%,100% { box-shadow: 0 0 16px rgba(255,61,61,0.55), 0 0 36px rgba(255,61,61,0.18), 0 4px 15px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 28px rgba(255,61,61,0.85), 0 0 56px rgba(255,61,61,0.32), 0 4px 15px rgba(0,0,0,0.4); }
}

/* ── Terminal overlay ── */
#term-overlay {
  position: fixed;
  bottom: 5.75rem;
  right: 2rem;
  width: 600px;
  max-width: calc(100vw - 2.5rem);
  height: 440px;
  z-index: 8999;
  display: none;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,61,61,0.35);
  box-shadow: 0 0 0 1px rgba(255,61,61,0.08),
              0 0 50px rgba(255,61,61,0.25),
              0 0 100px rgba(255,61,61,0.08),
              0 30px 80px rgba(0,0,0,0.8);
  transform-origin: bottom right;
}
#term-overlay.open {
  display: flex;
  animation: term-open 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
#term-overlay.closing {
  animation: term-close 0.2s ease forwards;
}
@keyframes term-open {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes term-close {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.9) translateY(12px); }
}

.term-ov-bar {
  background: linear-gradient(135deg, rgba(28,0,0,0.99), rgba(18,0,0,0.99));
  border-bottom: 1px solid rgba(255,61,61,0.18);
  padding: 0.6rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  user-select: none;
}
.term-ov-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  cursor: pointer;
  transition: filter 0.2s;
}
.term-ov-dot:hover { filter: brightness(1.4); }
.tod-r { background: #ff5f57; box-shadow: 0 0 6px rgba(255,95,87,0.7); }
.tod-y { background: #ffbd2e; box-shadow: 0 0 6px rgba(255,189,46,0.6); }
.tod-g { background: #28c840; box-shadow: 0 0 6px rgba(40,200,64,0.6); }
.term-ov-ttl {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.73rem;
  color: rgba(255,120,120,0.65);
  margin-left: 0.5rem;
  letter-spacing: 1px;
  flex: 1;
}
.term-ov-ttl span { color: rgba(255,80,80,0.9); }
.term-ov-min {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  transition: all 0.2s;
}
.term-ov-min:hover { color: #ff3d3d; background: rgba(255,61,61,0.1); }

.term-ov-body {
  background: linear-gradient(180deg, rgba(5,0,0,0.99) 0%, rgba(3,0,0,0.99) 100%);
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.3rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.85;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,61,61,0.4) transparent;
}
.term-ov-body::-webkit-scrollbar { width: 3px; }
.term-ov-body::-webkit-scrollbar-thumb { background: rgba(255,61,61,0.5); border-radius: 2px; }

.t-output-line { color: #b0b8c4; white-space: pre-wrap; word-break: break-word; }
.t-output-line.prompt-line { color: #ff5555; text-shadow: 0 0 8px rgba(255,85,85,0.4); }
.t-output-line.success { color: #00ff88; text-shadow: 0 0 6px rgba(0,255,136,0.3); }
.t-output-line.info    { color: #00d4ff; text-shadow: 0 0 6px rgba(0,212,255,0.25); }
.t-output-line.warn    { color: #ffd166; }
.t-output-line.muted   { color: rgba(80,90,100,0.8); }
.t-output-line.red     { color: #ff3d3d; text-shadow: 0 0 8px rgba(255,61,61,0.4); }

.term-ov-input-row {
  display: flex;
  align-items: center;
  background: rgba(6,0,0,0.97);
  border-top: 1px solid rgba(255,61,61,0.12);
  padding: 0.5rem 1.1rem;
  gap: 0.5rem;
  flex-shrink: 0;
}
.t-prompt-sym {
  color: #ff3d3d;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(255,61,61,0.6);
}
#term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: #fff;
  caret-color: #ff3d3d;
}
#term-input::placeholder { color: rgba(255,255,255,0.2); }
