/* =======================================================
 *  Uncoder Developer Tools — Shared Stylesheet
 *  Complements Sketchy Bootswatch theme
 *  Author: OshekharO
 * ======================================================= */

/* ── Layout helpers ────────────────────────────────── */
.tool-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ── Progress bar ──────────────────────────────────── */
.tool-progress {
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
  display: none;
}

.tool-progress.show {
  display: block;
}

.tool-progress-bar {
  height: 100%;
  background: #333;
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ── Stats grid ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin: 1rem 0;
}

.stat-item {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.03);
}

.stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #666;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: #333;
}

/* ── Result boxes ──────────────────────────────────── */
.result-box {
  padding: 0.75rem 1rem;
  min-height: 60px;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 4px;
  border-left: 4px solid transparent;
  background: rgba(0, 0, 0, 0.03);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  word-break: break-all;
}

.result-box.live,
.result-box.valid   { border-left-color: #28a745; background: rgba(40, 167, 69, 0.05); }
.result-box.dead,
.result-box.invalid { border-left-color: #dc3545; background: rgba(220, 53, 69, 0.05); }
.result-box.unknown,
.result-box.used    { border-left-color: #ffc107; background: rgba(255, 193, 7, 0.05); }

/* ── Result items (individual entries) ─────────────── */
.result-item {
  animation: slideInLeft 0.2s ease;
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.04);
  margin: 3px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  word-break: break-all;
  transition: background 0.15s, transform 0.15s;
}

.result-item:hover {
  background: rgba(0, 0, 0, 0.09);
  transform: translateX(3px);
}

/* ── Breadcrumb / Back nav ─────────────────────────── */
.nav-back {
  margin-bottom: 1.25rem;
  font-size: 13px;
}

/* ── Footer ────────────────────────────────────────── */
.tool-footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
}

.tool-footer a {
  color: #555;
  text-decoration: none;
}

.tool-footer a:hover {
  color: #333;
  text-decoration: underline;
}

/* Keep footer nav items on one line */
footer .list-inline {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

/* ── Custom scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.4); }

/* ── Animations ────────────────────────────────────── */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 576px) {
  .tool-wrap { padding: 1rem 0.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
