* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  background: #0a0a0a;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.converter {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 900px;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.bases {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.field input {
  width: 100%;
  min-width: 280px;
  max-width: 320px;
  padding: 1.25rem;
  border: 1px solid #333333;
  border-radius: 12px;
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: #111111;
  color: #ffffff;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
}

.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field input:focus {
  outline: none;
  border-color: #666666;
  background: #1a1a1a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.field input::placeholder {
  color: #555555;
  font-weight: 500;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 320px;
  min-width: 280px;
}

.field label {
  font-size: 0.875rem;
  color: #888888;
  text-transform: lowercase;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.char-count {
  font-size: 0.75rem;
  color: #555555;
  font-weight: 500;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

@media (max-width: 768px) {
  .converter {
    flex-direction: column;
    gap: 3rem;
  }
  
  .bases {
    gap: 1.5rem;
  }
  
  .field input {
    min-width: 250px;
    max-width: 300px;
  }
  
  .label-row {
    min-width: 250px;
    max-width: 300px;
  }
}