:root {
  --bg: #070b14;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --border: #26334d;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #10b981;
  --primary-hover: #059669;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --rose: #f43f5e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

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

.setup-banner {
  background: linear-gradient(90deg, #b45309, #ea580c);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  color: #03150e;
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.3px;
}

.brand-tag {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.nav-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: 0.18s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #03180f;
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-donate {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}
.btn-donate:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: #475569;
}

/* Hero & Search */
.hero {
  text-align: center;
  padding: 36px 0 24px;
}

.pill-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.75rem);
  font-weight: 850;
  line-height: 1.18;
  margin-bottom: 10px;
}

.hero h1 span {
  background: linear-gradient(90deg, #34d399, #60a5fa, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 22px;
  font-size: 0.98rem;
}

.search-wrap {
  max-width: 580px;
  margin: 0 auto 18px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid #334155;
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.search-wrap input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.05rem;
}

/* Category Pills */
.cat-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.cat-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.cat-btn.active,
.cat-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Tool Directory Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.hot-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.tool-icon {
  font-size: 1.75rem;
  margin-bottom: 10px;
}

.tool-card h3 {
  font-size: 1.04rem;
  margin-bottom: 6px;
  color: #fff;
}

.tool-card p {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.tool-open {
  font-size: 0.82rem;
  font-weight: 700;
  color: #34d399;
}

/* Active Tool Workspace */
.workspace {
  display: none;
  background: var(--surface);
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 26px;
  margin: 18px 0 34px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.workspace.open {
  display: block;
}

.ws-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.ws-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

@media (max-width: 820px) {
  .ws-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 5px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: #080d19;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.92rem;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
}

.dropzone {
  border: 2px dashed #3b4c6b;
  border-radius: 14px;
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 15px;
  transition: 0.18s;
}

.dropzone:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
}

.out-box {
  background: #080d19;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
}

.stat-card small {
  color: var(--muted);
  font-size: 0.78rem;
  display: block;
}

.stat-card strong {
  font-size: 1.25rem;
  color: #fff;
}

/* Support Banner */
.support-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.13), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 18px;
  padding: 24px;
  margin: 24px 0 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Modal */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-bg.open {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border: 1px solid #334155;
  border-radius: 20px;
  max-width: 430px;
  width: 100%;
  padding: 24px;
  text-align: center;
  position: relative;
}

.close-x {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.amt-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.amt-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 4px;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
}

.amt-chip.active {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--amber);
  color: #fde68a;
}

#donateQrBox {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  margin: 8px auto;
}

.copy-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #080d19;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 9px;
  margin-top: 10px;
  font-size: 0.85rem;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 16px 80px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Floating Non-Intrusive Support Pill */
.float-tip {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 45;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  font-size: 0.86rem;
  box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: transform 0.2s ease;
}

.float-tip:hover {
  transform: translateY(-2px) scale(1.02);
}

.ws-tip-strip {
  margin-top: 18px;
  padding: 11px 16px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #fde68a;
}
