/* Boring Tools — Shared Styles */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-input: #0d1117;
  --border: #30363d;
  --border-focus: #58a6ff;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --text-muted: #484f58;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --green: #3fb950;
  --red: #f85149;
  --orange: #d29922;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 800px; margin: 0 auto; padding: 24px 16px; }

/* Nav */
.nav {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 32px;
}
.nav a { color: var(--accent); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--accent-hover); }
.nav .back { display: inline-flex; align-items: center; gap: 4px; }

/* Headers */
h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
h2 { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
p { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

/* Textarea / Input */
textarea, input[type="text"], input[type="search"], select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s;
}
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--border-focus); }
textarea { min-height: 160px; }

/* Buttons */
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.btn {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }

/* Stats bar */
.stats {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding: 12px 0; font-size: 13px; color: var(--text-dim);
}
.stat { display: flex; gap: 4px; }
.stat-value { color: var(--text); font-weight: 600; }

/* Output */
.output {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 60px;
  max-height: 400px;
  overflow: auto;
  margin-top: 12px;
}

/* Toast / Copy */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--green); color: #fff;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 13px; opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 100;
}
.toast.show { opacity: 1; }

/* Tool grid (index) */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.tool-card p { font-size: 12px; color: var(--text-dim); margin: 0; }
.tool-card .tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--border);
  color: var(--text-dim);
  margin-top: 8px;
}

/* Category header */
.category { margin: 32px 0 16px; }
.category h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }

/* Checkbox / file input styling */
input[type="file"]::file-selector-button {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  margin-right: 8px;
}
