/* BengalCloud NTP – Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mono font for technical values */
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important; }

/* ── Tracking card values — auto-scale font so content always fits ─────────── */
.card-value {
  font-size: clamp(0.75rem, 2.2vw, 1.1rem);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  margin-top: 2px;
}

/* ── Hero stat values (the 4 small boxes under the clock) ───────────────────── */
.hero-stat-value {
  font-size: clamp(0.6rem, 2.8vw, 1rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  letter-spacing: -0.01em;
}

/* Fade-in animation for cards */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.35s ease-out forwards; }

/* Pulse slow */
@keyframes pulseSlow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.animate-pulse-slow { animation: pulseSlow 3s ease-in-out infinite; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #FF5722; }

/* Table hover rows */
tbody tr { transition: background-color 0.15s ease; }

/* Card shimmer on data update */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.data-update {
  background: linear-gradient(90deg, transparent 25%, rgba(255,87,34,0.08) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 0.6s ease-out;
}

/* ── OS Tab Buttons ─────────────────────────────────────────────────────────── */
.tab-btn {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.tab-btn:hover {
  border-color: #FF5722;
  color: #FF5722;
}
.tab-btn.active {
  background: #FF5722;
  border-color: #FF5722;
  color: #fff;
}

/* ── Copy Button (dark bg code blocks) ──────────────────────────────────────── */
.copy-btn {
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  line-height: 1.6;
}
.copy-btn:hover {
  background: rgba(255, 87, 34, 0.2);
  border-color: #FF5722;
  color: #FF5722;
}
.copy-btn.copied {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
}

/* ── Copy Button (light bg — server address box) ─────────────────────────────── */
.copy-btn-light {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1.5px solid #FF5722;
  background: transparent;
  color: #FF5722;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}
.copy-btn-light:hover {
  background: #FF5722;
  color: #fff;
}
.copy-btn-light.copied {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

/* ── Inline copy (IPv6 / notes text) ──────────────────────────────────────────── */
.copy-btn-inline {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78em;
  background: #f3f4f6;
  color: #FF5722;
  border: 1px solid rgba(255,87,34,0.25);
  border-radius: 4px;
  padding: 0.1em 0.45em;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.copy-btn-inline:hover {
  background: rgba(255,87,34,0.08);
  border-color: #FF5722;
}
.copy-btn-inline.copied {
  background: rgba(34,197,94,0.1);
  border-color: #22c55e;
  color: #16a34a;
}

/* ── Inline copy for banner / footer (dark bg) ──────────────────────────────── */
.copy-inline {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  text-align: left;
  position: relative;
}
.copy-inline:hover {
  background: rgba(255,255,255,0.08);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
}
.copy-inline::after {
  content: ' 📋';
  font-size: 0.65em;
  opacity: 0;
  transition: opacity 0.15s;
}
.copy-inline:hover::after {
  opacity: 0.6;
}
.copied-inline {
  color: #22c55e !important;
}

/* ── Copy Toast ─────────────────────────────────────────────────────────────── */
#copy-toast {
  transform: translateX(-50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#copy-toast.opacity-100 {
  transform: translateX(-50%) scale(1);
}

/* ── Tracking card values ───────────────────────────────────────────────────── */
.card-value {
  font-size: clamp(0.7rem, 2vw, 1rem);
  line-height: 1.3;
  word-break: break-all;
  overflow-wrap: anywhere;
  min-height: 1.4em;
}

/* ── Mobile improvements ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .font-mono { font-size: 0.72rem; }

  /* Tab scroll on mobile */
  #os-tabs {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ── Hide scrollbar on tab strip on mobile ─────────────────────────────────── */
#os-tabs::-webkit-scrollbar { display: none; }
.overflow-x-auto { -ms-overflow-style: none; scrollbar-width: none; }
