@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --line: #e6e6e6;
  --text: #111;
  --muted: #666;
  --accent: #000;
}

body.dark {
  --bg: #000;
  --card: #0a0a0a;
  --line: #1f1f1f;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --accent: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;

  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  transition: 0.25s ease;
}

/* Toggle */
.toggle-wrap {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 42px;
  height: 22px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  transition: 0.2s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: var(--text);
  border-radius: 50%;
  transition: 0.2s;
}

input:checked + .slider {
  background: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background: var(--bg);
}

.calculator {
  width: 360px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px;
  transition: 0.25s ease;
}

h2 {
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

input, select {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

input:focus, select:focus {
  border-color: var(--accent);
}

button {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
}

.result {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  white-space: pre-line;
}

#customMonths, #customDown, #customCurrency {
  display: none;
  margin-top: 8px;
}
