@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface2: #1c1c27;
  --border: #2a2a3d;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --text: #e8e8f0;
  --text-muted: #7a7a9a;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(108,99,255,0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.4rem;
  text-decoration: none; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.85rem; padding: 6px 12px;
  border-radius: 8px; transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }

/* HERO / TOOL HEADER */
.page-hero {
  padding: 80px 24px 40px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(108,99,255,0.12) 0%, transparent 70%);
}
.page-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 16px;
}
.page-hero h1 em { font-style: normal; color: var(--accent); }
.page-hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto; }

/* TOOL CARD */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 860px; margin: 0 auto 40px;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 500;
  cursor: pointer; border: none; transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5a52e0; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--accent2); color: #fff; }
.btn-success { background: var(--accent3); color: #111; }

/* INPUTS */
input[type="text"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
label { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 6px; }

/* RESULT BOXES */
.result-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.stat-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat-pill .value {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 700;
  color: var(--accent);
}
.stat-pill .label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a { color: var(--accent); text-decoration: none; }

/* AD PLACEHOLDER */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 24px auto;
  max-width: 860px;
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
}

/* UTILS */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }
.fw-bold { font-weight: 700; font-family: 'Syne', sans-serif; }

/* RANGE SLIDER */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: var(--border); border-radius: 3px; outline: none; padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
}

/* CHECKBOX */
.checkbox-group { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.checkbox-group input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox-group label { color: var(--text); font-size: 0.95rem; margin: 0; cursor: pointer; }

/* PROGRESS BAR */
.progress-bar {
  background: var(--border);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  margin: 12px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  transition: width 0.4s;
}

/* BADGE */
.badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
  background: rgba(108,99,255,0.15); color: var(--accent);
  border: 1px solid rgba(108,99,255,0.3);
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .tool-card { padding: 20px; }
  .page-hero { padding: 60px 16px 32px; }
}
