/* ── CALCULAONLINE SHARED CSS ── */
:root {
  --bg: #fafbff;
  --bg2: #f0f2fa;
  --surface: #ffffff;
  --border: #e4e8f5;
  --border2: #c8d0f0;
  --accent: #4f46e5;
  --accent2: #7c3aed;
  --accent3: #06b6d4;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --text: #1e1b4b;
  --text2: #374151;
  --muted: #6b7280;
  --font: 'Nunito', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --shadow: 0 1px 3px rgba(79,70,229,0.08);
  --shadow-md: 0 4px 20px rgba(79,70,229,0.1);
  --shadow-lg: 0 12px 40px rgba(79,70,229,0.15);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(79,70,229,0.05) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(124,58,237,0.04) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 68px; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(250,251,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 900; font-size: 22px; letter-spacing: -0.5px;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 10px; transition: all 0.2s;
}
.nav-links a:hover { color: var(--accent); background: rgba(79,70,229,0.06); }

/* CALC PAGE */
.calc-page {
  max-width: 860px; margin: 0 auto;
  padding: 90px 48px 80px; position: relative; z-index: 1;
}

.breadcrumb { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 24px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.calc-title {
  font-size: clamp(28px,5vw,48px); font-weight: 900;
  letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 12px;
}
.calc-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.calc-desc { font-size: 16px; color: var(--muted); font-weight: 600; margin-bottom: 32px; line-height: 1.6; }

/* CALC BOX */
.calc-box {
  background: var(--surface);
  border: 2px solid var(--border2);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

.input-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; margin-bottom: 24px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 13px; font-weight: 800; color: var(--text2); letter-spacing: 0.3px; }

input[type="number"], select {
  background: var(--bg);
  border: 1.5px solid var(--border2);
  border-radius: 10px; color: var(--text);
  font-family: var(--font); font-size: 16px; font-weight: 700;
  padding: 12px 16px; outline: none; transition: all 0.2s; width: 100%;
}
input[type="number"]:focus, select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* TOGGLE */
.toggle-row { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.toggle-btn {
  background: var(--bg2); border: 1.5px solid var(--border);
  color: var(--muted); padding: 8px 20px; border-radius: 10px;
  font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.toggle-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: white;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* RESULTS */
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; }
.result-item {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 16px 20px; text-align: center;
}
.result-item.main {
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(124,58,237,0.05));
  border-color: rgba(79,70,229,0.3);
  grid-column: span 1;
}
.result-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.result-val { font-size: 20px; font-weight: 900; color: var(--text); letter-spacing: -0.5px; }
.result-val.big { font-size: 28px; color: var(--accent); }
.result-val.accent { color: var(--accent2); }

/* INFO */
.info-title { font-size: 20px; font-weight: 900; margin: 28px 0 12px; letter-spacing: -0.3px; }
.info-p { font-size: 14px; color: var(--text2); font-weight: 600; line-height: 1.8; margin-bottom: 12px; }
.info-list { font-size: 14px; color: var(--text2); font-weight: 600; padding-left: 20px; line-height: 1.9; margin-bottom: 16px; }
.info-list li { margin-bottom: 4px; }

/* AD */
.ad-wrap { margin: 28px 0; }

/* RELATED */
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 12px; }
.calc-card-sm {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  text-decoration: none; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s; font-weight: 700; font-size: 13px;
}
.calc-card-sm:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.calc-card-sm span { font-size: 20px; }

/* SECTION TITLE */
.section-title { font-size: clamp(20px,3vw,30px); font-weight: 900; letter-spacing: -0.5px; }

/* FOOTER */
footer {
  position: relative; z-index: 1;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 32px 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
footer p { font-size: 13px; color: var(--muted); font-weight: 600; }
footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; font-weight: 600; }
footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a { font-size: 13px; }
.dev-credit { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.dev-credit span { color: var(--accent); }

@media(max-width:768px) {
  nav { padding: 0 16px; }
  .nav-links { display: none; }
  .calc-page { padding: 80px 16px 60px; }
  .calc-box { padding: 20px 16px; }
  .related-grid { grid-template-columns: repeat(2,1fr); }
  footer { padding: 20px 16px; flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
