:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, "PingFang TC", sans-serif;
}

body {
  margin: 0;
  padding: 2rem 1.5rem 5rem;
  background: #f8fafc;
  color: #0f172a;
}

h1 {
  font-size: 1.5rem;
}

.tools-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-top: 1.5rem;
}

.tool-card {
  display: block;
  padding: 1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  border-color: #2563eb;
}

/* 同步中指示器：右下角小標籤，有需要才淡入，不擋畫面 */
.sync-indicator {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.sync-indicator.visible {
  opacity: 1;
}

.sync-indicator .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
