:root {
  --bg: #ffffff;
  --text: #222;
  --card: #f9f9f9;
  --primary: #4e54c8;
}

body.dark {
  --bg: #1c1c1c;
  --text: #f1f1f1;
  --card: #2c2c2c;
  --primary: #6a82fb;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 450px;
  width: 90%;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 25px;
  text-align: center;
  transition: 0.4s;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.converter-box {
  margin-top: 20px;
}

input, select, button {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

button {
  background-color: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  opacity: 0.9;
}

.selectors {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

canvas {
  margin-top: 25px;
  background-color: white;
  border-radius: 10px;
}

/* Dark Mode Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {display:none;}
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0; left: 0;
  right: 0; bottom: 0;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}
input:checked + .slider {
  background-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
