:root {
  --bg: #0e0f12;
  --bg-alt: #17181c;
  --bg-elevated: #1e2024;
  --text: #f1f2f4;
  --muted: #9599a3;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #2f5d8a;
  --accent-2: #5b93c4;
  --success: #2ecc71;
  --danger: #d64545;
  --radius: 12px;
  --radius-sm: 8px;
  --btn-radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

/* ---------- Header / Nav (shared across all pages) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 18, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 6vw;
  max-width: 1360px;
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav-links {
    gap: 18px;
  }
  .nav-links span.sep {
    display: none;
  }
}

/* ---------- Hero (homepage) ---------- */

.hero {
  background: radial-gradient(circle at 20% 0%, rgba(47, 93, 138, 0.32), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(91, 147, 196, 0.18), transparent 40%),
    var(--bg);
  padding: 110px 6vw 70px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-content h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  color: var(--muted);
  font-size: 1.2rem;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-block;
  padding: 15px 34px;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(47, 93, 138, 0.45);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--btn-radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

/* Search box on homepage */
.tool-search {
  max-width: 500px;
  margin: 0 auto 8px;
  position: relative;
}

.tool-search input {
  width: 100%;
  padding: 15px 22px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
}

.tool-search input:focus {
  outline: none;
  border-color: var(--accent-2);
}

/* Trust / stats bar */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.stats-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px 6vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item .stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-item .stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ---------- Sections ---------- */

.section {
  padding: 90px 6vw;
  max-width: 1360px;
  margin: 0 auto;
}

.section.alt {
  max-width: 100%;
  background: var(--bg-alt);
}

.section.alt > * {
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.section .lead {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.section p {
  color: var(--muted);
  max-width: 640px;
}

/* ---------- Category filter pills ---------- */

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-pill {
  padding: 9px 20px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.filter-pill.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

/* ---------- Tool cards / grid ---------- */

.cards,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 16px;
}

.card,
.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: block;
}

.card:hover,
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
}

.tool-card .icon {
  font-size: 1.9rem;
  margin-bottom: 16px;
  display: inline-block;
}

.tool-card h3,
.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  color: var(--text);
}

.tool-card p,
.card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.tool-card .badge {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- Tool page layout ---------- */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 28px 6vw 0;
  max-width: 900px;
  margin: 0 auto;
}

.breadcrumb.wide {
  max-width: 1360px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--text);
}

.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 6vw 110px;
}

.tool-header {
  margin-bottom: 36px;
}

.tool-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.tool-header p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 640px;
}

.tool-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  margin-bottom: 34px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-2);
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 22px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.result-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 20px;
}

.result-box .result-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.result-box .result-value {
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.result-grid .result-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.result-grid .result-item .label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.result-grid .result-item .value {
  font-size: 1.15rem;
  font-weight: 700;
}

.info-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 34px;
  margin-top: 44px;
}

.info-box h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.info-box h3 {
  font-size: 1.05rem;
  margin: 18px 0 8px;
}

.info-box p {
  color: var(--muted);
  max-width: 100%;
  margin-bottom: 10px;
}

.info-box ul {
  color: var(--muted);
  padding-left: 20px;
  margin-bottom: 10px;
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  border-left: 3px solid var(--accent-2);
  padding: 10px 16px;
  margin-top: 20px;
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--accent-2);
  background: rgba(47, 93, 138, 0.1);
}

.file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-list .file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.file-item button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
}

.file-item button:hover {
  color: var(--danger);
}

footer {
  text-align: center;
  padding: 36px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}
