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

body {
  background: #f0f0f0;
  font-family: system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

h1 { font-size: 1.5rem; color: #111; margin-bottom: 24px; letter-spacing: 1px; }

.converter-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 340px;
}

input, select {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  outline: none;
  color: #111;
  background: #fff;
  transition: border-color .2s;
}
input:focus, select:focus { border-color: #555; }
input::placeholder { color: #aaa; }
input::-webkit-inner-spin-button { appearance: none; }

select {
  flex: 1;
  min-width: 0;
  padding-right: 32px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
}

.unit-row { display: flex; align-items: center; gap: 10px; }
.arrow { color: #888; flex-shrink: 0; }

button {
  width: 100%;
  padding: 12px;
  font: 600 .95rem/1 inherit;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s;
}
button:hover { background: #333; }
button:active { background: #000; }

#result { font-size: 1rem; color: #444; text-align: center; min-height: 1.4rem; }

@media (max-width: 400px) {
  .converter-card { width: 90vw; padding: 28px 20px; }
  .unit-row { flex-direction: column; }
  .arrow { transform: rotate(90deg); }
}
